Skip to content
This repository has been archived by the owner on Sep 18, 2020. It is now read-only.

NEXUS-23796: Automate release community with Nexus #130

Merged
merged 2 commits into from
Jun 10, 2020

Conversation

aornatovskyy
Copy link
Contributor

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.

@aornatovskyy aornatovskyy changed the title NEXUS-23796 - Automate release community with Nexus NEXUS-23796: Automate release community with Nexus Jun 5, 2020
bhamail
bhamail previously requested changes Jun 5, 2020
Copy link
Contributor

@bhamail bhamail left a 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>
Copy link
Contributor

@bhamail bhamail Jun 5, 2020

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

@bhamail bhamail Jun 5, 2020

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

@bhamail bhamail Jun 5, 2020

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

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.

Choose a reason for hiding this comment

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

Good idea.

@sonatypecla
Copy link

sonatypecla bot commented Jun 5, 2020

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.

Copy link

@joedragons joedragons left a 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.

@aornatovskyy aornatovskyy dismissed bhamail’s stale review June 10, 2020 21:20

agreed before that if fix passed on labrat2 thencould be merged to master

@aornatovskyy aornatovskyy merged commit abb447a into master Jun 10, 2020
@aornatovskyy aornatovskyy deleted the release-automation branch June 10, 2020 21:36
Copy link
Contributor

@bhamail bhamail left a 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
Copy link
Contributor

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants