patch pipeline to also change dagster current image
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 30s
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 30s
This commit is contained in:
@@ -93,15 +93,11 @@ jobs:
|
||||
|
||||
DEPLOYMENT_NAME="dataprovider01-dataprovider-orchestration-platform-dagster-user-template-code-location"
|
||||
|
||||
# Patch the deployment to update the image tag
|
||||
# Keep both the code server image and DAGSTER_CURRENT_IMAGE in sync.
|
||||
kubectl patch deployment "${DEPLOYMENT_NAME}" \
|
||||
-n "${K8S_NAMESPACE}" \
|
||||
--type='json' \
|
||||
-p="[{'op': 'replace', 'path': '/spec/template/spec/containers/0/image', 'value':'${IMAGE_REPO}:${SHORT_SHA}'}]"
|
||||
|
||||
# Trigger rollout restart to pick up new image
|
||||
kubectl rollout restart deployment/"${DEPLOYMENT_NAME}" \
|
||||
-n "${K8S_NAMESPACE}"
|
||||
--type='strategic' \
|
||||
-p="{\"spec\":{\"template\":{\"spec\":{\"containers\":[{\"name\":\"dagster-user-deployments\",\"image\":\"${IMAGE_REPO}:${SHORT_SHA}\",\"env\":[{\"name\":\"DAGSTER_CURRENT_IMAGE\",\"value\":\"${IMAGE_REPO}:${SHORT_SHA}\"}]}]}}}}"
|
||||
|
||||
# Wait for rollout to complete
|
||||
kubectl rollout status deployment/"${DEPLOYMENT_NAME}" \
|
||||
|
||||
Reference in New Issue
Block a user