Manual job depending on another manual job: Dependency is ignored
We have a testing and a deploy job which should run for scheduled (nightly) builds only. However, to be able to trigger them manually as well (in case you are interested for a specific branch), we also have them as manual job.
The deployment job should depend on the testing job, i.e. it should not be possible to deploy something which was not tested. However, the manual deployment job ignores the state of the testing job.
I have a CI yaml similar to this one:
stages:
- build
- test
- deploy
BuildJob:
stage: build
tags:
- docker
script:
- echo "building"
#
# Test stage
#
TestJob-manual:
extends: .TestJob-template
when: manual
TestJob-scheduled:
extends: .TestJob-template
only:
- schedules
.TestJob-template:
stage: test
tags:
- docker
script:
- echo "testing"
#
# Deploy stage
#
DeployJob-manual:
extends: .DeployJob-template
when: manual
dependencies:
- TestJob-manual
DeployJob-scheduled:
extends: .DeployJob-template
only:
- schedules
dependencies:
- TestJob-scheduled
.DeployJob-template:
stage: deploy
tags:
- docker
script:
- echo "deploying"
When pressing on play on the deployment job, I got no "dependency missing" error but the job just ran through
What is the current bug behavior?
The deployment job runs trough without the testing job being called
What is the expected correct behavior?
When pressing "Play" for the deployment job, either
A) The deployment job fails with a "dependencies missing" error
or (the preferred way):
B) The testing job is triggered and then the deployment runs
When pressing "Play" for the test job,
- The test job should run
- When it is finished, the deploy job should start