-
Notifications
You must be signed in to change notification settings - Fork 0
Include shadowJar artifact to release workflow #8
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
Conversation
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
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'm worrying that shadow jar would be published on maven too...
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.
Do we need to increment the version at this point?
Changes to Jenkins are necessary before we can release 1.4.0.1 so it includes shadow jar.
@MaxKsyunz what would the process be like? Merge shadowJar workflow changes, then Change Jenkins, then bump version? @Yury-Fridlyand do we not want shadowJar on Maven? |
No idea, it is not harmful though. |
Based on the Jenkins file in https://github.com/opensearch-project/sql-jdbc/blob/6cc8e0a3c7933f13c58e32cbc6da3bdb9fb0d066/jenkins/release.jenkinsFile#L13C13-L13C59, |
I think no. |
Having the shadow jar on Maven Central would be confusing -- if you are getting a dependency from Maven Central, you can just as easily get its dependencies and retain control of which versions are used. If there's a CVE in one of the dependencies, without shadow jar a client application can force the build to use another version of the dependency, with shadow jar we would need to release a new version of the shadow jar with the CVE fixed. Regarding artifacts, the easiest to follow solution would be to save shadow jar as a separate artifact and have a separate stage in Jenkins job to process it.
|
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
sigOverwrite: true | ||
) | ||
publishToArtifactsProdBucket( | ||
assumedRoleName: 'sql-jdbc-shadowJar-upload-role', |
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.
they have a separate role for shadowJars?
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'm not actually too sure this works. I assumed that it was just a name for the jenkins job.
@param Map[assumedRoleName] <required> - IAM role to be assumed for uploading artifacts
Is from https://github.com/opensearch-project/opensearch-build-libraries/blob/de8ea9024a1a95a72c668562cbdd13065bf1ed46/vars/publishToArtifactsProdBucket.groovy#L12C1-L12C88 where that is being called.
@@ -14,4 +14,18 @@ standardReleasePipelineWithGenericTrigger( | |||
mavenArtifactsPath: "$WORKSPACE/repository/", | |||
autoPublish: true | |||
) | |||
publishToArtifactsProdBucket( |
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.
why do you have 2 publishToArtifactsProdBucket
for one jar?
The second one seems more correct
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.
Not sure how it works if we specify this. As I understand artifacts.tar.gz is uploaded by default. I'm not sure if it ignores this file if publishToArtifactsProdBucket
is called.
jenkins/release.jenkinsFile
Outdated
) | ||
publishToArtifactsProdBucket( | ||
assumedRoleName: 'sql-jdbc-shadowJar-upload-role', | ||
source: "$WORKSPACE/build/libs/opensearch-sql-jdbc-shadow-*.jar", |
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.
source: "$WORKSPACE/build/libs/opensearch-sql-jdbc-shadow-*.jar", | |
source: "$WORKSPACE/opensearch-sql-jdbc-shadow-${tag}.jar", |
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.
build/libs/opensearch-sql-jdbc-shadow-*.jar
would be the location of where the shadowJar is generated when it is built.
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.
Yes, but jenkins gets it from release artifacts.
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.
Ohhh I see. Thanks
jenkins/release.jenkinsFile
Outdated
assumedRoleName: 'sql-jdbc-shadowJar-upload-role', | ||
source: "$WORKSPACE/build/libs/opensearch-sql-jdbc-shadow-*.jar", | ||
destination: "https://artifacts.opensearch.org/opensearch-clients/jdbc/opensearch-sql-jdbc-shadow-${tag}.jar", | ||
signingPlatform: 'windows', |
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.
signingPlatform: 'windows', | |
signingPlatform: 'linux', |
Signed-off-by: Guian Gumpac <[email protected]>
…ct#106) * Include shadowJar artifact to release workflow (#8) * Test packaging tar with shadowJar Signed-off-by: Guian Gumpac <[email protected]> * Setting version as a variable Signed-off-by: Guian Gumpac <[email protected]> * Changed release-drafter to include shadowJar Signed-off-by: Guian Gumpac <[email protected]> * Bumped version to 1.4.0.1 Signed-off-by: Guian Gumpac <[email protected]> * Bumped version to 1.4.0.1 Signed-off-by: Guian Gumpac <[email protected]> * Simplified adding shadowJar to artifacts Signed-off-by: Guian Gumpac <[email protected]> * Reverted whitespace change Signed-off-by: Guian Gumpac <[email protected]> * Reverted whitespace change Signed-off-by: Guian Gumpac <[email protected]> * Create shadowJar as a separate artifact Signed-off-by: Guian Gumpac <[email protected]> * Fixed wrong version Signed-off-by: Guian Gumpac <[email protected]> * Added jenkins job to publish shadowJar to artifacts bucket Signed-off-by: Guian Gumpac <[email protected]> * Changed source and signing platform Signed-off-by: Guian Gumpac <[email protected]> --------- Signed-off-by: Guian Gumpac <[email protected]> * Separated shadowJar from repository directory Signed-off-by: Guian Gumpac <[email protected]> * Fixed tar issue with * Signed-off-by: Guian Gumpac <[email protected]> * Addressed PR comments Signed-off-by: Guian Gumpac <[email protected]> * Update jenkins version and release Signed-off-by: acarbonetto <[email protected]> --------- Signed-off-by: Guian Gumpac <[email protected]> Signed-off-by: acarbonetto <[email protected]> Co-authored-by: acarbonetto <[email protected]>
Description
Included shadowJar artifact to release workflow and bumped to 1.4.0.1
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.