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

fix: add check for codebuild when updating url #12924

Merged
merged 2 commits into from
Jul 10, 2023

Conversation

goldbez
Copy link
Member

@goldbez goldbez commented Jul 10, 2023

Description of changes

PKG_CLI_CLOUDFRONT_URL is not set in CircleCI. So initially that value was resolving to undefined. Now it will fall into the "else if" and the url will be determined by the hash alone.

Issue #, if available

Description of how you validated changes

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.

@goldbez goldbez requested a review from a team as a code owner July 10, 2023 18:42
@goldbez goldbez merged commit d399855 into aws-amplify:dev Jul 10, 2023
19 of 20 checks passed
Comment on lines 74 to 80

if (process.env.IS_AMPLIFY_CI) {
if (process.env.IS_AMPLIFY_CI && process.env.CODEBUILD_SRC_DIR) {
// use cloudfront distribution for e2e
url = `https://${process.env.PKG_CLI_CLOUDFRONT_URL}/${version}/${compressedBinaryName}`;
} else if (process.env.IS_AMPLIFY_CI) {
url = url.replace('.tgz', `-${getCommitHash()}.tgz`);
}
Copy link
Member

Choose a reason for hiding this comment

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

For future. This should look like

if (IS_AMPLIFY_CI){ 
 if (CODEBUILD) {
 
 } else {
 
 }

}

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.

None yet

4 participants