1
0

CI/CD: Use in-container artifact cleaning script

This commit is contained in:
Nicolas Duchon 2020-12-22 00:07:15 +01:00
parent 992928816d
commit 000c279bb6
No known key found for this signature in database
GPG Key ID: EA3151C66A4D79E7
2 changed files with 2 additions and 3 deletions

@ -107,8 +107,7 @@ for hosts in "${letsencrypt_hosts[@]}"; do
done
docker stop "$container" &> /dev/null
docker exec "$le_container_name" rm -rf /etc/nginx/certs/le?.wtf*
docker exec "$le_container_name" rm -rf /etc/acme.sh/default/le?.wtf*
docker exec "$le_container_name" /app/cleanup_test_artifacts --default-cert
i=$(( i + 1 ))
done

@ -57,7 +57,7 @@ done
# the certificate or private key file are deleted
for file in 'default.key' 'default.crt'; do
old_default_cert_fingerprint="$(default_cert_fingerprint)"
docker exec "$le_container_name" rm -f /etc/nginx/certs/$file
docker exec "$le_container_name" /app/cleanup_test_artifacts --default-cert
docker restart "$le_container_name" > /dev/null
timeout="$(date +%s)"
timeout="$((timeout + 60))"