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

[ci] Whitelist submodule dev branches for commit-on-dev checks #345

Merged
merged 1 commit into from
Nov 25, 2019

Conversation

jerryz123
Copy link
Contributor

@jerryz123 jerryz123 commented Nov 24, 2019

This works by checking the $CIRCLE_BRANCH env-var, which is set automatically by
CircleCI. Annoyingly, this is set to the name of the source branch for a merge,
rather than the target branch. The behavior of this check for each branch type
is listed:

if CIRCLE_BRANCH == "master":
  This CI run is the nightly CI run for the master branch.
  Make sure all submodules of the master branch point to master
else if CIRCLE_BRANCH == "dev":
  This CI run is most likely somebody doing a dev->master merge.
  Make sure all submodules of the dev branch point to master
else:
  This CI run is likely somebody merging a feature branch into dev.
  Allow submodule pointers of the feature branch to point to master OR dev

…mit checks on dev

This works by checking the $CIRCLE_BRANCH env-var, which is set automatically by
CircleCI. Annoyingly, this is set to the name of the source branch for a merge,
rather than the target branch. The behavior of this check for each branch type
is listed:

if CIRCLE_BRANCH == "master":
  This CI run is the nightly CI run for the master branch.
  Make sure all submodules of the master branch point to master
else if CIRCLE_BRANCH == "dev":
  This CI run is most likely somebody doing a dev->master merge.
  Make sure all submodules of the dev branch point to master
else:
  This CI run is likely somebody merging a feature branch into dev.
  Allow submodule pointers of the dev branch to point to master OR dev
@jerryz123 jerryz123 requested a review from a team November 24, 2019 02:08
@jerryz123 jerryz123 changed the title [ci] Whitelist submodule dev branches for commit-on-master checks [ci] Whitelist submodule dev branches for commit-on-dev checks Nov 24, 2019
Copy link
Contributor

@abejgonzalez abejgonzalez left a comment

Choose a reason for hiding this comment

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

LGTM

@jerryz123 jerryz123 merged commit ef404ef into dev Nov 25, 2019
@jerryz123 jerryz123 deleted the commit-check branch January 22, 2020 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants