-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prepare for Maven release #613
Conversation
- If not done, copy GnuPG keys in to ${gpg.homedir}. See settings.xml. | ||
- Perform Maven Release in Jenkins | ||
- (to deploy snapshot version) mvn clean deploy | ||
- (to deploy specified release version) mvn clean release:prepare release:perform |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably document the two parameters mentioned by @stephenc in https://github.com/KentBeck/junit/pull/511#issuecomment-12268366 here:
mvn -DreleaseVersion=4.12 -DdevelopmentVersion=4.13-SNAPSHOT release:prepare release:perform
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a step missing here: Once you have pushed a release to Sonatype's staging repo, you have to close that repo as described here:
https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide#SonatypeOSSMavenRepositoryUsageGuide-8a.ReleaseIt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marcphilipp
ok, but now it's event better than deploying it all manually.
I did not mention these system props because you use to configure the release version in Jenkins.
I understood @stephenc that release:prepare release:perform
is simple and enough that you need to type as maven goals.
I think this will be real use. We should check it out. Are you able to delete a deployed artifact from Nexus release repo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marcphilipp
Pls see the building-junit.txt
if you like it now.
Thx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need to update the pull request ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While we're on the free FOSS plan of ClouBees the set of Jenkins plugins is limited. We cannot use the M2 release Jenkins plugin to set these variables for us because it is not included in the free plan. Thus we have to use regular Jenkins job params and pass those to the Maven call if we want to use Jenkins for releasing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marcphilipp
I could not find the option for release version in my DEV@cloud you showed me either.
Then it is uncomfortable use to type these props. Is there any way to persuade the CloudBees without paying.
They are Java based?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can see about if we can install the plugin for you if you really need it.
Shouldn't be an issue, but not my call
On 16 January 2013 08:32, Tibor Digana [email protected] wrote:
In doc/building-junit.txt:
- Not too tedious:
- Push to github (dsaff and KentBeck)
- Run the mvn clean install
- Upload stuff to github (including tag)
- Push to maven
- mvn -Dgpg.passphrase="" -Psign clean deploy
- If not done, update src/main/config/settings.xml in /private/.../settings.xml on CloudBees' webdav share.
- If not done, copy GnuPG keys in to ${gpg.homedir}. See settings.xml.
- Perform Maven Release in Jenkins
- (to deploy snapshot version) mvn clean deploy
- (to deploy specified release version) mvn clean release:prepare release:perform
@marcphilipp https://github.com/marcphilipp
I could not find the option for release version in my DEV@cloud you
showed me either.
Then it is uncomfortable use to type these props. Is there any way to
persuade the CloudBees without paying.
They are Java based?—
Reply to this email directly or view it on GitHubhttps://github.com/KentBeck/junit/pull/613/files#r2662293.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dsaff
See above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe CloudBees logo in JUnit website would make it :)
@@ -1,6 +1,6 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<!-- | |||
The JUnit build system is using this file. | |||
The JUnit build system is using this file as a template. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would rather see this in building-junit.txt.
It is bad practice to give, what is a partial file, as a template. What you actually want to do is add the entries and the but only if you are a release manager. Nobody else needs this content, and I fear we will just confuse Maven nubies including this entire file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, we can move it to the bottom of building-junit.txt
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is still coming, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dsaff
done
@marcphilipp |
I will push the changes in eight hours. |
@@ -2,14 +2,17 @@ Steps to build junit: | |||
|
|||
- Must be manual | |||
- Write release notes | |||
- Update version in pom.xml | |||
- Update SNAPSHOT version in pom.xml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, sometimes it will be a SNAPSHOT version, and sometimes, it will be a final release, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dsaff
Proposing always snapshot in GitHub.
Release should be created by release-plugin and deployed from ClouBees as a copy of latest snapshot commit in GitHub.
@stephenc
@marcphilipp
Do you agree?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dsaff
@marcphilipp
@stephenc
Is it really worth to upgrade snapshot version in GitHub?
Easier to keep something like 4.0-SNAPSHOT.
Less manual work.
I think the maven release plugin will upgrade both versions at the same time and snapshot committed in to GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have a reason to need the snapshot version upgraded on every release. Do we need it further on in the build chain?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK the maven-release-plugin takes care of updating the snapshot version in the repo as well. Thus, I don't see any benefit of having 4.0-SNAPSHOT in the repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marcphilipp
I see only benefit from M2 release plugin in Jenkins.
@dsaff I hope you have the rights to login to our CloudBees account.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marcphilipp
yes, using maven-release-plugin was the cool idea and standard way to make a release.
still i think the simplest and more safe solution for you @marcphilipp and @dsaff will be to use M2 release plugin in Jenkins instead of typing Maven goals with properties and tag name in Maven command.
Let's discuss our findings and proposals. |
you did not tell me the real key name, so I set GnuPG key name to The gpg key you use is needed to sign maven artifacts (*.asc) in maven central. |
This looks fine to me, but I'm probably the least knowledgeable person in the room on the finer points here. |
@dsaff If you compiled project for e.g 4.8 on your system, the keys had to be already installed in $HOME/.gnupg |
@dsaff It looks this should be correct. |
@dsaff |
I was at a conferece all day yesterday. There are some tweaks I would like to apply and I am waiting for @marcphilipp or @dsaff to respond re: me going in and setting up a release job on jenkins. No big issue from my PoV in making a dummy release, esp if we tell jenkins not to push tags and @dsaff/@marcphilipp agree to drop the staging repo so that nobody else gets the dummy artifact |
Some tweaks at https://github.com/KentBeck/junit/pull/614 |
merged to #614 |
With Stephen Connolly we prepared a new configuration to release JUnit in Maven.
Discussed in #511.
The secret stuff is in
settings.xml
-moved away from system properties -not specifying mvn profile in command line explicitly (observed by release-plugin).pom.xml
due to HTTP does not need wagon extension