Reputation: 10859
When we do a release, both the release artifact and tag are being created as expected. However, the project isn't properly updated to the next (snapshot) version.
An example configuration for the release:
The relevant part of the console log:
[RELEASE] Committing release version on branch 'master'
[RELEASE] Creating tag '1.3.14'
[RELEASE] Pushing branch 'master' to 'ssh://[email protected]/xxx/yyy.git'
[RELEASE] Pushing tag '1.3.14' to 'ssh://[email protected]/xxx/yyy.git'
[RELEASE] Changing POMs to next development version
[RELEASE] Committing next development version on branch 'master'
Finished: SUCCESS
And the project's status in Git, as expected:
$ git pull origin master
From ssh://git.cloudbees.com/xxx/yyy
* branch master -> FETCH_HEAD
Already up-to-date.
$ git show --summary
commit df10d905c24c1cbf8d0b6992ab366ac5dcba470b
Author: CloudBees DEV@Cloud <[email protected]>
Date: Mon Jul 29 09:04:38 2013 +0000
$ git remote show origin
* remote origin
Fetch URL: ssh://[email protected]/xxx/yyy.git
Push URL: ssh://[email protected]/xxx/yyy.git
HEAD branch: master
RELEASED 1.3.14
So it looks like the update to the next snapshot is being committed locally, but isn't being pushed. Is this a bug (I couldn't find a related ticket) or are we doing something wrong?
PS: This problem only happens with Git, Subversion is working fine. Our Artifactory plugin version is 2.1.6, which should be the latest one.
Upvotes: 3
Views: 1393
Reputation: 86
SOLUTION: Choose the "Deploy Artifacts to Artifactory" post-build action. This is where the plugin does the missing final git push of the updated POMs, in addition to doing the actual artifact deployment.
WORKAROUND (In case you realy don't want to deploy your artifacts to Artifactory): Add a post-build action of "Git Publisher". I checked "Push Only If Build Succeeds". Then I clicked "Add Branch" and put "master" in the branch to push (because I had master in the git "Checkout to a specific local branch" box, per the plugin config page) and "origin" in the "Target remote name" block. This forced a push of the locally-committed updated POM.
It would be nice if the plugin did the final git push and publish to Artifactory automatically for maven without having to know to select the "Deploy Artifacts to Artifactory" post-build action, like it does for gradle.
Upvotes: 7