Windows GitLab Runner is alternating between pipelines
A customer reported that GitLab Runner for Windows is alternating between pipelines. This is their description of what is happening:
We run two pipelines A and B
Gitlab selects pipeline A to run.
Running pipeline A, stage 1
Pipeline B is paused, waiting for the next available runner (we only have one Windows runner)
Pipeline A, stage 1 (passed)
Pausing pipeline A, stage 2
Gitlab jumps to pipeline B
Running pipeline B, stage 1
Pipeline B, stage 1 (passed)
Pausing pipeline B, stage 2
Gitlab jumps back to pipeline A
Running pipeline A, stage 2
I can also replicate this behavior.
Steps to reproduce
GitLab Runner is configured to use Shell executor.
stages: - build - test - package build: stage: build script: - Write-Host "Build Started" - Start-Sleep -s 60 - Write-Host "Build Finished" tags: - windows test: stage: test script: - Write-Host "Test Started" - Start-Sleep -s 60 - Write-Host "Test Finished" tags: - windows package: stage: package script: - Write-Host "Package Started" - Start-Sleep -s 60 - Write-Host "Package Finished" tags: - windows
Run two pipelines. The
build job will run on the first pipeline. After that, it will run the
build job of the second pipeline instead of the
test job of the first pipeline
The first pipeline should finish first before executing jobs from the second pipeline.
I just used the default values when running
gitlab-runner register. I did not change the
Used GitLab Runner version
- Customer is using 12.10.1
- I also noticed this in 13.0.0