Jim Jose
Jim Jose

Reputation: 1319

deploy website with mercurial

I am working on setting up a development/deploy cycle for one of our latest projects. Here is what I am trying to do,

  1. Commit the latest code to local "mercurial" clone.
  2. Push it to central repo hosted at "bitbucket"
  3. Open some web based management console (this is the part I need help with) on my server, which is already configured to use the bitbucket repo automatically fetches the latest commits and shows a list.
  4. Choose one of the revisions and perform an update which will effectively update the website.
  5. If there are some issues with the latest revision, go back to previous version using the same web console.

I am using "SourceTree" for step1 and step2 and I want to keep the whole cycle GUI based. Can anyone suggest any tool which I can use for the server side management (step 3,4,5) ?

Upvotes: 2

Views: 2227

Answers (2)

Steve Kaye
Steve Kaye

Reputation: 6262

Team City is a web app which can do that for you.

It is a continuous integration server but can be configured to only publish when you use the application.

There are many continuous integration servers and I imagine that most/all can do what you want so search around if that one doesn't quite fit your needs.

Upvotes: 0

Aaron Digulla
Aaron Digulla

Reputation: 328594

This is more simple than you'd think:

  1. Clone the website on your server using bitbucket as the source

  2. Write a small web app which calls hg pull -u in the root folder of your website. Mercurial remembers where to pull from, so you won't need anything here.

The second feature can be implemented using hg id -i (see this answer) to get the current revision. Write that to file.

Now you need a web page which lists all the revisions in that file and runs hg up -r <revision> when you click on one of them.

But maybe a better approach would be to push directly to the web server using hg push from your local repo (see here). You can then use a hook to update the files and save the last revision to a file.

Now you'll only need a web service to revert to a former revision.

Upvotes: 2

Related Questions