[RELENG-57] Please add release jobs for odlparent Created: 01/Jun/17  Updated: 24/Apr/18  Resolved: 14/Jun/17

Status: Resolved
Project: releng
Component/s: Jenkins Job Builder
Affects Version/s: unspecified
Fix Version/s: None

Type: Bug
Reporter: Stephen Kitt Assignee: Thanh Ha (zxiiro)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issue Links:
Blocks
blocks INFRAUTILS-14 fix infrautils dependency on nitrogen... Resolved
blocks ODLPARENT-23 Milestone: Upgrade karaf to 4.0.1 or ... Resolved
External issue ID: 8580

 Description   

As discussed in the DDF odlparent Nitrogen planning session, we want to be able to manually release odlparent artifacts. This requires a job in releng/builder presumably, and perhaps a staging repository in Nexus (with the appropriate permissions for odlparent committers, or at least the odlparent PTL).



 Comments   
Comment by Thanh Ha (zxiiro) [ 08/Jun/17 ]

One of the potential issues I have with the release job I'm working on is version bumping.

Our current version bump script needs a tag at the end like -Carbon -Nitrogen. But if odlparent is releasing out of stream I assume it will not need a tag and would like to release for example: 1.9.0, 1.9.1, 2.0.0, etc...

I tried looking into a few things:

1) The maven-release-plugin

Using it's release:update-versions goal but this goal seems to bump one SNAPSHOT to the next, I don't see a way of telling it to bump to a release version and using any of the other goals causes it to run a full build and tag SCM automatically for us.

2) The maven-versions-plugin

Using it's versions:set command I can make it bump to a release version but it seems we have to do it for every individual pom.xml object and there's no easy way (as far as I can tell) to have it bump everything in a repo.

3) Let projects tag first and then build

This option is how the YangIDE project's release job was originally configured, the project creates a release tag first and then we run a build in Jenkins off of the release tag. This might be an option if we cannot find an automated option.

Maybe others have better ideas?

In the meantime I'm making some progress on the job. I still need to work on a curl script to upload releases to Nexus because the maven nexus staging plugin has issues with SNI.

Comment by Stephen Kitt [ 09/Jun/17 ]

> 1) The maven-release-plugin
>
> Using it's release:update-versions goal but this goal seems to bump one
> SNAPSHOT to the next, I don't see a way of telling it to bump to a release
> version and using any of the other goals causes it to run a full build and
> tag SCM automatically for us.

Why is this an issue?

Comment by Stephen Kitt [ 09/Jun/17 ]

(In reply to Stephen Kitt from comment #2)
> > 1) The maven-release-plugin
> >
> > Using it's release:update-versions goal but this goal seems to bump one
> > SNAPSHOT to the next, I don't see a way of telling it to bump to a release
> > version and using any of the other goals causes it to run a full build and
> > tag SCM automatically for us.
>
> Why is this an issue?

Or rather, why not use release:release?

Comment by Robert Varga [ 09/Jun/17 ]

Yeah, I think release:release is what we want to do. We used to do that in Hydrogen (plus we had jobs which simulated the effects of release:release).

Comment by Robert Varga [ 09/Jun/17 ]

One problem release plugin had was bumping dependency versions in properties, but that should not be a problem with odlparent.

Comment by Thanh Ha (zxiiro) [ 09/Jun/17 ]

release:release is not a goal in the maven-release-plugin

https://maven.apache.org/maven-release/maven-release-plugin/index.html

Unless there's another plugin I'm missing?

Comment by Robert Varga [ 09/Jun/17 ]

sorry, memory lapse. It would be a release:prepare/release:perform, or perhaps a release:stage.

I do not remember the details, as it was one-off and long ago. The gory details were in those jenkins jobs...

Comment by Thanh Ha (zxiiro) [ 09/Jun/17 ]

Right, my problem with release:perform and release:prepare is it actually runs a build and automatically tags Git. I was hoping to find a goal that only bumps the version since we also need to push a staged repo to Nexus.

Comment by Michael Vorburger [ 09/Jun/17 ]

> need to push a staged repo to Nexus

doesn't the org.sonatype.plugins:nexus-staging-maven-plugin do what you are after? I use that e.g. in my https://github.com/vorburger/MariaDB4j to deploy a personal project to Maven central, and it works great - bumps the versions, pushes to a staging...

Comment by Thanh Ha (zxiiro) [ 09/Jun/17 ]

(In reply to Michael Vorburger from comment #9)
> > need to push a staged repo to Nexus
>
> doesn't the org.sonatype.plugins:nexus-staging-maven-plugin do what you are
> after? I use that e.g. in my https://github.com/vorburger/MariaDB4j to
> deploy a personal project to Maven central, and it works great - bumps the
> versions, pushes to a staging...

That's what we're currently using for however Sonatype is currently hasn't fixed their issue with SNI in the plugin unfortunately and they don't seem to have made any progress since I reported it months ago. See [0] for details. We're currently using a workaround which is not great to allow autorelease to push however it's not a good workaround.

Moving forward we are going to be using Curl to upload things directly to Nexus as it will get around the SNI issue and allows us to also support non Java / Maven projects as we want to provide a solution that can worth for any type of project. I have a bash script that is mostly working now. I hope to have it fully ready by Monday.

[0] https://jira.linuxfoundation.org/browse/RELENG-21

Comment by Thanh Ha (zxiiro) [ 12/Jun/17 ]

The following global-jjb patch adds a working job that can release.

https://gerrit.linuxfoundation.org/infra/5126

Once it's merged we can add the bits to releng/builder to put the job into production.

Comment by Thanh Ha (zxiiro) [ 13/Jun/17 ]

This is complete with the merge of this patch
https://git.opendaylight.org/gerrit/58760

Comment by Thanh Ha (zxiiro) [ 24/Apr/18 ]

Closing as I think this is resolved now. odlparent has a way to release separately from autorelease which was the intent of this issue.

Generated at Wed Feb 07 20:37:23 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.