Allow using updated CircleCi without rebasing PRs#7770
Allow using updated CircleCi without rebasing PRs#7770dlang-bot merged 1 commit intodlang:masterfrom
Conversation
|
Thanks for your pull request, @wilzbach! Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. |
660f259 to
bb172bc
Compare
|
Looking closer at the log of https://circleci.com/gh/dlang/dmd/9422 - the problem seems to be that for old PRs CIRCLE_STAGE is set to "build": |
| # Defined by old, existing PRs | ||
| # Added to avoid needing to rebase them | ||
| build) | ||
| ;& |
There was a problem hiding this comment.
From https://circleci.com/gh/dlang/dmd/9422:
Using build environment variables:
BASH_ENV=/tmp/.bash_env-5a68c715c9e77c00017dcb69-0-build
CI=true
CIRCLECI=true
CIRCLE_BRANCH=pull/7769
CIRCLE_BUILD_NUM=9422
CIRCLE_BUILD_URL=https://circleci.com/gh/dlang/dmd/9422
CIRCLE_COMPARE_URL=
CIRCLE_JOB=build
CIRCLE_NODE_INDEX=0
CIRCLE_NODE_TOTAL=2
CIRCLE_PREVIOUS_BUILD_NUM=9415
CIRCLE_PROJECT_REPONAME=dmd
CIRCLE_PROJECT_USERNAME=dlang
CIRCLE_PR_NUMBER=7769
CIRCLE_PR_REPONAME=dmd
CIRCLE_PR_USERNAME=ntrel
CIRCLE_PULL_REQUEST=https://github.com/dlang/dmd/pull/7769
CIRCLE_PULL_REQUESTS=https://github.com/dlang/dmd/pull/7769
CIRCLE_REPOSITORY_URL=git@github.com:dlang/dmd.git
CIRCLE_SHA1=554828455a3e5651d0e1c1379a7f0daa6b93e615
CIRCLE_SHELL_ENV=/tmp/.bash_env-5a68c715c9e77c00017dcb69-0-build
CIRCLE_STAGE=build
;& is the bash fall-through for switch cases. It's already used at the end of this script.
There was a problem hiding this comment.
FYI this is due to CircleCi being the only CI who doesn't merge a PR with its target branch. We have to do that manually and hence the YAML doesn't get updated as its read initially before the bash scripts are run.
So the "old" PRs are based on this config: https://github.com/dlang/dmd/blob/c4d0269dd434068230a4f83eb9d8137fa0147133/.circleci/config.yml which defines build
The CircleCi setup was updated in #7420
This leads to
MODELbeing undefined as noCIRCLECI_STAGEis defined.As the
circleci.ymlis only read once in the beginning, PRs would be need tobe rebased for it to take effect.
This change avoids the need to rebase existing PRs.
(this is a bit hard to test - it's based on the error message in #7769)