parent
12eb81580e
commit
5bb9da3c0d
9 changed files with 53 additions and 183 deletions
34
.github/actions/checks-job-pass/action.yml
vendored
34
.github/actions/checks-job-pass/action.yml
vendored
|
@ -1,34 +0,0 @@
|
|||
name: Check if a job passed
|
||||
description: Fails if the job is required and was not successful
|
||||
|
||||
inputs:
|
||||
required:
|
||||
description: Is the job required
|
||||
required: true
|
||||
default: true
|
||||
conclusion:
|
||||
description: Job conclusion (success if passed, most likely empty otherwise)
|
||||
required: true
|
||||
|
||||
outputs:
|
||||
status:
|
||||
description: "Check status"
|
||||
value: ${{ steps.changes.outputs.java }}
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- id: check-job
|
||||
name: Check job
|
||||
shell: bash
|
||||
run: |
|
||||
if [ "${{ inputs.required }}" == "false" ]; then
|
||||
echo "Not required to run, skipping"
|
||||
else
|
||||
if [ "${{ inputs.conclusion }}" == "success" ]; then
|
||||
echo "Success"
|
||||
else
|
||||
echo "Required to run, but didn't succeed"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
16
.github/actions/checks-success/action.yml
vendored
16
.github/actions/checks-success/action.yml
vendored
|
@ -1,16 +0,0 @@
|
|||
name: Mark job as successful
|
||||
description: Workaround for GitHub Actions not setting conclusion on jobs passed through needs
|
||||
|
||||
outputs:
|
||||
conclusion:
|
||||
description: Conclusion
|
||||
value: ${{ steps.check.outputs.conclusion }}
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- id: check
|
||||
name: Set success
|
||||
shell: bash
|
||||
run: |
|
||||
echo "conclusion=success" >> $GITHUB_OUTPUT
|
27
.github/actions/status-check/action.yml
vendored
Normal file
27
.github/actions/status-check/action.yml
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
name: Check required jobs
|
||||
description: Check if all required jobs where successful or skipped
|
||||
|
||||
inputs:
|
||||
jobs:
|
||||
description: Jobs (value must be toJSON(needs))
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- id: check-jobs
|
||||
name: Check jobs
|
||||
shell: bash
|
||||
run: |
|
||||
JOBS='${{ inputs.jobs }}'
|
||||
|
||||
echo "Job status:"
|
||||
echo $JOBS | jq -r 'to_entries[] | " - \(.key): \(.value.result)"'
|
||||
|
||||
for i in $(echo $JOBS | jq -r 'to_entries[] | .value.result'); do
|
||||
if [ "$i" != "success" ] && [ "$i" != "skipped" ]; then
|
||||
echo ""
|
||||
echo "Status check not okay!"
|
||||
exit 1
|
||||
fi
|
||||
done
|
29
.github/workflows/ci.yml
vendored
29
.github/workflows/ci.yml
vendored
|
@ -572,8 +572,9 @@ jobs:
|
|||
with:
|
||||
job-name: Migration Tests
|
||||
|
||||
check-set-status:
|
||||
name: Set check conclusion
|
||||
check:
|
||||
name: Status Check - Keycloak CI
|
||||
if: always()
|
||||
needs:
|
||||
- unit-tests
|
||||
- base-integration-tests
|
||||
|
@ -591,28 +592,8 @@ jobs:
|
|||
- sssd-unit-tests
|
||||
- migration-tests
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
conclusion: ${{ steps.check.outputs.conclusion }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- id: check
|
||||
uses: ./.github/actions/checks-success
|
||||
|
||||
check:
|
||||
name: Status Check - Keycloak CI
|
||||
if: always()
|
||||
needs:
|
||||
- conditional
|
||||
- check-set-status
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Check status
|
||||
uses: ./.github/actions/checks-job-pass
|
||||
- uses: ./.github/actions/status-check
|
||||
with:
|
||||
required: ${{ needs.conditional.outputs.ci }}
|
||||
conclusion: ${{ needs.check-set-status.outputs.conclusion }}
|
||||
jobs: ${{ toJSON(needs) }}
|
||||
|
|
24
.github/workflows/codeql-analysis.yml
vendored
24
.github/workflows/codeql-analysis.yml
vendored
|
@ -60,9 +60,6 @@ jobs:
|
|||
env:
|
||||
CODEQL_ACTION_EXTRA_OPTIONS: '{"database":{"interpret-results":["--max-paths",0]}}'
|
||||
|
||||
- id: check
|
||||
uses: ./.github/actions/checks-success
|
||||
|
||||
themes:
|
||||
name: CodeQL Themes
|
||||
needs: conditional
|
||||
|
@ -89,26 +86,15 @@ jobs:
|
|||
env:
|
||||
CODEQL_ACTION_EXTRA_OPTIONS: '{"database":{"interpret-results":["--max-paths",0]}}'
|
||||
|
||||
- id: check
|
||||
uses: ./.github/actions/checks-success
|
||||
|
||||
check:
|
||||
name: Status Check - CodeQL
|
||||
if: always()
|
||||
needs: [conditional, java, themes]
|
||||
needs:
|
||||
- java
|
||||
- themes
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: CodeQL Java
|
||||
uses: ./.github/actions/checks-job-pass
|
||||
- uses: ./.github/actions/status-check
|
||||
with:
|
||||
required: ${{ needs.conditional.outputs.java }}
|
||||
conclusion: ${{ needs.java.outputs.conclusion }}
|
||||
|
||||
- name: CodeQL Themes
|
||||
uses: ./.github/actions/checks-job-pass
|
||||
with:
|
||||
required: ${{ needs.conditional.outputs.themes }}
|
||||
conclusion: ${{ needs.themes.outputs.conclusion }}
|
||||
jobs: ${{ toJSON(needs) }}
|
||||
|
|
25
.github/workflows/documentation.yml
vendored
25
.github/workflows/documentation.yml
vendored
|
@ -98,33 +98,14 @@ jobs:
|
|||
run: |
|
||||
./mvnw test -Dtest=ExternalLinksTest -am -pl docs/documentation/tests,docs/documentation/dist -nsu -B -e -Pdocumentation
|
||||
|
||||
check-set-status:
|
||||
name: Set check conclusion
|
||||
needs:
|
||||
- build
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
conclusion: ${{ steps.check.outputs.conclusion }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- id: check
|
||||
uses: ./.github/actions/checks-success
|
||||
|
||||
check:
|
||||
name: Status Check - Keycloak Documentation
|
||||
if: always()
|
||||
needs:
|
||||
- conditional
|
||||
- check-set-status
|
||||
- build
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Check status
|
||||
uses: ./.github/actions/checks-job-pass
|
||||
- uses: ./.github/actions/status-check
|
||||
with:
|
||||
required: ${{ needs.conditional.outputs.documentation == 'true' }}
|
||||
conclusion: ${{ needs.check-set-status.outputs.conclusion }}
|
||||
jobs: ${{ toJSON(needs) }}
|
25
.github/workflows/guides.yml
vendored
25
.github/workflows/guides.yml
vendored
|
@ -45,33 +45,14 @@ jobs:
|
|||
- name: Build Keycloak
|
||||
uses: ./.github/actions/build-keycloak
|
||||
|
||||
check-set-status:
|
||||
name: Set check conclusion
|
||||
needs:
|
||||
- build
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
conclusion: ${{ steps.check.outputs.conclusion }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- id: check
|
||||
uses: ./.github/actions/checks-success
|
||||
|
||||
check:
|
||||
name: Status Check - Keycloak Guides
|
||||
if: always()
|
||||
needs:
|
||||
- conditional
|
||||
- check-set-status
|
||||
- build
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Check status
|
||||
uses: ./.github/actions/checks-job-pass
|
||||
- uses: ./.github/actions/status-check
|
||||
with:
|
||||
required: ${{ needs.conditional.outputs.guides == 'true' && needs.conditional.outputs.ci != 'true' }}
|
||||
conclusion: ${{ needs.check-set-status.outputs.conclusion }}
|
||||
jobs: ${{ toJSON(needs) }}
|
||||
|
|
27
.github/workflows/js-ci.yml
vendored
27
.github/workflows/js-ci.yml
vendored
|
@ -265,8 +265,9 @@ jobs:
|
|||
name: server-log-${{ matrix.container }}-${{ matrix.browser }}
|
||||
path: ~/server.log
|
||||
|
||||
check-set-status:
|
||||
name: Set check conclusion
|
||||
check:
|
||||
name: Status Check - Keycloak JavaScript CI
|
||||
if: always()
|
||||
needs:
|
||||
- admin-client
|
||||
- keycloak-js
|
||||
|
@ -276,26 +277,8 @@ jobs:
|
|||
- admin-ui
|
||||
- admin-ui-e2e
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
conclusion: ${{ steps.check.outputs.conclusion }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- id: check
|
||||
uses: ./.github/actions/checks-success
|
||||
|
||||
check:
|
||||
name: Status Check - Keycloak JavaScript CI
|
||||
if: always()
|
||||
needs:
|
||||
- conditional
|
||||
- check-set-status
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Check status
|
||||
uses: ./.github/actions/checks-job-pass
|
||||
- uses: ./.github/actions/status-check
|
||||
with:
|
||||
required: ${{ needs.conditional.outputs.js-ci }}
|
||||
conclusion: ${{ needs.check-set-status.outputs.conclusion }}
|
||||
jobs: ${{ toJSON(needs) }}
|
||||
|
|
29
.github/workflows/operator-ci.yml
vendored
29
.github/workflows/operator-ci.yml
vendored
|
@ -199,35 +199,16 @@ jobs:
|
|||
# Wait for the CRs to be ready
|
||||
./scripts/check-examples-installed.sh
|
||||
|
||||
check-set-status:
|
||||
name: Set check conclusion
|
||||
check:
|
||||
name: Status Check - Keycloak Operator CI
|
||||
if: always()
|
||||
needs:
|
||||
- test-local
|
||||
- test-remote
|
||||
- test-olm
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
conclusion: ${{ steps.check.outputs.conclusion }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- id: check
|
||||
uses: ./.github/actions/checks-success
|
||||
|
||||
check:
|
||||
name: Status Check - Keycloak Operator CI
|
||||
if: always()
|
||||
needs:
|
||||
- conditional
|
||||
- check-set-status
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Check status
|
||||
uses: ./.github/actions/checks-job-pass
|
||||
- uses: ./.github/actions/status-check
|
||||
with:
|
||||
required: ${{ needs.conditional.outputs.operator }}
|
||||
conclusion: ${{ needs.check-set-status.outputs.conclusion }}
|
||||
jobs: ${{ toJSON(needs) }}
|
||||
|
|
Loading…
Reference in a new issue