-
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
Changes from 2 commits
0fdec44
57801df
59f3fa6
a83de0f
4908f0a
aa70747
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
- Not too tedious: | ||
- Push to github (dsaff _and_ KentBeck) | ||
- Run the mvn clean install | ||
- Upload stuff to github (including tag) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We're no longer uploading the artifacts to github. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @dsaff There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, yes, when we release, we should definitely tag the source in github. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @dsaff Maybe you didn't see the discussion (setting release and dev version variables) from yesterday morning. @dsaff Just see this video which demonstrates how the release process should be like: http://www.youtube.com/watch?v=7IJVG7asfPE I am going to add Sorry for the long comment. |
||
- Push to maven | ||
- mvn -Dgpg.passphrase="<passphrase>" -Psign clean deploy | ||
- Promote | ||
- 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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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:
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @marcphilipp I did not mention these system props because you use to configure the release version in Jenkins. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @marcphilipp There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. @marcphilipp There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. On 16 January 2013 08:32, Tibor Digana [email protected] wrote:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @dsaff There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe CloudBees logo in JUnit website would make it :) |
||
- Promote the maven artifacts and close staging repository if release successfully | ||
- Tedious: | ||
- Update SourceForge if major release | ||
- Update javadocs on github site (and "latest" link) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 commentThe 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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. ok, we can move it to the bottom of There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. @dsaff |
||
All users should ignore it. | ||
|
||
Settings Reference: http://maven.apache.org/ref/3.0.4/maven-settings/settings.html | ||
|
@@ -21,36 +21,28 @@ | |
a unique name within the system (referred to by the 'id' attribute below). | ||
--> | ||
<server> | ||
<id>maven-central</id> | ||
<username>???</username> | ||
<password>???</password> | ||
<filePermissions>664</filePermissions> | ||
<directoryPermissions>775</directoryPermissions> | ||
<configuration> | ||
<timeout>15000</timeout> <!-- 15 seconds --> | ||
<httpConfiguration> | ||
<put> | ||
<connectionTimeout>15000</connectionTimeout> <!-- 15 seconds --> | ||
<readTimeout>15000</readTimeout> <!-- 15 seconds --> | ||
</put> | ||
</httpConfiguration> | ||
</configuration> | ||
<id>junit-snapshot-repo</id> | ||
<username><!--a username registered with Sonatype for deployment--></username> | ||
<password><!--corresponding password--></password> | ||
</server> | ||
<server> | ||
<id>maven-central-snapshots</id> | ||
<username>???</username> | ||
<password>???</password> | ||
<filePermissions>664</filePermissions> | ||
<directoryPermissions>775</directoryPermissions> | ||
<configuration> | ||
<timeout>15000</timeout> <!-- 15 seconds --> | ||
<httpConfiguration> | ||
<put> | ||
<connectionTimeout>15000</connectionTimeout> <!-- 15 seconds --> | ||
<readTimeout>15000</readTimeout> <!-- 15 seconds --> | ||
</put> | ||
</httpConfiguration> | ||
</configuration> | ||
<id>junit-releases-repo</id> | ||
<username><!--a username registered with Sonatype for deployment--></username> | ||
<password><!--corresponding password--></password> | ||
</server> | ||
</servers> | ||
<profiles> | ||
<profile> | ||
<id>junit-release</id> | ||
<properties> | ||
<gpg.keyname>...</gpg.keyname> | ||
<gpg.passphrase>...</gpg.passphrase> | ||
<gpg.defaultKeyring>false</gpg.defaultKeyring> | ||
<gpg.useagent>true</gpg.useagent> | ||
<gpg.homedir>/private/.../.gnupg</gpg.homedir> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These directories only need to be set if you are paranoid and want to keep your signing key on removable storage. If you are comfortable leaving the default gpg keyring you just need to keep Additionally if you will have one and only one gpg key that will be used to sign releases in central you can hardcode the gpg.keyname in to the Though if people want to release their own forks of JUnit to their own internal repo they will thank you for leaving There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @stephenc @marcphilipp There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ahem.... @Tibor17 I work for CloudBees.... though I should probably do up a blog post on how to do a release that pushes to central ;-) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @stephenc |
||
<gpg.publicKeyring>/private/.../.gnupg/pubring.gpg</gpg.publicKeyring> | ||
<gpg.secretKeyring>/private/.../.gnupg/secring.gpg</gpg.secretKeyring> | ||
</properties> | ||
</profile> | ||
</profiles> | ||
</settings> |
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.