Skip to content
Snippets Groups Projects
Commit 77e1cd3b authored by thijsheijden's avatar thijsheijden
Browse files

Changed pipeline as this service has two deployments

parent 5aa933dc
No related branches found
No related tags found
2 merge requests!6End of SWP 2 Merge,!3Draft: time tracking
Pipeline #108224 passed
......@@ -149,13 +149,8 @@ deploy:
- ssh -fN -L 1234:science-vs260.science.uu.nl:22 sivan@up.science.uu.nl
# Copy kubernetes files over
- scp -r -o StrictHostKeyChecking=no -P 1234 -i ~/.ssh/id_rsa deployments/* root@localhost:/root/kubernetes/$CI_PROJECT_NAME
# Deploy all yml files
# Remove old deployment
- ssh -p 1234 -i ~/.ssh/id_rsa root@localhost "kubectl delete -f kubernetes/$CI_PROJECT_NAME/"
# Apply new deployment
- ssh -p 1234 -i ~/.ssh/id_rsa root@localhost "kubectl apply -f kubernetes/$CI_PROJECT_NAME/"
# Set deployment image to the image we just made
- if [[ ! -z $CI_COMMIT_BRANCH+x ]]; then DOCKER_TAG=$CI_COMMIT_BRANCH; else DOCKER_TAG=$CI_MERGE_REQUEST_TARGET_BRANCH_NAME; fi
# Restart the deployment if the image is not changed
- ssh -p 1234 -i ~/.ssh/id_rsa root@localhost "if kubectl set image deployment/$DEPLOYMENT_NAME $DEPLOYMENT_NAME=datastropheregistry.azurecr.io/$CI_PROJECT_NAME:$DOCKER_TAG | grep -q "image updated";
then
kubectl rollout restart deployment/$DEPLOYMENT_NAME;
fi"
dependencies: []
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment