Robert Chandler
03/27/2022, 9:00 PMSEED_BRANCH
environment variable be the source or target branch for an auto deployed gitlab MR? I had expected it to be the source branch but it seems to be "master" when I echo it in the post-deploy phase - is this a bug or a feature? 🐛/🦋Robert Chandler
03/28/2022, 7:59 PMAkos
03/30/2022, 1:43 PMSEED_STAGE_BRANCH
environment variable to see if that's the branch you expect it to be?
According to the docs: https://seed.run/docs/adding-a-build-spec#build-environment-variables that envvar should contain the branch name that's being auto-deployed from:
• The name of the git branch the stage is auto-deployed from. If the stage is not auto-deployed, the value is not defined.
Akos
03/30/2022, 1:44 PMSEED_BRANCH
For PR stages, this is the branch the PR was submitted to.I'm fairly certain
SEED_STAGE_BRANCH
will work for you.Robert Chandler
03/30/2022, 3:46 PMSEED_STAGE_BRANCH
is undefined. After re-reading the docs it does seem like it is indeed a features that the SEED_BRANCH
env var is the target branch not the source branch. In which case it seems like it's not possible to get the source branch name for an auto-deployed PR branch . Other options include triggering the deployment manually from gitlab ci, using the commit id or switching to githubFrank
SEED_PULL_REQUEST_SOURCE_BRANCH
SEED_PULL_REQUEST_TARGET_BRANCH
They hold the value for the source and target branch names.Robert Chandler
04/06/2022, 3:26 PMRobert Chandler
04/06/2022, 3:32 PMFrank
Frank
Robert Chandler
04/11/2022, 7:20 PMRobert Chandler
04/11/2022, 7:22 PM