-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
364 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Build flex template | ||
description: Build flex template using gcloud | ||
|
||
inputs: | ||
template_file: | ||
description: Google Cloud Storage location of the flex template file | ||
required: true | ||
image_gcr: | ||
description: Google Artifact Registry location to store the flex template image to be built | ||
required: true | ||
artifact_name: | ||
description: Artifact name | ||
required: true | ||
main_class: | ||
description: Main class | ||
required: true | ||
|
||
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: | | ||
gcloud dataflow flex-template build ${{ inputs.template_file }} \ | ||
--image-gcr-path "${{ image_gcr }}" \ | ||
--sdk-language "JAVA" \ | ||
--flex-template-base-image JAVA17 \ | ||
--jar "${{ inputs.artifact_name }}" \ | ||
--env FLEX_TEMPLATE_JAVA_MAIN_CLASS="${{ inputs.main_class }}" \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
name: 'Setup' | ||
description: 'Setup build' | ||
name: Setup | ||
description: Setup java | ||
|
||
runs: | ||
using: "composite" | ||
using: composite | ||
steps: | ||
- name: Setup JDK | ||
uses: actions/setup-java@v3 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
distribution: temurin | ||
java-version: 17 | ||
cache: sbt | ||
cache: sbt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Build flex templates | ||
|
||
on: | ||
workflow_dispatch: ~ | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
assembly: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/setup | ||
- run: sbt tollApplication/assembly | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: toll-application | ||
path: toll-application/target/scala-2.13/toll-application.jar" | ||
|
||
build-batch: | ||
runs-on: ubuntu-latest | ||
needs: [assembly] | ||
steps: | ||
- 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 | ||
artifact_name: toll-application | ||
main_class: org.mkuthan.streamprocessing.toll.application.batch.TollBatchJob | ||
|
||
build-streaming: | ||
runs-on: ubuntu-latest | ||
needs: [assembly] | ||
steps: | ||
- 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 | ||
artifact_name: toll-application | ||
main_class: org.mkuthan.streamprocessing.toll.application.streaming.TollStreamingJob |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Terraform apply | ||
|
||
on: | ||
workflow_dispatch: ~ | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: read | ||
pull-requests: write | ||
|
||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
jobs: | ||
apply: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: google-github-actions/auth@v1 | ||
with: | ||
credentials_json: "${{ secrets.GOOGLE_CREDENTIALS }}" | ||
- uses: dflook/terraform-apply@v1 | ||
with: | ||
path: toll-infrastructure |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,41 @@ | ||
name: Terraform plan | ||
|
||
on: [pull_request] | ||
on: | ||
workflow_dispatch: ~ | ||
pull_request: ~ | ||
|
||
permissions: | ||
contents: read | ||
pull-requests: write | ||
|
||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
jobs: | ||
plan: | ||
validate: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dflook/terraform-validate@v1 | ||
with: | ||
path: toll-infrastructure | ||
|
||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
fmt: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dflook/terraform-fmt-check@v1 | ||
with: | ||
path: toll-infrastructure | ||
|
||
plan: | ||
runs-on: ubuntu-latest | ||
needs: [validate, fmt] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: google-github-actions/auth@v1 | ||
with: | ||
credentials_json: "${{ secrets.GOOGLE_CREDENTIALS }}" | ||
|
||
- uses: dflook/terraform-plan@v1 | ||
with: | ||
path: toll-infrastructure |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.