Skip to content

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

Merged
merged 60 commits into from
Jul 17, 2023
Merged
Show file tree
Hide file tree
Changes from 59 commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
ac1a325
Test packaging tar with shadowJar
GumpacG Jul 11, 2023
209d23c
Test packaging tar with shadowJar
GumpacG Jul 11, 2023
3cba794
Test packaging tar with shadowJar
GumpacG Jul 11, 2023
7bd7b1a
Test packaging tar with shadowJar
GumpacG Jul 11, 2023
396bd0e
Test packaging tar with shadowJar
GumpacG Jul 11, 2023
1ccf819
Test packaging tar with shadowJar
GumpacG Jul 11, 2023
ca7b8cc
Test packaging tar with shadowJar
GumpacG Jul 11, 2023
450422f
Test packaging tar with shadowJar
GumpacG Jul 11, 2023
58069fa
Test packaging tar with shadowJar
GumpacG Jul 11, 2023
9dca6f7
Test packaging tar with shadowJar
GumpacG Jul 11, 2023
085e221
Test packaging tar with shadowJar
GumpacG Jul 11, 2023
89b1525
Test packaging tar with shadowJar
GumpacG Jul 11, 2023
ca0e56f
Test packaging tar with shadowJar
GumpacG Jul 11, 2023
1b91d55
Test packaging tar with shadowJar
GumpacG Jul 11, 2023
796c993
Test packaging tar with shadowJar
GumpacG Jul 11, 2023
2f891a3
Test packaging tar with shadowJar
GumpacG Jul 11, 2023
96aa1e9
Test packaging tar with shadowJar
GumpacG Jul 11, 2023
f88ad17
Setting version as a variable
GumpacG Jul 12, 2023
78078d0
Setting version as a variable
GumpacG Jul 12, 2023
59a58ae
Setting version as a variable
GumpacG Jul 12, 2023
61da296
Setting version as a variable
GumpacG Jul 12, 2023
74b4f83
Setting version as a variable
GumpacG Jul 12, 2023
e5f75d7
Setting version as a variable
GumpacG Jul 12, 2023
6bb3dcb
Setting version as a variable
GumpacG Jul 12, 2023
d9153c0
Setting version as a variable
GumpacG Jul 12, 2023
2e30e14
Setting version as a variable
GumpacG Jul 12, 2023
d4036d1
Setting version as a variable
GumpacG Jul 12, 2023
e5e1637
Setting version as a variable
GumpacG Jul 12, 2023
3a42837
Setting version as a variable
GumpacG Jul 12, 2023
3d2059f
Setting version as a variable
GumpacG Jul 12, 2023
f7aab46
Setting version as a variable
GumpacG Jul 12, 2023
6e3a20f
Setting version as a variable
GumpacG Jul 12, 2023
797e941
Setting version as a variable
GumpacG Jul 12, 2023
e8baf2c
Setting version as a variable
GumpacG Jul 12, 2023
8b7d2d7
Setting version as a variable
GumpacG Jul 12, 2023
6089762
Setting version as a variable
GumpacG Jul 12, 2023
be8a169
Setting version as a variable
GumpacG Jul 12, 2023
6ce9e69
Setting version as a variable
GumpacG Jul 12, 2023
28369c6
Setting version as a variable
GumpacG Jul 12, 2023
9fe8e6a
Setting version as a variable
GumpacG Jul 12, 2023
1729229
Setting version as a variable
GumpacG Jul 12, 2023
1734db8
Setting version as a variable
GumpacG Jul 12, 2023
31fd08f
Setting version as a variable
GumpacG Jul 12, 2023
a6e2324
Setting version as a variable
GumpacG Jul 12, 2023
8c61e10
Setting version as a variable
GumpacG Jul 12, 2023
64e5210
Setting version as a variable
GumpacG Jul 12, 2023
7b9c74d
Setting version as a variable
GumpacG Jul 12, 2023
1c7e422
Setting version as a variable
GumpacG Jul 12, 2023
8e13534
Setting version as a variable
GumpacG Jul 12, 2023
d6eea68
Setting version as a variable
GumpacG Jul 12, 2023
6e9c634
Changed release-drafter to include shadowJar
GumpacG Jul 12, 2023
02f198e
Bumped version to 1.4.0.1
GumpacG Jul 12, 2023
03e6993
Bumped version to 1.4.0.1
GumpacG Jul 12, 2023
f28d5ad
Simplified adding shadowJar to artifacts
GumpacG Jul 12, 2023
5816750
Reverted whitespace change
GumpacG Jul 12, 2023
17124e2
Reverted whitespace change
GumpacG Jul 12, 2023
dc4ad86
Create shadowJar as a separate artifact
GumpacG Jul 16, 2023
4af84df
Fixed wrong version
GumpacG Jul 16, 2023
4bcbe80
Added jenkins job to publish shadowJar to artifacts bucket
GumpacG Jul 16, 2023
db0095e
Changed source and signing platform
GumpacG Jul 17, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,14 @@ jobs:
- name: Build with Gradle
run: |
./gradlew publishPublishMavenPublicationToLocalRepoRepository && tar -C build -cvf artifacts.tar.gz repository
- name: Build shadowJar
run:
./gradlew shadowJar
- 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
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ static def getShadowPath(String path) {
}

shadowJar {
baseName = rootProject.name
baseName = rootProject.name + "-shadow"
classifier = ''
exclude 'META-INF/maven/commons-*/**'
exclude 'META-INF/maven/org.apache.*/**'
Expand Down
14 changes: 14 additions & 0 deletions jenkins/release.jenkinsFile
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,18 @@ standardReleasePipelineWithGenericTrigger(
mavenArtifactsPath: "$WORKSPACE/repository/",
autoPublish: true
)
publishToArtifactsProdBucket(

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

Copy link
Author

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.

assumedRoleName: 'sql-jdbc-upload-role',
source: "$WORKSPACE/artifacts.tar.gz",
destination: "https://artifacts.opensearch.org/opensearch-clients/jdbc/opensearch-sql-jdbc-${tag}.tar.gz",
signingPlatform: 'windows',
sigOverwrite: true
)
publishToArtifactsProdBucket(
assumedRoleName: 'sql-jdbc-shadowJar-upload-role',

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?

Copy link
Author

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.

source: "$WORKSPACE/build/libs/opensearch-sql-jdbc-shadow-*.jar",

Choose a reason for hiding this comment

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

Suggested change
source: "$WORKSPACE/build/libs/opensearch-sql-jdbc-shadow-*.jar",
source: "$WORKSPACE/opensearch-sql-jdbc-shadow-${tag}.jar",

Copy link
Author

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.

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.

Copy link
Author

Choose a reason for hiding this comment

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

Ohhh I see. Thanks

destination: "https://artifacts.opensearch.org/opensearch-clients/jdbc/opensearch-sql-jdbc-shadow-${tag}.jar",
signingPlatform: 'windows',

Choose a reason for hiding this comment

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

Suggested change
signingPlatform: 'windows',
signingPlatform: 'linux',

sigOverwrite: true
)
}