Skip to content
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

Closed
wants to merge 6 commits into from
Closed

Conversation

Tibor17
Copy link
Contributor

@Tibor17 Tibor17 commented Jan 15, 2013

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).

  • new server ids in settings.xml
  • removed extensions in pom.xmldue to HTTP does not need wagon extension
  • added release-plugin which does all the stuff while releasing a new release version

- 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
Copy link
Member

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

Copy link
Member

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

Copy link
Contributor Author

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?

Copy link
Contributor Author

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

Copy link
Contributor

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 ;-)

Copy link
Member

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.

Copy link
Contributor Author

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?

Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dsaff
See above.

Copy link
Contributor Author

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.
Copy link
Contributor

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Copy link
Contributor Author

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.

Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dsaff
done

@Tibor17
Copy link
Contributor Author

Tibor17 commented Jan 16, 2013

@marcphilipp
@stephenc
Did you email the security on the webdav share?
More convinced to store settings.xml there?
Is there other way than the webdav share ?

@Tibor17
Copy link
Contributor Author

Tibor17 commented Jan 16, 2013

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
Copy link
Member

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?

Copy link
Contributor Author

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?

Copy link
Contributor Author

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.

Copy link
Member

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?

Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

@Tibor17
Copy link
Contributor Author

Tibor17 commented Jan 16, 2013

Let's discuss our findings and proposals.

@Tibor17
Copy link
Contributor Author

Tibor17 commented Jan 16, 2013

@dsaff
@marcphilipp

you did not tell me the real key name, so I set GnuPG key name to junit in pom.xml.
Pls tell me if should be changed.

The gpg key you use is needed to sign maven artifacts (*.asc) in maven central.

@dsaff
Copy link
Member

dsaff commented Jan 16, 2013

This looks fine to me, but I'm probably the least knowledgeable person in the room on the finer points here.

@Tibor17
Copy link
Contributor Author

Tibor17 commented Jan 16, 2013

@dsaff
see the asc files
http://repo1.maven.org/maven2/junit/junit/4.11/

If you compiled project for e.g 4.8 on your system, the keys had to be already installed in $HOME/.gnupg
Just type command to see your installed keys
gpg --list-keys

@Tibor17
Copy link
Contributor Author

Tibor17 commented Jan 16, 2013

@dsaff
ok, I found two public keys registered in junit (gpg --search-keys junit)
and only one of them is registered to Marc Philipp (JUnit Maven Deployment) 67893CC4.

It looks this should be correct.

@Tibor17
Copy link
Contributor Author

Tibor17 commented Jan 17, 2013

@dsaff
@marcphilipp
@stephenc
It seems there are no new requests for a change.
Can we now make a dummy release in to Maven Central and delete the artifacts immediately?

@stephenc
Copy link
Contributor

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

@stephenc
Copy link
Contributor

@marcphilipp
Copy link
Member

@Tibor17 Can we close this pull request in favor of #614?

@Tibor17
Copy link
Contributor Author

Tibor17 commented Jan 19, 2013

merged to #614

@Tibor17 Tibor17 closed this Jan 19, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants