Skip to content

Commit b7f9188

Browse files
authored
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]>
1 parent 6cc8e0a commit b7f9188

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

.github/workflows/release-drafter.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,14 @@ jobs:
2222
- name: Build with Gradle
2323
run: |
2424
./gradlew publishPublishMavenPublicationToLocalRepoRepository && tar -C build -cvf artifacts.tar.gz repository
25+
- name: Build shadowJar
26+
run:
27+
./gradlew shadowJar
2528
- name: Draft a release
2629
uses: softprops/action-gh-release@v1
2730
with:
2831
draft: true
2932
generate_release_notes: true
3033
files: |
3134
artifacts.tar.gz
35+
build/libs/opensearch-sql-jdbc-shadow-*.jar

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ static def getShadowPath(String path) {
9292
}
9393

9494
shadowJar {
95-
baseName = rootProject.name
95+
baseName = rootProject.name + "-shadow"
9696
classifier = ''
9797
exclude 'META-INF/maven/commons-*/**'
9898
exclude 'META-INF/maven/org.apache.*/**'

jenkins/release.jenkinsFile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,18 @@ standardReleasePipelineWithGenericTrigger(
1414
mavenArtifactsPath: "$WORKSPACE/repository/",
1515
autoPublish: true
1616
)
17+
publishToArtifactsProdBucket(
18+
assumedRoleName: 'sql-jdbc-upload-role',
19+
source: "$WORKSPACE/artifacts.tar.gz",
20+
destination: "https://artifacts.opensearch.org/opensearch-clients/jdbc/opensearch-sql-jdbc-${tag}.tar.gz",
21+
signingPlatform: 'linux',
22+
sigOverwrite: true
23+
)
24+
publishToArtifactsProdBucket(
25+
assumedRoleName: 'sql-jdbc-shadowJar-upload-role',
26+
source: "$WORKSPACE/opensearch-sql-jdbc-shadow-*.jar",
27+
destination: "https://artifacts.opensearch.org/opensearch-clients/jdbc/opensearch-sql-jdbc-shadow-${tag}.jar",
28+
signingPlatform: 'linux',
29+
sigOverwrite: true
30+
)
1731
}

0 commit comments

Comments
 (0)