Skip to content

Commit

Permalink
chore(build): test umbrella job to build the client in a coordinated …
Browse files Browse the repository at this point in the history
…process
  • Loading branch information
jekutzsche committed Nov 9, 2021
1 parent aa1663e commit 7acb2a1
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 42 deletions.
42 changes: 21 additions & 21 deletions .github/workflows/bff_develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,35 @@
name: BFF Develop

on:
push:
branches:
- develop
paths:
- iris-client-bff/**
- .github/workflows/bff_develop.yml
pull_request:
branches:
- develop
workflow_call

defaults:
run:
shell: bash

jobs:
pre_job:
name: Determines job skipping
# continue-on-error: true # Uncomment once integration is finished
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
# All of these options are optional, so you can remove them if you are happy with the defaults
skip_after_successful_duplicate: 'false'
concurrent_skipping: 'never'
cancel_others: 'true'
paths: '["iris-client-bff/**", ".github/workflows/bff_develop.yml"]'
paths_ignore: '["**/README.md", "**/docs/**", "**/postman/**"]'

build_and_push:
name: Build and push to docker.io
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
runs-on: ubuntu-latest

# Map a step output to a job output
Expand Down Expand Up @@ -67,15 +79,3 @@ jobs:
**/surefire-reports/*.xml
**/failsafe-reports/*.xml
!**/failsafe-reports/failsafe-summary.xml
publish-test-results:
name: Publish Test Results
needs: build_and_push
uses: iris-connect/iris-client/.github/workflows/publish-test-results.yml@develop

container_scan:
name: Container Scan
needs: build_and_push
uses: iris-connect/iris-client/.github/workflows/trivy-container-scan.yml@develop
with:
image-refs: "[ '${{needs.build_and_push.outputs.image-ref}}' ]"
35 changes: 35 additions & 0 deletions .github/workflows/client_develop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Client Develop

on:
push:
branches:
- develop
pull_request:
branches:
- develop

jobs:
bff:
name: Build BFF
uses: iris-connect/iris-client/.github/workflows/bff_develop.yml@chore/optimized_build

publish-test-results:
name: Publish Test Results
needs: bff
uses: iris-connect/iris-client/.github/workflows/publish-test-results.yml@develop

fe:
name: Build FE
uses: iris-connect/iris-client/.github/workflows/fe_develop.yml@chore/optimized_build

e2e_test:
name: Run E2E Tests
needs: bff
uses: iris-connect/iris-client/.github/workflows/fe-e2e-test.yml@chore/optimized_build

container_scan:
name: Container Scan
needs: [bff, fe]
uses: iris-connect/iris-client/.github/workflows/trivy-container-scan.yml@develop
with:
image-refs: "[ '${{needs.bff.outputs.image-ref}}', '${{needs.fe.outputs.image-ref}}' ]"
27 changes: 22 additions & 5 deletions .github/workflows/fe-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,32 @@ on:
branches:
- main
- release
- develop
- 1.**
pull_request:
branches:
- develop
workflow_call:

jobs:
pre_job:
name: Determines job skipping
# continue-on-error: true # Uncomment once integration is finished
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
# All of these options are optional, so you can remove them if you are happy with the defaults
skip_after_successful_duplicate: 'true'
concurrent_skipping: 'never'
cancel_others: 'true'
paths_ignore: '["**/README.md", "**/docs/**", "**/postman/**", ".reuse/**", "infrastructure/**", "LICENSES/**", "iris-client-eps/**"]'

cypress-run:
runs-on: ubuntu-20.04
name: Run Cypress E2E Tests
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
Expand Down
37 changes: 21 additions & 16 deletions .github/workflows/fe_develop.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,31 @@
name: FE Develop

on:
push:
branches:
- develop
paths:
- iris-client-fe/**
- .github/workflows/fe_develop.yml
pull_request:
branches:
- develop
workflow_call

jobs:
pre_job:
name: Determines job skipping
# continue-on-error: true # Uncomment once integration is finished
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
# All of these options are optional, so you can remove them if you are happy with the defaults
skip_after_successful_duplicate: 'false'
concurrent_skipping: 'never'
cancel_others: 'true'
paths: '["iris-client-fe/**", ".github/workflows/fe_develop.yml"]'
paths_ignore: '["**/README.md", "**/docs/**", "**/postman/**"]'

build_and_push:
name: Build and push to docker.io
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
runs-on: ubuntu-latest

# Map a step output to a job output
Expand Down Expand Up @@ -50,10 +62,3 @@ jobs:
VUE_APP_BUILD_ID=${{ github.sha }}
labels: |
iris.client-fe.image.revision=${{ github.sha }}
container_scan:
name: Container Scan
needs: build_and_push
uses: iris-connect/iris-client/.github/workflows/trivy-container-scan.yml@develop
with:
image-refs: "[ '${{needs.build_and_push.outputs.image-ref}}' ]"

0 comments on commit 7acb2a1

Please sign in to comment.