diff --git a/.github/actions/build-flex-template/action.yml b/.github/actions/build-flex-template/action.yml index 1c7609b4..9b30ad42 100644 --- a/.github/actions/build-flex-template/action.yml +++ b/.github/actions/build-flex-template/action.yml @@ -8,8 +8,8 @@ inputs: image_gcr: description: Google Artifact Registry location to store the flex template image to be built required: true - artifact_name: - description: Artifact name + jar: + description: Local path to your dataflow pipeline jar file required: true main_class: description: Main class @@ -18,12 +18,7 @@ inputs: runs: using: composite steps: - - uses: actions/download-artifact@v3 - with: - name: ${{ inputs.artifact_name }} - - uses: "google-github-actions/setup-gcloud@v1" - - name: Flex template build shell: bash run: | @@ -31,5 +26,5 @@ runs: --image-gcr-path "${{ image_gcr }}" \ --sdk-language "JAVA" \ --flex-template-base-image JAVA17 \ - --jar "${{ inputs.artifact_name }}" \ + --jar "${{ inputs.jar }}" \ --env FLEX_TEMPLATE_JAVA_MAIN_CLASS="${{ inputs.main_class }}" \ diff --git a/.github/workflows/flex-templates.yml b/.github/workflows/flex-templates.yml index 0e30f4de..2c5ecaee 100644 --- a/.github/workflows/flex-templates.yml +++ b/.github/workflows/flex-templates.yml @@ -12,17 +12,17 @@ jobs: steps: - uses: actions/checkout@v4 - uses: ./.github/actions/setup - - run: sbt tollApplication/assembly + - run: sbt 'set assemblyOutputPath in assembly := new File("./app.jar")' tollApplication/assembly - uses: actions/upload-artifact@v3 with: - name: assembly - path: stream-processing/toll-application/target/scala-2.13/tollApplication-assembly*.jar" + path: ./app.jar build-batch: runs-on: ubuntu-latest needs: [assembly] steps: - uses: actions/checkout@v4 + - uses: actions/download-artifact@v3 - uses: google-github-actions/auth@v1 with: credentials_json: "${{ secrets.GOOGLE_CREDENTIALS }}" @@ -30,7 +30,7 @@ jobs: with: template_file: gs://playground-272019-toll-application/templates/toll-application-batch.json image_gcr: europe-west1-docker.pkg.dev/playground-272019/toll-application/toll-application-batch:latest - artifact_name: assembly + jar: ./app.jar main_class: org.mkuthan.streamprocessing.toll.application.batch.TollBatchJob build-streaming: @@ -38,6 +38,7 @@ jobs: needs: [assembly] steps: - uses: actions/checkout@v4 + - uses: actions/download-artifact@v3 - uses: google-github-actions/auth@v1 with: credentials_json: "${{ secrets.GOOGLE_CREDENTIALS }}" @@ -45,5 +46,5 @@ jobs: with: template_file: gs://playground-272019-toll-application/templates/toll-application-streaming.json image_gcr: europe-west1-docker.pkg.dev/playground-272019/toll-application/toll-application-streaming:latest - artifact_name: assembly + jar: ./app.jar main_class: org.mkuthan.streamprocessing.toll.application.streaming.TollStreamingJob