[api] Jenkinsfile.pjt
- 삭제정책 추가
This commit is contained in:
+4
-4
@@ -244,12 +244,12 @@ pipeline {
|
|||||||
passwordVariable: 'DOCKER_PASS'
|
passwordVariable: 'DOCKER_PASS'
|
||||||
)]) {
|
)]) {
|
||||||
sshagent(['ssh-pjt']) {
|
sshagent(['ssh-pjt']) {
|
||||||
sh '''
|
sh '''#!/usr/bin/env bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
ssh -p ${SSH_PORT} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \
|
ssh -p ${SSH_PORT} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \
|
||||||
${SSH_USER}@${SSH_HOST} \
|
${SSH_USER}@${SSH_HOST} \
|
||||||
"REGISTRY_HOST='${REGISTRY_HOST}' IMAGE_REPO='${IMAGE_REPO}' DOCKER_USER='${DOCKER_USER}' DOCKER_PASS='${DOCKER_PASS}' bash -se" <<'EOF'
|
"REGISTRY_HOST='${REGISTRY_HOST}' IMAGE_REPO='${IMAGE_REPO}' DOCKER_USER='${DOCKER_USER}' DOCKER_PASS='${DOCKER_PASS}' bash -se" <<'REMOTE_EOF'
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
REGISTRY_URL="https://${REGISTRY_HOST}"
|
REGISTRY_URL="https://${REGISTRY_HOST}"
|
||||||
@@ -260,7 +260,6 @@ pipeline {
|
|||||||
command -v jq >/dev/null 2>&1 || (sudo apt-get update -y && sudo apt-get install -y jq)
|
command -v jq >/dev/null 2>&1 || (sudo apt-get update -y && sudo apt-get install -y jq)
|
||||||
|
|
||||||
echo "[1/6] Debug URL"
|
echo "[1/6] Debug URL"
|
||||||
echo "REGISTRY_URL=${REGISTRY_URL}"
|
|
||||||
echo "TAGS_URL=${REGISTRY_URL}/v2/${REPO}/tags/list"
|
echo "TAGS_URL=${REGISTRY_URL}/v2/${REPO}/tags/list"
|
||||||
|
|
||||||
echo "[2/6] Collect running tags to protect"
|
echo "[2/6] Collect running tags to protect"
|
||||||
@@ -310,7 +309,7 @@ pipeline {
|
|||||||
docker exec registry registry garbage-collect /etc/docker/registry/config.yml
|
docker exec registry registry garbage-collect /etc/docker/registry/config.yml
|
||||||
|
|
||||||
echo "Registry cleanup done."
|
echo "Registry cleanup done."
|
||||||
EOF
|
REMOTE_EOF
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -318,5 +317,6 @@ pipeline {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user