Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cleanup step for new comment-updating strategy #38

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/pipelines-delegated.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,23 @@ jobs:
terragrunt_command: ${{ steps.bootstrap.outputs.terragrunt_command }}
additional_data: ${{ steps.bootstrap.outputs.additional_data }}
child_account_id: ${{ steps.bootstrap.outputs.child_account_id }}

pipelines_cleanup:
name: "Pipelines Matrix Cleanup"
needs: [detect_changes, pipelines_determine]
runs-on: ${{ fromJSON(inputs.runner) }}
steps:
- name: Checkout Pipelines Actions
uses: actions/checkout@v4
with:
path: pipelines-actions
repository: gruntwork-io/pipelines-actions
ref: ${{ env.PIPELINES_ACTIONS_VERSION }}
token: ${{ secrets.PIPELINES_READ_TOKEN }}

- name: Update comment
# The idea here is that there is a race condition in the updating of the jobs in the matrix:
# if one job is uploading its state artifact WHILST another is downloading, then the downloader
# will miss the state update from the uploader, and if the downloader is the last job, there's nobody
# to come later and grab the uploader's update.
uses: ./pipelines-actions/.github/actions/pipelines-status-update
22 changes: 21 additions & 1 deletion .github/workflows/pipelines-root.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ on:

env:
PIPELINES_CLI_VERSION: v0.10.1
PIPELINES_ACTIONS_VERSION: v1.3.3
PIPELINES_ACTIONS_VERSION: mutexspike
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO - Update once actions PR (https://github.com/gruntwork-io/pipelines-actions/pull/24) is merged

BOILERPLATE_VERSION: v0.5.16
GRUNTWORK_INSTALLER_VERSION: v0.0.40

Expand Down Expand Up @@ -268,3 +268,23 @@ jobs:
access_control_pull_request_url: ${{ steps.access_control_pr.outputs.pull_request_url }}
PIPELINES_READ_TOKEN: ${{ secrets.PIPELINES_READ_TOKEN }}
ORG_REPO_ADMIN_TOKEN: ${{ secrets.ORG_REPO_ADMIN_TOKEN }}

pipelines_cleanup:
name: "Pipelines Matrix Cleanup"
needs: [detect_changes, pipelines_determine]
runs-on: ${{ fromJSON(inputs.runner) }}
steps:
- name: Checkout Pipelines Actions
uses: actions/checkout@v4
with:
path: pipelines-actions
repository: gruntwork-io/pipelines-actions
ref: ${{ env.PIPELINES_ACTIONS_VERSION }}
token: ${{ secrets.PIPELINES_READ_TOKEN }}

- name: Update comment
# The idea here is that there is a race condition in the updating of the jobs in the matrix:
# if one job is uploading its state artifact WHILST another is downloading, then the downloader
# will miss the state update from the uploader, and if the downloader is the last job, there's nobody
# to come later and grab the uploader's update.
uses: ./pipelines-actions/.github/actions/pipelines-status-update