fix(ci): set the built tag before applying the overlay
This commit is contained in:
parent
c152fed75b
commit
dc3115a82d
1 changed files with 15 additions and 10 deletions
|
|
@ -124,9 +124,6 @@ jobs:
|
||||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||||
needs: publish
|
needs: publish
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
env:
|
|
||||||
API_IMAGE: git.fiwlabs.dev/fiwdev/nereus-api:${{ github.sha }}
|
|
||||||
LOADGEN_IMAGE: git.fiwlabs.dev/fiwdev/nereus-loadgen:${{ github.sha }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
|
||||||
|
|
@ -162,13 +159,21 @@ jobs:
|
||||||
|
|
||||||
kube get secret nereus-db --namespace nereus >/dev/null
|
kube get secret nereus-db --namespace nereus >/dev/null
|
||||||
kube apply -k deploy/observability
|
kube apply -k deploy/observability
|
||||||
kube apply -k deploy/overlays/prod
|
|
||||||
kube patch rollout.argoproj.io nereus-api --namespace nereus --type json \
|
# Set the built tag before applying. Applying the overlay first would
|
||||||
--patch "[{\"op\":\"replace\",\"path\":\"/spec/template/spec/containers/0/image\",\"value\":\"$API_IMAGE\"}]"
|
# roll out its pinned 0.1.0 tag and then roll out a second time on the
|
||||||
kube set image deployment/nereus-loadgen --namespace nereus \
|
# patch, running the pre-promotion analysis against the wrong image.
|
||||||
"loadgen=$LOADGEN_IMAGE"
|
install -d .ci/release
|
||||||
kube set image deployment/nereus-loadgen-preview --namespace nereus \
|
cat >.ci/release/kustomization.yaml <<'EOF'
|
||||||
"loadgen=$LOADGEN_IMAGE"
|
resources:
|
||||||
|
- ../../deploy/overlays/prod
|
||||||
|
images:
|
||||||
|
- name: git.fiwlabs.dev/fiwdev/nereus-api
|
||||||
|
newTag: ${{ github.sha }}
|
||||||
|
- name: git.fiwlabs.dev/fiwdev/nereus-loadgen
|
||||||
|
newTag: ${{ github.sha }}
|
||||||
|
EOF
|
||||||
|
kube apply -k .ci/release
|
||||||
|
|
||||||
kube rollout status deployment/nereus-loadgen --namespace nereus --timeout=5m
|
kube rollout status deployment/nereus-loadgen --namespace nereus --timeout=5m
|
||||||
kube rollout status deployment/nereus-loadgen-preview --namespace nereus --timeout=5m
|
kube rollout status deployment/nereus-loadgen-preview --namespace nereus --timeout=5m
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue