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:
|
with:
|
||||||
job-name: Migration Tests
|
job-name: Migration Tests
|
||||||
|
|
||||||
check-set-status:
|
check:
|
||||||
name: Set check conclusion
|
name: Status Check - Keycloak CI
|
||||||
|
if: always()
|
||||||
needs:
|
needs:
|
||||||
- unit-tests
|
- unit-tests
|
||||||
- base-integration-tests
|
- base-integration-tests
|
||||||
|
@ -591,28 +592,8 @@ jobs:
|
||||||
- sssd-unit-tests
|
- sssd-unit-tests
|
||||||
- migration-tests
|
- migration-tests
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
|
||||||
conclusion: ${{ steps.check.outputs.conclusion }}
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
- uses: ./.github/actions/status-check
|
||||||
- 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
|
|
||||||
with:
|
with:
|
||||||
required: ${{ needs.conditional.outputs.ci }}
|
jobs: ${{ toJSON(needs) }}
|
||||||
conclusion: ${{ needs.check-set-status.outputs.conclusion }}
|
|
||||||
|
|
24
.github/workflows/codeql-analysis.yml
vendored
24
.github/workflows/codeql-analysis.yml
vendored
|
@ -60,9 +60,6 @@ jobs:
|
||||||
env:
|
env:
|
||||||
CODEQL_ACTION_EXTRA_OPTIONS: '{"database":{"interpret-results":["--max-paths",0]}}'
|
CODEQL_ACTION_EXTRA_OPTIONS: '{"database":{"interpret-results":["--max-paths",0]}}'
|
||||||
|
|
||||||
- id: check
|
|
||||||
uses: ./.github/actions/checks-success
|
|
||||||
|
|
||||||
themes:
|
themes:
|
||||||
name: CodeQL Themes
|
name: CodeQL Themes
|
||||||
needs: conditional
|
needs: conditional
|
||||||
|
@ -89,26 +86,15 @@ jobs:
|
||||||
env:
|
env:
|
||||||
CODEQL_ACTION_EXTRA_OPTIONS: '{"database":{"interpret-results":["--max-paths",0]}}'
|
CODEQL_ACTION_EXTRA_OPTIONS: '{"database":{"interpret-results":["--max-paths",0]}}'
|
||||||
|
|
||||||
- id: check
|
|
||||||
uses: ./.github/actions/checks-success
|
|
||||||
|
|
||||||
check:
|
check:
|
||||||
name: Status Check - CodeQL
|
name: Status Check - CodeQL
|
||||||
if: always()
|
if: always()
|
||||||
needs: [conditional, java, themes]
|
needs:
|
||||||
|
- java
|
||||||
|
- themes
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
- uses: ./.github/actions/status-check
|
||||||
- name: CodeQL Java
|
|
||||||
uses: ./.github/actions/checks-job-pass
|
|
||||||
with:
|
with:
|
||||||
required: ${{ needs.conditional.outputs.java }}
|
jobs: ${{ toJSON(needs) }}
|
||||||
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 }}
|
|
||||||
|
|
25
.github/workflows/documentation.yml
vendored
25
.github/workflows/documentation.yml
vendored
|
@ -98,33 +98,14 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
./mvnw test -Dtest=ExternalLinksTest -am -pl docs/documentation/tests,docs/documentation/dist -nsu -B -e -Pdocumentation
|
./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:
|
check:
|
||||||
name: Status Check - Keycloak Documentation
|
name: Status Check - Keycloak Documentation
|
||||||
if: always()
|
if: always()
|
||||||
needs:
|
needs:
|
||||||
- conditional
|
- build
|
||||||
- check-set-status
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
- uses: ./.github/actions/status-check
|
||||||
- name: Check status
|
|
||||||
uses: ./.github/actions/checks-job-pass
|
|
||||||
with:
|
with:
|
||||||
required: ${{ needs.conditional.outputs.documentation == 'true' }}
|
jobs: ${{ toJSON(needs) }}
|
||||||
conclusion: ${{ needs.check-set-status.outputs.conclusion }}
|
|
25
.github/workflows/guides.yml
vendored
25
.github/workflows/guides.yml
vendored
|
@ -45,33 +45,14 @@ jobs:
|
||||||
- name: Build Keycloak
|
- name: Build Keycloak
|
||||||
uses: ./.github/actions/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:
|
check:
|
||||||
name: Status Check - Keycloak Guides
|
name: Status Check - Keycloak Guides
|
||||||
if: always()
|
if: always()
|
||||||
needs:
|
needs:
|
||||||
- conditional
|
- build
|
||||||
- check-set-status
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
- uses: ./.github/actions/status-check
|
||||||
- name: Check status
|
|
||||||
uses: ./.github/actions/checks-job-pass
|
|
||||||
with:
|
with:
|
||||||
required: ${{ needs.conditional.outputs.guides == 'true' && needs.conditional.outputs.ci != 'true' }}
|
jobs: ${{ toJSON(needs) }}
|
||||||
conclusion: ${{ needs.check-set-status.outputs.conclusion }}
|
|
||||||
|
|
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 }}
|
name: server-log-${{ matrix.container }}-${{ matrix.browser }}
|
||||||
path: ~/server.log
|
path: ~/server.log
|
||||||
|
|
||||||
check-set-status:
|
check:
|
||||||
name: Set check conclusion
|
name: Status Check - Keycloak JavaScript CI
|
||||||
|
if: always()
|
||||||
needs:
|
needs:
|
||||||
- admin-client
|
- admin-client
|
||||||
- keycloak-js
|
- keycloak-js
|
||||||
|
@ -276,26 +277,8 @@ jobs:
|
||||||
- admin-ui
|
- admin-ui
|
||||||
- admin-ui-e2e
|
- admin-ui-e2e
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
|
||||||
conclusion: ${{ steps.check.outputs.conclusion }}
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
- uses: ./.github/actions/status-check
|
||||||
- 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
|
|
||||||
with:
|
with:
|
||||||
required: ${{ needs.conditional.outputs.js-ci }}
|
jobs: ${{ toJSON(needs) }}
|
||||||
conclusion: ${{ needs.check-set-status.outputs.conclusion }}
|
|
||||||
|
|
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
|
# Wait for the CRs to be ready
|
||||||
./scripts/check-examples-installed.sh
|
./scripts/check-examples-installed.sh
|
||||||
|
|
||||||
check-set-status:
|
check:
|
||||||
name: Set check conclusion
|
name: Status Check - Keycloak Operator CI
|
||||||
|
if: always()
|
||||||
needs:
|
needs:
|
||||||
- test-local
|
- test-local
|
||||||
- test-remote
|
- test-remote
|
||||||
- test-olm
|
- test-olm
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
|
||||||
conclusion: ${{ steps.check.outputs.conclusion }}
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
- uses: ./.github/actions/status-check
|
||||||
- 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
|
|
||||||
with:
|
with:
|
||||||
required: ${{ needs.conditional.outputs.operator }}
|
jobs: ${{ toJSON(needs) }}
|
||||||
conclusion: ${{ needs.check-set-status.outputs.conclusion }}
|
|
||||||
|
|
Loading…
Reference in a new issue