Skip to content

Commit

Permalink
Include shadowJar artifact to release workflow (#8) (#106)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
GumpacG and acarbonetto authored Aug 22, 2023
1 parent 37a2b13 commit 5a67284
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@ jobs:
cache: gradle
- name: Build with Gradle
run: |
./gradlew publishPublishMavenPublicationToLocalRepoRepository && tar -C build -cvf artifacts.tar.gz repository
./gradlew publishPublishMavenPublicationToLocalRepoRepository
- name: Build shadowJar
run: |
./gradlew shadowJar
mkdir build/shadowJar
mv build/libs/opensearch-sql-jdbc-shadow-*.jar build/shadowJar
tar -C build -cvf artifacts.tar.gz repository shadowJar
- name: Draft a release
uses: softprops/action-gh-release@v1
with:
Expand Down
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
9 changes: 8 additions & 1 deletion jenkins/release.jenkinsFile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
lib = library(identifier: 'jenkins@1.5.3', retriever: modernSCM([
lib = library(identifier: 'jenkins@5.6.1', retriever: modernSCM([
$class: 'GitSCMSource',
remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git',
]))
Expand All @@ -14,4 +14,11 @@ standardReleasePipelineWithGenericTrigger(
mavenArtifactsPath: "$WORKSPACE/repository/",
autoPublish: true
)
publishToArtifactsProdBucket(
assumedRoleName: 'sql-jdbc-upload-role',
source: "$WORKSPACE/shadowJar/opensearch-sql-jdbc-shadow-${tag}.jar",
destination: "opensearch-clients/jdbc/opensearch-sql-jdbc-shadow-${tag}.jar",
signingPlatform: 'jar_signer',
sigOverwrite: true
)
}

0 comments on commit 5a67284

Please sign in to comment.