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

chore: log source version in e2e build log #13735

Closed
wants to merge 15 commits into from

Conversation

0618
Copy link
Contributor

@0618 0618 commented Apr 24, 2024

There are several ways to trigger e2e tests:

  1. manually trigger it in a PR
  2. e2e test branch
  3. dev branch after a PR is merged

In order to know the status of the repo, we need to be notified timely when e2e test fails after a merge. So, we need to have a way to differentiate 3) from 1) and 2).

This PR is to add echos to log some infomation so that we'll be able to know in the builds log:

  1. how the build is triggered
  2. if the build was success

We the 2 info above, Cloudwatch is able to filter the datapoints and create a new metric so that we can set alarm from the metric.

Description of changes

Log CODEBUILD_WEBHOOK_TRIGGER and CODEBUILD_BUILD_SUCCEEDING in very e2e test build log.

Issue #, if available

Description of how you validated changes

Verified in CodeBuild and created a metric using the data.

image

Checklist

  • PR description included
  • yarn test passes
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)
  • New AWS SDK calls or CloudFormation actions have been added to relevant test and service IAM policies
  • Pull request labels are added

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@0618 0618 marked this pull request as ready for review April 25, 2024 20:44
@0618 0618 requested a review from a team as a code owner April 25, 2024 20:44
@@ -11,12 +11,17 @@ phases:
- cd ..
- source ./shared-scripts.sh && _downloadReportsFromS3 $CODEBUILD_SOURCE_VERSION
- mkdir artifacts && echo "empty artifact" > artifacts/empty-artifact.txt
post_build:
commands:
- echo $PROJECT_NAME
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had to write the repetitive code because after I used shared_script.sh in f0a4fcc, some builds couldn't find the file.

@0618 0618 closed this Apr 25, 2024
@0618 0618 mentioned this pull request Apr 25, 2024
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant