Hey, i have trouble getting this simple workflow to work. I have a DAG pipeline consisting of three stages
- config
- build
- deploy
Now the config stage is triggered manually using the
config:myservice:
...
when: manual
keyword inside the pipeline definition. The next job in stage “build” should automatically be run as soon as “config” was successfully done.
Therefore i tried this in the build-job:
I’m not sure whether I had understood your desired outcome yet.
Let’s assume you have 3 jobs each in a stage.
Your config-job should only start manually, and the next job in the next stage should only start when the config-job was successful.
If you scale that up, you would need to use needs.
Hmm, I’m still not 100% sure what you really want. Sorry
I think you got blocked jobs of allowed_failed: false
You can use allow_failure: false with a manual job to create a blocking manual job. A blocked pipeline does not run any jobs in later stages until the manual job is started and completes successfully.
However as far I understood you now. You want 2 things.
config -> build -> deploy
build -> deploy
On the second approach you don’t want config to run, right? Then you would need to rules:if.
However, you would then have to somehow define when things are executed with config and when they are not.
You got it nearly, thanks! Primarily i want to manually start a “config” job, which should, if successfull, kickoff the following build stage job. The deploy stage should be triggered manually again, also only if build was successfull.
But, i have some jobs where there is no “config” stage. And those should be started manually.