Skip to content

Commit

Permalink
chore: fix failed pre_build step status submission
Browse files Browse the repository at this point in the history
  • Loading branch information
ilfa committed Dec 19, 2023
1 parent b4c6ebf commit 1ba005c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions buildspec-e2e-rc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ phases:
- cd e2e/infra/cloudfront && pulumi stack init e2e && pulumi stack select e2e && cd ../../..
- cd e2e/infra && yarn lambda:up && yarn lambda:export && yarn cloudfront:up && yarn cloudfront:export && cd ../..
finally:
- export STATUS=$(sh ./e2e/scripts/get-codebuild-status.sh)
- echo $STATUS
- |
if [ "$CODEBUILD_BUILD_SUCCEEDING" -eq 0 ]; then
curl \
Expand All @@ -46,7 +44,7 @@ phases:
-H "Authorization: Bearer $GITHUB_TOKEN"\
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/fingerprintjs/fingerprint-pro-cloudfront-integration/statuses/$COMMIT_ID \
-d "{\"state\":\"$STATUS\",\"target_url\":\"https://us-east-1.console.aws.amazon.com/codesuite/codebuild/708050157146/projects/fpjs-dev-cloudfront-lambda-e2e-tests/build/$CODEBUILD_BUILD_ID/?region=us-east-1\",\"description\":\"E2E tests for release failed during the pre-build step\",\"context\":\"e2e-release\"}"
-d "{\"state\":\"error\",\"target_url\":\"https://us-east-1.console.aws.amazon.com/codesuite/codebuild/708050157146/projects/fpjs-dev-cloudfront-lambda-e2e-tests/build/$CODEBUILD_BUILD_ID/?region=us-east-1\",\"description\":\"E2E tests for release failed during the pre-build step\",\"context\":\"e2e-release\"}"
fi
build:
commands:
Expand Down
4 changes: 1 addition & 3 deletions buildspec-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ phases:
- cd infra/cloudfront && pulumi stack init e2e && pulumi stack select e2e && cd ../../
- cd infra && yarn lambda:up && yarn lambda:export && yarn cloudfront:up && yarn cloudfront:export && cd ../
finally:
- export STATUS=$(sh ./e2e/scripts/get-codebuild-status.sh)
- echo $STATUS
- |
if [ "$CODEBUILD_BUILD_SUCCEEDING" -eq 0 ]; then
curl \
Expand All @@ -42,7 +40,7 @@ phases:
-H "Authorization: Bearer $GITHUB_TOKEN"\
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/fingerprintjs/fingerprint-pro-cloudfront-integration/statuses/$COMMIT_SHA \
-d "{\"state\":\"$STATUS\",\"target_url\":\"https://us-east-1.console.aws.amazon.com/codesuite/codebuild/708050157146/projects/fpjs-dev-cloudfront-lambda-e2e-tests/build/$CODEBUILD_BUILD_ID/?region=us-east-1\",\"description\":\"E2E tests failed during the pre-build step\",\"context\":\"e2e\"}"
-d "{\"state\":\"error\",\"target_url\":\"https://us-east-1.console.aws.amazon.com/codesuite/codebuild/708050157146/projects/fpjs-dev-cloudfront-lambda-e2e-tests/build/$CODEBUILD_BUILD_ID/?region=us-east-1\",\"description\":\"E2E tests failed during the pre-build step\",\"context\":\"e2e\"}"
fi
build:
commands:
Expand Down

0 comments on commit 1ba005c

Please sign in to comment.