Skip to content
Snippets Groups Projects
Commit 2fcbbbd3 authored by Bryan BRANCOTTE's avatar Bryan BRANCOTTE
Browse files

check if pvc is present in current instance

parent 55107944
No related branches found
No related tags found
No related merge requests found
Pipeline #132535 skipped
...@@ -205,6 +205,13 @@ log-fetcher-in-dev: ...@@ -205,6 +205,13 @@ log-fetcher-in-dev:
sleep 1 sleep 1
kubectl get po kubectl get po
done done
- PVC=$(kubectl get pvc -l "app.kubernetes.io/instance=${CI_COMMIT_REF_SLUG}-${CHART_LOCATION}" --output jsonpath='{.items[0].metadata.name}' 2>/dev/null || echo "")
- |
if [ ! $PVC ]; then
echo "no storage found, did you enable it ? Note that you should wait for deployment to be done to run this task."
echo "more info at https://hub.pages.pasteur.fr/shiny-k8s/user_guide/helm_settings.html#storage"
exit 3
fi
- kubectl cp $POD:data/ removed || echo "no older version" - kubectl cp $POD:data/ removed || echo "no older version"
- kubectl exec $POD -- rm -rf data/ || echo "rm done" - kubectl exec $POD -- rm -rf data/ || echo "rm done"
- kubectl cp data $POD:/srv/shiny-server - kubectl cp data $POD:/srv/shiny-server
......
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