-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #275 from fingerprintjs/ci/release_code_pipeline_auth
ci: restructure status check flow
- Loading branch information
Showing
6 changed files
with
60 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: AWS E2E | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- rc | ||
paths-ignore: | ||
- '**.md' | ||
- 'cloudformation/*.yml' | ||
|
||
permissions: | ||
id-token: write # This is required for requesting the JWT | ||
contents: read # This is required for actions/checkout | ||
|
||
jobs: | ||
RunE2E: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Git clone | ||
uses: actions/checkout@v4 | ||
- name: configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
role-to-assume: {{secrets.AWS_E2E_ROLE_ARN}} | ||
aws-region: {{secrets.AWS_E2E_REGION}} | ||
- name: Trigger AWS CodePipeline | ||
run: | | ||
codepipeline_execution_id=$(aws codepipeline start-pipeline-execution --name {{secrets.AWS_E2E_CODEPIPELINE_NAME}} --query 'pipelineExecutionId' --output text) | ||
echo "Pipeline execution ID: $codepipeline_execution_id" | ||
echo "codepipeline_execution_id=$codepipeline_execution_id" >> $GITHUB_ENV | ||
- name: Poll Pipeline Status | ||
id: poll-status | ||
run: | | ||
while true; do | ||
sleep 30 | ||
status=$(aws codepipeline get-pipeline-execution \ | ||
--pipeline-name necipallef_cloudfront \ | ||
--pipeline-execution-id ${{ env.codepipeline_execution_id }} \ | ||
--query 'pipelineExecution.status' --output text) | ||
echo "Current pipeline status: $status" | ||
if [[ "$status" == "Succeeded" ]]; then | ||
echo "Pipeline execution succeeded!" | ||
exit 0 | ||
elif [[ "$status" == "Failed" ]]; then | ||
echo "Pipeline execution failed!" | ||
exit 1 | ||
fi | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters