提交 61ca58aa 编写于 作者: T test

standard output is directed to /dev/null


Former-commit-id: 48b7360fc00e9983933cecefb58f80f72d95f412
上级 1bd7a6a4
......@@ -15,14 +15,14 @@ container('publish-images') {
def imageName = "${PROJECT_NAME}/engine:${DOCKER_VERSION}"
try {
def isExistImage = sh(returnStatus: true, script: "docker inspect --type=image ${imageName}")
def isExistImage = sh(returnStatus: true, script: "docker inspect --type=image ${imageName} 2>&1 > /dev/null")
if (isExistImage == 0) {
sh "docker rmi ${imageName}"
}
def customImage = docker.build("${imageName}")
isExistImage = sh(returnStatus: true, script: "docker inspect --type=image ${dockerRegistryURL}/${imageName}")
isExistImage = sh(returnStatus: true, script: "docker inspect --type=image ${dockerRegistryURL}/${imageName} 2>&1 > /dev/null"
if (isExistImage == 0) {
sh "docker rmi ${dockerRegistryURL}/${imageName}"
}
......@@ -33,12 +33,12 @@ container('publish-images') {
} catch (exc) {
throw exc
} finally {
def isExistImage = sh(returnStatus: true, script: "docker inspect --type=image ${imageName}")
def isExistImage = sh(returnStatus: true, script: "docker inspect --type=image ${imageName} 2>&1 > /dev/null")
if (isExistImage == 0) {
sh "docker rmi ${imageName}"
}
isExistImage = sh(returnStatus: true, script: "docker inspect --type=image ${dockerRegistryURL}/${imageName}")
isExistImage = sh(returnStatus: true, script: "docker inspect --type=image ${dockerRegistryURL}/${imageName} 2>&1 > /dev/null")
if (isExistImage == 0) {
sh "docker rmi ${dockerRegistryURL}/${imageName}"
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册