When CI job is complete execute another job
Description
We have multiple stages in our pipeline that needs to be executed in order:
- build (does a build & test)
- publish (publishes artifacts to nexus)
- container (creates a docker container)
- dev (deploys container to our development env)
- qa (deploys container to qa env)
- prod (deploys container to prod env)
- update_dependencies (runs a program that finds all services that depend on my client and create merge request for the new version)
build, publish, container, dev are all automatic
qa, prod are manual
update_dependencies should run after prod has been successfully executed
I need a way to have prod execute update_dependencies after a successful run of the prod job.
~"feature proposal"
Proposal
A new config setting for a job to look something like:
prod: <<: *deploy_definition stage: prod when: manual environment: prod
update_dependencies: <<: *update_dependencies_definition when: on_success: prod
When prod job has been successfully completed, it will start update_dependencies job.