Skip to content
Snippets Groups Projects
Commit 898884f1 authored by Remi  PLANEL's avatar Remi PLANEL
Browse files

cp script to put structure data in website

parent ddf07c81
No related branches found
No related tags found
No related merge requests found
Pipeline #119168 failed with stages
in 10 minutes and 50 seconds
......@@ -438,9 +438,12 @@ load-website:prod:
- kubectl --namespace ${NAMESPACE} wait pod -l "app.kubernetes.io/name=df-wiki" --for condition=Ready --timeout=600s
- echo "Le pod est ready"
- WIKI_POD=$(kubectl --namespace ${NAMESPACE} get pods -l "app.kubernetes.io/name=df-wiki" --output jsonpath='{.items[0].metadata.name}')
- kubectl --namespace ${NAMESPACE} cp .output/public/ ${WIKI_POD}:/website
- kubectl --namespace ${NAMESPACE} cp scripts/copy-structure-data.sh ${WIKI_POD}:/structure-data/sanitized-dump
- kubectl --namespace ${NAMESPACE} exec ${WIKI_POD} -- bash /structure-data/sanitized-dump/copy-structure-data.sh
- kubectl --namespace ${NAMESPACE} exec ${WIKI_POD} -- bash -c 'cd /structure-data/sanitized-dump && find * -type d -exec sh -c "for d in $@; do (cd /usr/share/nginx/html/$d; cp --archive --recursive --symbolic-link /structure-data/sanitized-dump/$d/* .) done" argv0 {} +'
......
#!/bin/bash
find * -type d -exec sh -c 'for d in "$@"; do (cd "/usr/share/nginx/html/$d"; cp --archive --recursive --symbolic-link /structure-data/sanitized-dump/$d/* .) done' argv0 {} +
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