The pipeline is having below stage.
- download - It will download project zip file from artifactory depends on the release number
- build - It will compile and deploy the downloaded zip file on runner.
- test - It will execute the tests and upload the result.
To execute the above pipeline, I am having multiple Gitlab runners for each environment ( dev, test, prod) with same tag name e.g. I am having 2 runners in dev environment with tag linux git-runner-dev-1, git-runner-dev-2
Consider, on same time Multiple users trigger the pipeline in dev environment. Then the pipeline execution get started. But the entire pipeline will not get executed on same runner. For each stage it will select the runner which is available and thats why I am not getting the required output from the pipeline. I want to execute the entire pipeline on same runner which starts the execution of download stage.
Below sample yml file has been given for the reference.
stages:
- download
- build
- test
download:
stage: download
script:
- echo "===== Download starts ====="
- echo "===== Download Ends ====="
tags:
- linux
build:
stage: build
script:
- echo "===== Build starts ====="
- echo "===== Build Ends ====="
tags:
- linux
test:
stage: test
script:
- echo "===== Test starts ====="
- echo "===== Test Ends ====="
tags:
- linux