Pipeline A (MAIN):
make_installer:
stage: make_installer
needs: [build-StandaloneWindows64]
trigger:
project: workgroup/innosetup-build
variables:
CURRENT_BRANCH: ${CI_COMMIT_BRANCH}
This successfully triggers the downstream branch (B).
Pipeline B (Downstream):
stages:
- make_installer
variables:
CI_TOKEN_NAME: $CI_TOKEN_NAME
CI_JOB_TOKEN: $CI_JOB_TOKEN
GIT_URL: $GIT_URL
GIT_DIR: $CI_PROJECT_DIR # this needs to be an absolute path. Defaults to the root of your tree.
GIT_WORK_TREE: C:\gitlab-runner\inno_build
CI_DEBUG_TRACE: "true"
CURRENT_BRANCH: $CURRENT_BRANCH
GIT_SUBMODULE_STRATEGY: none
make_installer:
stage: make_installer
tags:
- gitlab-org
script:
- whoami
- git config --global credential.helper store
- echo "https://${CI_TOKEN_NAME}:${CI_JOB_TOKEN}@${GIT_URL}" > C:\gitlab-runner\gitCredentials
- Remove-Item -Recurse C:\gitlab-runner\patch\${CURRENT_BRANCH}\Installer\*
- C:\"Program Files (x86)"\"Inno Setup 6"\ISCC.exe C:\gitlab-runner\inno_build\Updater-Installer.iss
artifacts:
paths:
- /${CURRENT_BRANCH}/Installer
When B is triggered manually while inputing CURRENT_BRANCH=dev or release: B is successful.
When B is triggered by A, B it fails.
When looking at the logs I noticed that A passes ALL its variables to B, not only CURRENT_BRANCH.
Also, while running B manually, it skipps initializing the submodules but when triggering B with A it wants to update and initialize them. Not sure I understand why since only A has submodules.
Other details:
- this all runs on a selfhosted Gitlab.
- runner A is running on linux container
- runner B is running on windows container
- the user/group for both A and B is the same
- both runner have the tag gitlab-org
- note the error on line 716 in the left pannel (it is when A triggers B)