-
Notifications
You must be signed in to change notification settings - Fork 17
NEXUS-23796: Automate release community with Nexus #130
Conversation
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 I see where you're going, but the approach here does not appear to succeed yet in labrat2 - it can't release due to re-running the tests during the release process. Some changes still needed it seems.
pom.xml
Outdated
<plugin> | ||
<groupId>org.sonatype.plugins</groupId> | ||
<artifactId>nexus-staging-maven-plugin</artifactId> | ||
<version>1.6.8</version> |
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.
If you really need to create new profiles, please avoid declaring a separate version
tag for the plugin in the profile. Instead define a pluginManagement
section in which to declare the plugin version. This ensures all builds use the same version.
Were you ever able to commit to GitHub via the Jenkins builds using ssh key? Do we really need to do internal Jenkins builds of the project? If so, we need to make these builds reproducible as we discussed.
pom.xml
Outdated
</configuration> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-release-plugin</artifactId> |
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.
It appears the maven-release-plugin
is configured the same, in both profiles. Therefore, I think it is simpler to keep it defined in the "main" pom (outside the profiles), but maybe I'm just not seeing the difference.
Also, it appears the builds are still attempting to run the tests during the release
phase - (causing OOM errors during the release). Maybe this is related to the plugin/profile changes here? Make sure the labrat2
CircleCI build succeeds in releasing before committing these changes to the community formats builds.
<extensions>true</extensions> | ||
<configuration> | ||
<serverId>rso</serverId> | ||
<nexusUrl>https://repository.sonatype.org/</nexusUrl> |
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.
Ugh. Really don't like the complexity this adds to the community build. How'd it go with the commit to GitHub via ssh key in the Jenkins CI process? We still need reproducible
builds if we continue down this path.
@@ -12,7 +12,7 @@ build-and-test-commands: &build-and-test-commands | |||
find . -type f -regex ".*/target/failsafe-reports/.*xml" -exec cp {} ~/project/artifacts/junit/ \; | |||
|
|||
release-args: &release-args | |||
mvn-release-perform-command: mvn --batch-mode release:perform -s .circleci/.maven.xml -PbuildKar | |||
mvn-release-perform-command: mvn --batch-mode release:perform -s .circleci/.maven.xml -PbuildKar,circle-ci-release |
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 the pom can be changed such that only our "hidden" internal Jenkins CI build needs a specific profile?
If not, please be certain you also change the nexus-format-archetype
to include this and related changes.
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.
Good idea.
Thanks for the contribution! Unfortunately we can't verify if the committer(s), Sonatype Community [email protected], signed the CLA because they have not associated their commits with their GitHub user. Please follow these instructions to associate your commits with your GitHub user. Then sign the Sonatype Contributor License Agreement and this Pull Request will be revalidated. |
8b32134
to
dcb2fde
Compare
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.
Disclaimer: I assume that yml command will work, I have no knowledge of it.
agreed before that if fix passed on labrat2 thencould be merged to master
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
Please create a GitHub issue in the nexus-format-archetype
project to track adding the circleci config change to add the new profile to the release command to the archetype template.
<profile> | ||
<id>circle-ci-release</id> | ||
<!-- | ||
only sign during deploy phase |
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.
minor: move or delete this comment
Ticket: https://issues.sonatype.org/browse/NEXUS-23796
The aim of this ticket to prepare r project for build and release in the scope of NXRM release automation. And at the same time leave the possibility to release with Circle CI.