Need help with releasing a plugin

829 views
Skip to first unread message

Martin Weber

unread,
Jun 14, 2015, 5:22:53 PM6/14/15
to jenkin...@googlegroups.com
Hi,

I followed the advice on <https://wiki.jenkins-ci.org/display/JENKINS/Hosting+Plugins#HostingPlugins-Releasingtojenkinsci.org> and ran

mvn release:prepare release:perform

which built the new version (1.10) sucessfully.

But what is confusing to me: The build finally ran maven-deploy-plugin:2.6:deploy which uploaded cmakebuilder/1.10-SNAPSHOT to the snapshot repo. And the github repo did not show a new commit.

Since my git is of version 1.8.5.2 or around, I deleted everything and did a fresh 'git clone'. Then I tried

mvn org.apache.maven.plugins:maven-release-plugin:2.5:prepare

but that failed with
[INFO] Checking in modified POMs...
[INFO] Executing: /bin/sh -c cd /.../cmakebuilder-plugin-GITHUB && git add -- pom.xml
...

[INFO] Executing: /bin/sh -c cd /.../cmakebuilder-plugin-GITHUB && git push ... [INFO] Working [INFO] Tagging release with the label cmakebuilder-1.10...
[INFO] Executing: /bin/sh -c cd /.../cmakebuilder-plugin-GITHUB && git tag -F /...
...
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5:prepare (default-cli) on project cmakebuilder: Unable to tag SCM
[ERROR] fatal: Tag 'cmakebuilder-1.10' already exits

Running
mvn org.apache.maven.plugins:maven-release-plugin:2.5:perform
fails with
[ERROR] Cannot perform release - the preparation step was stopped mid-way. Please re-run release:prepare to continue, or perform the release from an SCM tag.

In the current state, github repo has the new 1.10 release tag. (<https://github.com/jenkinsci/cmakebuilder-plugin>)

Can anybody help me to get the new release published?

TIA,
Martin
--
Cd wrttn wtht vwls s mch trsr.


Francis Upton

unread,
Jun 14, 2015, 8:56:43 PM6/14/15
to jenkin...@googlegroups.com
Hi Martin,

Here are the instructions with a bunch of hints:


The way it has worked for me is to use version 2.5 of the mvn release plugin (using the prepare and release on the same line).

To get going again, you need to delete the tag from the plugins git repo. Do a google search on "git delete remote tag" for how to do that. If there were no other commits to the remote repo you are fine there.

Then make sure the version in the pom.xml is the correct (1.10-SNAPSHOT) version. If not, do the necessary git reset to get there. Once you get all of that done, you can start the release process again.

HTH,
Francis

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/2771340.2fPy8hEMku%40linux.
For more options, visit https://groups.google.com/d/optout.



--

Richard Bywater

unread,
Jun 14, 2015, 9:03:01 PM6/14/15
to jenkin...@googlegroups.com
Does this link ( http://jenkins-ci.361315.n4.nabble.com/Unable-to-deploy-plugin-to-repo-tc3093159.html#a3093270 ) help?  I've managed to use it previously to backout of some bad releases although they were at a different stage to you.

Richard.

Martin Weber

unread,
Jun 15, 2015, 3:54:43 PM6/15/15
to jenkin...@googlegroups.com
Am Montag, 15. Juni 2015, 01:02:46 schrieb Richard Bywater:

Hi Francis, hi Richard,

thanks for your help.

The maven release plugin (v2,5) seems to be broken somehow.
After inspecting my bash history and the github repo, I found the following:

mvn o.a.m.p:maven-release-plugin:2.5:prepare

-) Tagged the pom with 1.10-SNAPSHOT artifact version as 'cmakebuilder-1.10'
and pushed the tag.
-) Changed artifact version in the pom to 1.10 (release version).
-) Pushed a new revision of the pom with commit message '[maven-release-
plugin] prepare release cmakebuilder-1.10' to master branch.
-) Persisted the tag name in release.properties.

Note that the pom in the freshly tagged revision still has the 1.10-SNAPSHOT
version, whereas the pom on the master branch has a 1.10 artifact version.

After that,

mvn o.a.m.p:maven-release-plugin:2.5:perform

-) Reads the tag name from release.properties.
-) Clones the tagged revision 'cmakebuilder-1.10'

From here on, things go wrong: The cloned revision has the *SNAPSHOT version*
and maven builds that and uploads it to the snapshot repo.

For the records:
My github repo was in the state after the release:prepare as described above.

What I did to fix that:

-) Pulled changes from github.
-) Deleted the tag on the remote repo.
-) Created a new tag for the pom revision with the 1.10 artifact version.
-) Pushed the tag
-) Re-created release.properties with the tag (see
http://stackoverflow.com/a/18943705)
-) Ran 'mvn release:prepare'

Martin
Reply all
Reply to author
Forward
0 new messages