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: CodeBuild build errors when branch is not 'master' #10868

Merged
merged 8 commits into from
Oct 15, 2020

Conversation

nija-at
Copy link
Contributor

@nija-at nija-at commented Oct 14, 2020

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

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.
@nija-at nija-at requested a review from iliapolo October 14, 2020 15:10
@nija-at nija-at self-assigned this Oct 14, 2020
@gitpod-io
Copy link

gitpod-io bot commented Oct 14, 2020

@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Oct 14, 2020
@nija-at nija-at requested a review from rix0rrr October 14, 2020 15:48
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
Copy link
Contributor

@rix0rrr rix0rrr Oct 14, 2020

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Agree.

@gitpod-io
Copy link

gitpod-io bot commented Oct 15, 2020

@mergify
Copy link
Contributor

mergify bot commented Oct 15, 2020

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).

@mergify
Copy link
Contributor

mergify bot commented Oct 15, 2020

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).

@mergify mergify bot merged commit 5f164af into master Oct 15, 2020
@mergify mergify bot deleted the nija-at/skip-bump branch October 15, 2020 11:04
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 1c22030
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

njlynch added a commit that referenced this pull request Oct 15, 2020
Build is failing with:
"/bin/bash: ./bump-candidate.sh: No such file or directory"

Failure caused by script move in #10868.
mergify bot pushed a commit that referenced this pull request Oct 15, 2020
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*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants