ci: scope Docker privilege to Jenkins credential

This commit is contained in:
2026-08-11 13:54:24 +08:00
parent fd552ce2cc
commit c3abb1f792
2 changed files with 123 additions and 78 deletions
+9
View File
@@ -0,0 +1,9 @@
#!/usr/bin/env bash
set -euo pipefail
: "${JENKINS_NODE_PASSWORD:?JENKINS_NODE_PASSWORD is required}"
printf '%s\n' "$JENKINS_NODE_PASSWORD" | \
sudo -S -p '' -- \
/usr/bin/env "DOCKER_CONFIG=${DOCKER_CONFIG:-}" \
/usr/bin/docker "$@"