There are two jobs in two stages, when Terraform Apply is invoked, it needs to run the second job, ignoring the outcome of the Terraform Apply and not waiting for it to first finish.
Currently both are set to run manually as seen in the config.
The CI config is –
stages:
- deploy
- health
apply-dev:
extends: [ .terraform-apply, .dev ]
stage: deploy
rules:
- if: $DESTROY == null
when: manual
healthcheck-dev:
extends: [ .healthcheck, .dev ]
needs: []
stage: health
rules:
- if: $DESTROY == null
when: manual
One idea is to add both of them to same stage, and run them in parallel, but this is not the preferred solution.
Any ideas or tips would be much appreciated 🙂
A compromise has been found, where both jobs run inside the same stage, both jobs set to run manually, therefore the manual trigger on the stage fires both jobs in parallel.
apply-dev:
extends: [ .terraform-apply, .dev ]
stage: deploy
rules:
- if: $DESTROY == null
when: manual
healthcheck-dev:
extends: [ .healthcheck, .dev ]
resource_group: ${ENVIRONMENT}-health
stage: deploy
rules:
- if: $DESTROY == null
when: manual