Skip to content

Commit

Permalink
URSA-298 > Do not deploy on migration failure (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
ElenaHenderson committed Apr 8, 2021
1 parent e10c68e commit 1346aed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .buildkite/conbench-deploy/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ steps:
- aws eks --region us-east-2 update-kubeconfig --name ${EKS_CLUSTER}
- cat migration-job.yml | sed "s/{{BUILDKITE_COMMIT}}/${BUILDKITE_COMMIT}/g; s/{{APPLICATION_NAME}}/${APPLICATION_NAME}/g; s/{{DB_HOST}}/${DB_HOST}/g; s/{{DB_PORT}}/${DB_PORT}/g; s/{{FLASK_APP}}/${FLASK_APP}/g; s/{{DOCKER_REGISTRY}}/${DOCKER_REGISTRY}/g; s/{{CERTIFICATE_ARN}}/${CERTIFICATE_ARN}/g; s/{{EKS_CLUSTER}}/${EKS_CLUSTER}/g" | kubectl delete --ignore-not-found=true -f -
- cat migration-job.yml | sed "s/{{BUILDKITE_COMMIT}}/${BUILDKITE_COMMIT}/g; s/{{APPLICATION_NAME}}/${APPLICATION_NAME}/g; s/{{DB_HOST}}/${DB_HOST}/g; s/{{DB_PORT}}/${DB_PORT}/g; s/{{FLASK_APP}}/${FLASK_APP}/g; s/{{DOCKER_REGISTRY}}/${DOCKER_REGISTRY}/g; s/{{CERTIFICATE_ARN}}/${CERTIFICATE_ARN}/g; s/{{EKS_CLUSTER}}/${EKS_CLUSTER}/g" | kubectl apply -f -
- kubectl wait --for=condition=complete --timeout=600s job/conbench-migration
- (($(kubectl get job conbench-migration -o jsonpath={.status.succeeded}) == "1")) && exit 0 || exit 1

- label: "Deploy"
key: "deploy"
Expand Down
1 change: 1 addition & 0 deletions migration-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ kind: Job
metadata:
name: conbench-migration
spec:
backoffLimit: 0
template:
spec:
containers:
Expand Down

0 comments on commit 1346aed

Please sign in to comment.