Commit 7bfbb53
committed
fix(ci): deploy PR environments by commit SHA so every push rolls out
Ports bcgov/nr-csp#122 (itself a port of bcgov/quickstart-openshift#2817).
PR images are tagged with the PR number, which is reused on every push.
A repeat push rebuilds the image under the same tag, so oc apply sees an
unchanged Deployment - no pods restart and the stale image keeps serving
despite imagePullPolicy: Always.
Builds now push each image under two tags: the PR number (mutable, still
what merge.yml deploys to test) and the immutable head commit SHA. PR
deploys pass the head SHA as IMAGE_TAG, so every push changes the pod
spec and forces a fresh rollout. Test deploys are unaffected: the
PR-number tag is unique per merge, so the spec changes there anyway.1 parent 13e8be2 commit 7bfbb53
3 files changed
Lines changed: 17 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
42 | 47 | | |
43 | 48 | | |
44 | 49 | | |
| |||
51 | 56 | | |
52 | 57 | | |
53 | 58 | | |
| 59 | + | |
54 | 60 | | |
55 | 61 | | |
56 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
16 | 21 | | |
17 | 22 | | |
18 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
16 | 21 | | |
17 | 22 | | |
18 | 23 | | |
| |||
0 commit comments