Manual `review-deploy` isn't playable until previous jobs are done
When Review Apps deployments are manual, review-deploy
isn't playable until previous jobs are done, which is a problem since review-build-cng
tries to play it, but it doesn't success since the job isn't playable at this point.
This works if you retry review-build-cng
once it's finished once, but it's wasting 20 minutes of compute and clock time since it's rebuilding the CNG components...
Unfortunately, if we add needs: []
to review-deploy
, that'll either block the pipeline if review-build-cng
is never played (see #199979 (closed)), or start review-deploy
before review-build-cng
when Review Apps deployments are automated (i.e. MR with frontend changes). Being able to specify a different needs
depending on when
could improve that (i.e. needs: []
for when: manual
and needs: ["review-build-cng"]
for when: on_success
).
A solution would be to put both jobs in the same stage but we'd need #30632 (closed) to be implemented.
Working solution
- Always make the
review-deploy
job manual. - Move
review-build-cng
to thereview
stage so thatreview-build-cng
andreview-deploy
can be started without the other being done first. - Always try to trigger
review-deploy
at the end ofreview-build-cng
. - In
review-deploy
:- If
review-build-cng
is not started, start it. - Wait for
review-build-cng
to finish. - Proceed to deployment.
- At the end, play
review-qa-smoke
andreview-performance
.
- If
- In
review-qa-smoke
andreview-performance
, wait forreview-deploy
to be finished, then download itsenvironment_url.txt
artifact.
Note that #31264 (closed) would allow to avoid most if not all of these workarounds.