I have defined 3 stages in gitlab-ci.yml. When there is a new commit, pipeline runs and these 3 stages run in parallel, which is expected and needed. (These stages run pre-requisite steps like security checks on code and other linting functions). I also have Scalr (another provider) inject external stages into the same pipeline (these run terraform policy checks and plan and apply).
However, the problem is that these external stages kick off in parallel of the internal stages mentioned above. I would like gitlab to pause any execution external stages until AFTER the internal (pre-req) stages have finished.
In case you are wondering, running the terraform plan and apply as gitlab internal stages is not an option.
Anyway to accomplish this?