We use Mercurial, Maven and Hudson
I created a test project to use with and set up freestyle/Maven 3 job in Hudson that executes the “release:prepare release:perform” goals. This runs fine.
Then I created another release job for a “real” project by copying the test one and updating the “Repository URL” and the “Repository browser URL”. This one fails:
[INFO] Checking in modified POMs...
[INFO] EXECUTING: /bin/sh -c cd /opt/home/hudson/jobs/MyProject-ManualRelease/workspace && hg branch
[INFO] EXECUTING: /bin/sh -c cd /opt/home/hudson/jobs/MyProject-ManualRelease/workspace && hg outgoing
[INFO] EXECUTING: /bin/sh -c cd /opt/home/hudson/jobs/MyProject-ManualRelease/workspace && hg commit --message '[maven-release-plugin] prepare release MyProject-1.0' /opt/home/hudson/jobs/MyProject-ManualRelease/workspace/pom.xml
[INFO] EXECUTING: /bin/sh -c cd /opt/home/hudson/jobs/MyProject-ManualRelease/workspace && hg push https://hudson:hudson@scmserver/hg/current/MyProject
[ERROR]
EXECUTION FAILED
Execution of cmd : push failed with exit code: 255.
Working directory was:
/opt/home/hudson/jobs/MyProject-ManualRelease/workspace
Your Hg installation seems to be valid and complete.
Hg version: 1.3.1 (OK)
In order for us to get Maven release plugin to work with our Mercurial server, we had to set up https on it and need to add some config to each project’s hgrc file. The same config has been set up on both project repositories.
We run Hudson as a “hudson” user and have set up private/public keys for it on our Mercurial server so that it has access to the Mercurial server.
I don’t understand why one project can commit changes and the other cannot. If it was both projects I would guess it’s a permissions issue, but it’s only one of them.
I’m hoping somebody has a suggestion as to what the problem is.
I was concentrating on the config and the problem was that hg web server couldn’t access the project repo. Someone had created an (empty) repository on the directory the project is in and this prevented Hudson from accessing it via https. Removing the repository fixed things.