Skip to content
Snippets Groups Projects
Commit b879ea72 authored by Ranindya Paramitha's avatar Ranindya Paramitha
Browse files

try CI/CD

parent d5f87a98
1 merge request!40#90 Feature/setup ci cd
......@@ -67,15 +67,15 @@ deploy_review:
- sed_files deployment
- cat kube-deployment.yml
- kubectl apply -f kube-deployment.yml
# - |
# if kubectl apply -f kube-deployment.yml | grep -q unchanged
# then
# echo "=> Patching deployment to force image update."
# kubectl patch -f kube-deployment.yml -p "{\"spec\":{\"template\":{\"metadata\":{\"annotations\":{\"ci-last-updated\":\"$(date +'%s')\"}}}}}"
# else
# echo "=> Deployment apply has changed the object, no need to force image update."
# fi
# - kubectl rollout status -f kube-deployment.yml
- |
if kubectl apply -f kube-deployment.yml | grep -q unchanged
then
echo "=> Patching deployment to force image update."
kubectl patch -f kube-deployment.yml -p "{\"spec\":{\"template\":{\"metadata\":{\"annotations\":{\"ci-last-updated\":\"$(date +'%s')\"}}}}}"
else
echo "=> Deployment apply has changed the object, no need to force image update."
fi
- kubectl rollout status -f kube-deployment.yml
- kubectl get deploy,svc,ing,pod -l app="$(echo ${CI_PROJECT_NAME} | tr "." "-")",ref="${CI_ENVIRONMENT_SLUG}"
stop_review:
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment