mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 17:50:20 +00:00
Pull in new retry logic from master
This commit is contained in:
parent
fcb47925e8
commit
461e41fc11
7 changed files with 47 additions and 246 deletions
37
.github/workflows/ci.yml
vendored
37
.github/workflows/ci.yml
vendored
|
@ -635,40 +635,3 @@ jobs:
|
|||
retention-days: 7
|
||||
if-no-files-found: error
|
||||
include-hidden-files: true
|
||||
|
||||
set-pipeline-exit-status:
|
||||
# This step is just so we can make github require this step, to pass checks
|
||||
# on a pull request instead of requiring all
|
||||
name: Set the ${{ github.workflow }} Pipeline Exit Status
|
||||
if: always()
|
||||
runs-on: ubuntu-22.04
|
||||
needs:
|
||||
- prepare-workflow
|
||||
- pre-commit
|
||||
- lint
|
||||
- nsis-tests
|
||||
- build-docs
|
||||
- build-deps-onedir
|
||||
- build-salt-onedir
|
||||
- combine-all-code-coverage
|
||||
- build-ci-deps
|
||||
- test-packages
|
||||
- test
|
||||
steps:
|
||||
- name: Get workflow information
|
||||
id: get-workflow-info
|
||||
uses: im-open/workflow-conclusion@v2
|
||||
|
||||
- name: Set Pipeline Exit Status
|
||||
shell: bash
|
||||
run: |
|
||||
if [ "${{ steps.get-workflow-info.outputs.workflow_conclusion }}" != "success" ]; then
|
||||
exit 1
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
|
||||
- name: Done
|
||||
if: always()
|
||||
run:
|
||||
echo "All worflows finished"
|
||||
|
|
40
.github/workflows/nightly.yml
vendored
40
.github/workflows/nightly.yml
vendored
|
@ -584,43 +584,3 @@ jobs:
|
|||
default-timeout: 360
|
||||
matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['test-matrix']) }}
|
||||
linux_arm_runner: ${{ fromJSON(needs.prepare-workflow.outputs.config)['linux_arm_runner'] }}
|
||||
|
||||
set-pipeline-exit-status:
|
||||
# This step is just so we can make github require this step, to pass checks
|
||||
# on a pull request instead of requiring all
|
||||
name: Set the ${{ github.workflow }} Pipeline Exit Status
|
||||
if: always()
|
||||
runs-on: ubuntu-22.04
|
||||
environment: nightly
|
||||
needs:
|
||||
- workflow-requirements
|
||||
- trigger-branch-nightly-builds
|
||||
- prepare-workflow
|
||||
- pre-commit
|
||||
- lint
|
||||
- nsis-tests
|
||||
- build-docs
|
||||
- build-deps-onedir
|
||||
- build-salt-onedir
|
||||
- build-pkgs-src
|
||||
- build-ci-deps
|
||||
- test-packages
|
||||
- test
|
||||
steps:
|
||||
- name: Get workflow information
|
||||
id: get-workflow-info
|
||||
uses: im-open/workflow-conclusion@v2
|
||||
|
||||
- name: Set Pipeline Exit Status
|
||||
shell: bash
|
||||
run: |
|
||||
if [ "${{ steps.get-workflow-info.outputs.workflow_conclusion }}" != "success" ]; then
|
||||
exit 1
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
|
||||
- name: Done
|
||||
if: always()
|
||||
run:
|
||||
echo "All worflows finished"
|
||||
|
|
41
.github/workflows/release.yml
vendored
41
.github/workflows/release.yml
vendored
|
@ -418,44 +418,3 @@ jobs:
|
|||
TWINE_PASSWORD: "${{ steps.get-secrets.outputs.twine-password }}"
|
||||
run: |
|
||||
tools pkg pypi-upload artifacts/release/salt-${{ needs.prepare-workflow.outputs.salt-version }}.tar.gz
|
||||
|
||||
set-pipeline-exit-status:
|
||||
# This step is just so we can make github require this step, to pass checks
|
||||
# on a pull request instead of requiring all
|
||||
name: Set the ${{ github.workflow }} Pipeline Exit Status
|
||||
if: always()
|
||||
runs-on: ubuntu-22.04
|
||||
needs:
|
||||
- check-requirements
|
||||
- prepare-workflow
|
||||
- publish-repositories
|
||||
- release
|
||||
- publish-pypi
|
||||
- build-ci-deps
|
||||
steps:
|
||||
- name: Get workflow information
|
||||
id: get-workflow-info
|
||||
uses: im-open/workflow-conclusion@v2
|
||||
|
||||
- run: |
|
||||
# shellcheck disable=SC2129
|
||||
if [ "${{ steps.get-workflow-info.outputs.conclusion }}" != "success" ]; then
|
||||
echo 'To restore the release bucket run:' >> "${GITHUB_STEP_SUMMARY}"
|
||||
echo '```' >> "${GITHUB_STEP_SUMMARY}"
|
||||
echo 'tools pkg repo restore-previous-releases' >> "${GITHUB_STEP_SUMMARY}"
|
||||
echo '```' >> "${GITHUB_STEP_SUMMARY}"
|
||||
fi
|
||||
|
||||
- name: Set Pipeline Exit Status
|
||||
shell: bash
|
||||
run: |
|
||||
if [ "${{ steps.get-workflow-info.outputs.workflow_conclusion }}" != "success" ]; then
|
||||
exit 1
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
|
||||
- name: Done
|
||||
if: always()
|
||||
run:
|
||||
echo "All worflows finished"
|
||||
|
|
38
.github/workflows/scheduled.yml
vendored
38
.github/workflows/scheduled.yml
vendored
|
@ -545,41 +545,3 @@ jobs:
|
|||
default-timeout: 360
|
||||
matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['test-matrix']) }}
|
||||
linux_arm_runner: ${{ fromJSON(needs.prepare-workflow.outputs.config)['linux_arm_runner'] }}
|
||||
|
||||
set-pipeline-exit-status:
|
||||
# This step is just so we can make github require this step, to pass checks
|
||||
# on a pull request instead of requiring all
|
||||
name: Set the ${{ github.workflow }} Pipeline Exit Status
|
||||
if: always()
|
||||
runs-on: ubuntu-22.04
|
||||
needs:
|
||||
- workflow-requirements
|
||||
- trigger-branch-scheduled-builds
|
||||
- prepare-workflow
|
||||
- pre-commit
|
||||
- lint
|
||||
- nsis-tests
|
||||
- build-docs
|
||||
- build-deps-onedir
|
||||
- build-salt-onedir
|
||||
- build-ci-deps
|
||||
- test-packages
|
||||
- test
|
||||
steps:
|
||||
- name: Get workflow information
|
||||
id: get-workflow-info
|
||||
uses: im-open/workflow-conclusion@v2
|
||||
|
||||
- name: Set Pipeline Exit Status
|
||||
shell: bash
|
||||
run: |
|
||||
if [ "${{ steps.get-workflow-info.outputs.workflow_conclusion }}" != "success" ]; then
|
||||
exit 1
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
|
||||
- name: Done
|
||||
if: always()
|
||||
run:
|
||||
echo "All worflows finished"
|
||||
|
|
39
.github/workflows/staging.yml
vendored
39
.github/workflows/staging.yml
vendored
|
@ -680,42 +680,3 @@ jobs:
|
|||
salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
|
||||
matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['artifact-matrix']) }}
|
||||
build-matrix: ${{ toJSON(fromJSON(needs.prepare-workflow.outputs.config)['build-matrix']) }}
|
||||
|
||||
set-pipeline-exit-status:
|
||||
# This step is just so we can make github require this step, to pass checks
|
||||
# on a pull request instead of requiring all
|
||||
name: Set the ${{ github.workflow }} Pipeline Exit Status
|
||||
if: always()
|
||||
runs-on: ubuntu-22.04
|
||||
needs:
|
||||
- check-requirements
|
||||
- prepare-workflow
|
||||
- pre-commit
|
||||
- lint
|
||||
- nsis-tests
|
||||
- build-docs
|
||||
- build-deps-onedir
|
||||
- build-salt-onedir
|
||||
- build-pkgs-src
|
||||
- upload-release-artifacts
|
||||
- publish-pypi
|
||||
- test-packages
|
||||
- test
|
||||
steps:
|
||||
- name: Get workflow information
|
||||
id: get-workflow-info
|
||||
uses: im-open/workflow-conclusion@v2
|
||||
|
||||
- name: Set Pipeline Exit Status
|
||||
shell: bash
|
||||
run: |
|
||||
if [ "${{ steps.get-workflow-info.outputs.workflow_conclusion }}" != "success" ]; then
|
||||
exit 1
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
|
||||
- name: Done
|
||||
if: always()
|
||||
run:
|
||||
echo "All worflows finished"
|
||||
|
|
51
.github/workflows/templates/layout.yml.jinja
vendored
51
.github/workflows/templates/layout.yml.jinja
vendored
|
@ -321,54 +321,3 @@ jobs:
|
|||
<%- endif %>
|
||||
|
||||
<%- endblock jobs %>
|
||||
|
||||
set-pipeline-exit-status:
|
||||
# This step is just so we can make github require this step, to pass checks
|
||||
# on a pull request instead of requiring all
|
||||
name: Set the ${{ github.workflow }} Pipeline Exit Status
|
||||
if: always()
|
||||
runs-on: ubuntu-22.04
|
||||
<%- if workflow_slug == "nightly" %>
|
||||
environment: <{ workflow_slug }>
|
||||
<%- endif %>
|
||||
needs:
|
||||
<%- for need in prepare_workflow_needs.iter(consume=True) %>
|
||||
- <{ need }>
|
||||
<%- endfor %>
|
||||
<%- for need in conclusion_needs.iter(consume=True) %>
|
||||
- <{ need }>
|
||||
<%- endfor %>
|
||||
<%- for need in test_salt_needs.iter(consume=False) %>
|
||||
- <{ need }>
|
||||
<%- endfor %>
|
||||
<%- for need in test_salt_pkg_needs.iter(consume=False) %>
|
||||
- <{ need }>
|
||||
<%- endfor %>
|
||||
<%- for need in test_repo_needs.iter(consume=True) %>
|
||||
- <{ need }>
|
||||
<%- endfor %>
|
||||
<%- if workflow_slug != "release" %>
|
||||
- test-packages
|
||||
- test
|
||||
<%- endif %>
|
||||
steps:
|
||||
- name: Get workflow information
|
||||
id: get-workflow-info
|
||||
uses: im-open/workflow-conclusion@v2
|
||||
|
||||
<%- block set_pipeline_exit_status_extra_steps %>
|
||||
<%- endblock set_pipeline_exit_status_extra_steps %>
|
||||
|
||||
- name: Set Pipeline Exit Status
|
||||
shell: bash
|
||||
run: |
|
||||
if [ "${{ steps.get-workflow-info.outputs.workflow_conclusion }}" != "success" ]; then
|
||||
exit 1
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
|
||||
- name: Done
|
||||
if: always()
|
||||
run:
|
||||
echo "All worflows finished"
|
||||
|
|
47
.github/workflows/workflow-finished.yml
vendored
Normal file
47
.github/workflows/workflow-finished.yml
vendored
Normal file
|
@ -0,0 +1,47 @@
|
|||
name: Workflow Finished
|
||||
run-name: Workflow ${{ github.event.workflow.name }} Finished
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows:
|
||||
- CI
|
||||
types:
|
||||
- completed
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: read
|
||||
actions: write
|
||||
|
||||
jobs:
|
||||
|
||||
show-context:
|
||||
name: Show Github Context
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: event
|
||||
env:
|
||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
||||
run: |
|
||||
echo "$GITHUB_CONTEXT"
|
||||
on-failure:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.workflow_run.conclusion == 'failure' && github.event.workflow_run.run_attempt < 5 }}
|
||||
steps:
|
||||
- run: |
|
||||
gh run rerun ${{ github.event.workflow_run.id }} --failed
|
||||
# Branch protection rules require this to run with exit code 0.
|
||||
set-pipeline-exit-status:
|
||||
name: Set the ${{ github.event.workflow.name }} Pipeline Exit Status
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event.workflow_run.run_attempt >= 5 }}
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- show-context
|
||||
- on-failure
|
||||
steps:
|
||||
- run:
|
||||
if [ "${{ github.event.workflow_run.conclusion }}" != "success" ]; then
|
||||
exit 1
|
||||
else
|
||||
exit 0
|
||||
fi
|
Loading…
Add table
Reference in a new issue