-
Notifications
You must be signed in to change notification settings - Fork 4k
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: CodeBuild build errors when branch is not 'master' #10868
Conversation
The problem is that the shell conditional added returns a non-zero exit code when the branch is not 'master'. Switch strategies so that the environment variable comparison is actually done at deploy time and sets a final environment variable.
buildspec.yaml
Outdated
# we bump here so that our master version won't be identical to the latest published version during tests. | ||
# otherwise this causes problems with verdaccio mirroring. | ||
- '[ ${GIT_BRANCH} = ${REGRESSION_TESTS_BRANCH} ] && /bin/bash ./bump-candidate.sh' | ||
- /bin/bash ./scripts/bump-candidate.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather keep the flag visible in the buildspec.
The actual problem here is the &&
. We should replace this with if ${BUMP_CANDIDATE:-false}; then ./bump-candidate.sh; fi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree.
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Build is failing with: "/bin/bash: ./bump-candidate.sh: No such file or directory" Failure caused by script move in #10868.
Build is failing with: "/bin/bash: ./bump-candidate.sh: No such file or directory" Failure caused by script move in #10868. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
The problem is that the shell conditional added returns a non-zero exit
code when the branch is not 'master'.
Switch strategies so that the environment variable comparison is
actually done at deploy time and sets a final environment variable.
Corresponding change: https://github.com/aws/cdk-ops/pull/758
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license