Jenkins 镜像预拉取增加超时重试与缓存检测
This commit is contained in:
Vendored
+16
@@ -23,13 +23,29 @@ pipeline {
|
||||
}
|
||||
|
||||
stage('Prepare Test Images') {
|
||||
options {
|
||||
timeout(time: 15, unit: 'MINUTES')
|
||||
}
|
||||
steps {
|
||||
retry(2) {
|
||||
sh '''
|
||||
set -e
|
||||
|
||||
if docker image inspect node:20-bookworm >/dev/null 2>&1; then
|
||||
echo "node:20-bookworm already exists, skip pull"
|
||||
else
|
||||
docker pull node:20-bookworm
|
||||
fi
|
||||
|
||||
if docker image inspect mcr.microsoft.com/playwright:v1.51.1-jammy >/dev/null 2>&1; then
|
||||
echo "mcr.microsoft.com/playwright:v1.51.1-jammy already exists, skip pull"
|
||||
else
|
||||
docker pull mcr.microsoft.com/playwright:v1.51.1-jammy
|
||||
fi
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Quality Gate') {
|
||||
steps {
|
||||
|
||||
Reference in New Issue
Block a user