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 done
docker stop "$container" &> /dev/null docker stop "$container" &> /dev/null
docker exec "$le_container_name" rm -rf /etc/nginx/certs/le?.wtf* docker exec "$le_container_name" /app/cleanup_test_artifacts --default-cert
docker exec "$le_container_name" rm -rf /etc/acme.sh/default/le?.wtf*
i=$(( i + 1 )) i=$(( i + 1 ))
done done

@ -57,7 +57,7 @@ done
# the certificate or private key file are deleted # the certificate or private key file are deleted
for file in 'default.key' 'default.crt'; do for file in 'default.key' 'default.crt'; do
old_default_cert_fingerprint="$(default_cert_fingerprint)" 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 docker restart "$le_container_name" > /dev/null
timeout="$(date +%s)" timeout="$(date +%s)"
timeout="$((timeout + 60))" timeout="$((timeout + 60))"