Skip to content

Commit

Permalink
Publish Fat Jar to Blob Storage Steps Decouple and Fix (feathr-ai#990)
Browse files Browse the repository at this point in the history
Signed-off-by: Yuqing Wei <[email protected]>
  • Loading branch information
Yuqing-cat authored Jan 19, 2023
1 parent 5fd6314 commit 7dc7a52
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 19 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/publish-fat-jar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Publish Fat JAR package to the Blob Storage Folder
on:
push:
# This pipeline will get triggered everytime there is a new tag created.
# It is required
tags: ["*"]

jobs:
publish-fat-jar:
runs-on: ubuntu-latest

steps:
- name: Checkout source
uses: actions/checkout@v2

# Setting up JDK 8, this is required to build Feathr
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: "8"
distribution: "temurin"

# Publish Released Fat Jar to Blob Storage
- name: Gradle build
run: |
./gradlew build
# remote folder for CI upload
echo "CI_SPARK_REMOTE_JAR_FOLDER=feathr_jar_release" >> $GITHUB_ENV
# get local jar name without path
echo "FEATHR_LOCAL_JAR_FULL_NAME_PATH=$(ls build/libs/*.jar)" >> $GITHUB_ENV
- name: Azure Blob Storage Upload (Overwrite)
uses: fixpoint/azblob-upload-artifact@v4
with:
connection-string: ${{secrets.SPARK_JAR_BLOB_CONNECTION_STRING}}
name: ${{ env.CI_SPARK_REMOTE_JAR_FOLDER}}
path: ${{ env.FEATHR_LOCAL_JAR_FULL_NAME_PATH}}
container: ${{secrets.SPARK_JAR_BLOB_CONTAINER}}
cleanup: "true"
20 changes: 1 addition & 19 deletions .github/workflows/publish-to-maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,22 +36,4 @@ jobs:
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD }}
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USERNAME }}

# Publish Released Fat Jar to Blob Storage
- name: Gradle build
run: |
./gradlew build
# remote folder for CI upload
echo "CI_SPARK_REMOTE_JAR_FOLDER=feathr_jar_release" >> $GITHUB_ENV
# get local jar name without path
echo "FEATHR_LOCAL_JAR_FULL_NAME_PATH=$(ls build/libs/*.jar)" >> $GITHUB_ENV
- name: Azure Blob Storage Upload (Overwrite)
uses: fixpoint/azblob-upload-artifact@v4
with:
connection-string: ${{secrets.SPARK_JAR_BLOB_CONNECTION_STRING}}
name: ${{ env.CI_SPARK_REMOTE_JAR_FOLDER}}
path: ${{ env.FEATHR_LOCAL_JAR_FULL_NAME_PATH}}
container: ${{secrets.SPARK_JAR_BLOB_CONTAINER}}
cleanup: "true"
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USERNAME }}

0 comments on commit 7dc7a52

Please sign in to comment.