Skip to content

Commit

Permalink
Flex templates
Browse files Browse the repository at this point in the history
  • Loading branch information
mkuthan committed Oct 23, 2023
1 parent d5d2bf1 commit b3e1c11
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 27 deletions.
63 changes: 36 additions & 27 deletions .github/workflows/flex-templates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,39 +12,48 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- run: sbt 'set assemblyOutputPath in assembly := new File("./app.jar")' tollApplication/assembly
- run: sbt tollApplication/assembly
- run: ls -R
- uses: actions/upload-artifact@v3
with:
path: ./app.jar
path: ./toll-application/target/scala-2.13/assembly.jar

build-batch:
test:
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 }}"
- uses: ./.github/actions/build-flex-template
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
jar: ./app.jar
main_class: org.mkuthan.streamprocessing.toll.application.batch.TollBatchJob
- run: ls -R

build-streaming:
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 }}"
- uses: ./.github/actions/build-flex-template
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
jar: ./app.jar
main_class: org.mkuthan.streamprocessing.toll.application.streaming.TollStreamingJob
# 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 }}"
# - uses: ./.github/actions/build-flex-template
# 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
# jar: ./app.jar
# main_class: org.mkuthan.streamprocessing.toll.application.batch.TollBatchJob

# build-streaming:
# 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 }}"
# - uses: ./.github/actions/build-flex-template
# 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
# jar: ./app.jar
# main_class: org.mkuthan.streamprocessing.toll.application.streaming.TollStreamingJob
1 change: 1 addition & 0 deletions project/Settings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ object Settings {
)

val assemblySettings = Seq(
assembly / assemblyJarName := "assembly.jar",
assembly / assemblyMergeStrategy := {
case s if s.endsWith(".class") => MergeStrategy.last
case s if s.endsWith(".proto") => MergeStrategy.last
Expand Down

0 comments on commit b3e1c11

Please sign in to comment.