-
Notifications
You must be signed in to change notification settings - Fork 29
Include shadowJar artifact to release workflow (#8) #106
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
Include shadowJar artifact to release workflow (#8) #106
Conversation
* 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]>
@prudhvigodithi and @gaiksaya could you take a look at the jenkinsfile change to ensure that I have provided the correct arguments as this is difficult to test? Thanks in advance. |
- name: Draft a release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
draft: true | ||
generate_release_notes: true | ||
files: | | ||
artifacts.tar.gz | ||
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.
Tha shadow jar need to be bundled within artifacts.tar.gz
. The jenkins server will only download that 1 artifact and unzip it.
See how can you bundle all in one tar.
Thanks!
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.
Thanks for responding @gaiksaya, my worry is that including the shadowJar in the artifacts.tar is that Jenkins will also upload it to Maven which not ideal as per Bit-Quill#8 (comment).
What we need is:
- have maven include non-shadowJar driver files and exclude shadowJar
- OpenSearch downloads page to include shadowJar and non-shadowJar driver files.
Would you know if it is possible to exclude a file from artifacts.tar from getting published to Maven?
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 that is possible. What is published to maven is decided by these lines https://github.com/opensearch-project/sql-jdbc/pull/106/files#diff-619ac2b62b38c4694d7b69e89c001d78c5f853c5b39979c34d01012f778d26f0R12-R15
Right now if you unzip artifacts.tar.gz
, these are the contents:
tree repository
repository
└── org
└── opensearch
└── driver
└── opensearch-sql-jdbc
├── 1.4.0.0
│ ├── opensearch-sql-jdbc-1.4.0.0-javadoc.jar
│ ├── opensearch-sql-jdbc-1.4.0.0-javadoc.jar.md5
│ ├── opensearch-sql-jdbc-1.4.0.0-javadoc.jar.sha1
│ ├── opensearch-sql-jdbc-1.4.0.0-sources.jar
│ ├── opensearch-sql-jdbc-1.4.0.0-sources.jar.md5
│ ├── opensearch-sql-jdbc-1.4.0.0-sources.jar.sha1
│ ├── opensearch-sql-jdbc-1.4.0.0.jar
│ ├── opensearch-sql-jdbc-1.4.0.0.jar.md5
│ ├── opensearch-sql-jdbc-1.4.0.0.jar.sha1
│ ├── opensearch-sql-jdbc-1.4.0.0.pom
│ ├── opensearch-sql-jdbc-1.4.0.0.pom.md5
│ └── opensearch-sql-jdbc-1.4.0.0.pom.sha1
├── maven-metadata.xml
├── maven-metadata.xml.md5
└── maven-metadata.xml.sha1
We can also zip the shadow jar outside repository
folder.
Question: Do we want all the below files or just the jar?
ll build/libs
total 12872
-rw-r--r-- 1 gaiksaya staff 261B Jul 26 11:08 opensearch-sql-jdbc-1.4.0.0-javadoc.jar
-rw-r--r-- 1 gaiksaya staff 109K Jul 26 11:08 opensearch-sql-jdbc-1.4.0.0-sources.jar
-rw-r--r-- 1 gaiksaya staff 192K Jul 26 11:08 opensearch-sql-jdbc-1.4.0.0.jar
-rw-r--r-- 1 gaiksaya staff 5.9M Jul 26 11:08 opensearch-sql-jdbc-shadow-1.4.0.0.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.
Sorry, my assumptions were actually wrong. What we actually want is to have:
- only non-shadowJar files in Maven
- only shadowJar file in the artifacts bucket
I've updated the PR and with updated paths for the artifacts bucket. The new tree for artifacts is
artifacts
├── repository
│ └── org
│ └── opensearch
│ └── driver
│ └── opensearch-sql-jdbc
│ ├── 1.4.0.0
│ │ ├── opensearch-sql-jdbc-1.4.0.0-javadoc.jar
│ │ ├── opensearch-sql-jdbc-1.4.0.0-javadoc.jar.md5
│ │ ├── opensearch-sql-jdbc-1.4.0.0-javadoc.jar.sha1
│ │ ├── opensearch-sql-jdbc-1.4.0.0-sources.jar
│ │ ├── opensearch-sql-jdbc-1.4.0.0-sources.jar.md5
│ │ ├── opensearch-sql-jdbc-1.4.0.0-sources.jar.sha1
│ │ ├── opensearch-sql-jdbc-1.4.0.0.jar
│ │ ├── opensearch-sql-jdbc-1.4.0.0.jar.md5
│ │ ├── opensearch-sql-jdbc-1.4.0.0.jar.sha1
│ │ ├── opensearch-sql-jdbc-1.4.0.0.pom
│ │ ├── opensearch-sql-jdbc-1.4.0.0.pom.md5
│ │ └── opensearch-sql-jdbc-1.4.0.0.pom.sha1
│ ├── maven-metadata.xml
│ ├── maven-metadata.xml.md5
│ └── maven-metadata.xml.sha1
└── shadowJar
└── opensearch-sql-jdbc-shadow-1.4.0.0.jar
Could you take a look at the jenkinsFile again to ensure that it is correct? In particular the role for publishing to the artifacts bucket.
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
Hi @GumpacG, One important thing is signing the artifacts that are uploaded to artifacts.opensearch.org. We have 2 options: We are yet to integrate our jarsigner with the signing system and would like to take this opportunity to do the same. |
I believe we want jarsigner. @Yury-Fridlyand could you confirm and also wondering if you have a time line for next release? |
Yes, we need a jarsigner. |
Thanks @Yury-Fridlyand and @gaiksaya! Any more actions you need from me for this PR? |
I would hold on to this PR until jarsigner is integrated by @rishabh6788 . Will come back and comment on this with necessary changes. |
Sounds good. Thanks! |
Hi @rishabh6788, would you have a timeline for this? |
Hey quick thought, we are using |
That's because maven wants |
Thanks for the patience. The jar_signer is now integrated with jenkins.
|
Signed-off-by: acarbonetto <[email protected]>
@gaiksaya can you re-review please? |
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.
LGTM! Thank you for the patience.
Description
Modified release-drafter to include shadowJar to the release artifacts.
Modified JenkinsFile to publish shadowJar along with JDBC driver files to the artifacts bucket.
Issues Resolved
#98
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.