#26 Disable buildkit again and use VFS
This commit is contained in:
30
build/Jenkinsfile
vendored
30
build/Jenkinsfile
vendored
@@ -61,22 +61,24 @@ pipeline {
|
|||||||
|
|
||||||
stage('Docker Build & Push') {
|
stage('Docker Build & Push') {
|
||||||
steps {
|
steps {
|
||||||
script {
|
withEnv(['DOCKER_BUILDKIT=0', 'DOCKER_DRIVER=vfs']) {
|
||||||
def jarPath = sh(script: "ls target/checkout/web-container/target/*.jar | head -n 1", returnStdout: true).trim()
|
script {
|
||||||
def releaseVer = sh(script: "pkgx mvn help:evaluate -Dexpression=project.version -q -DforceStdout -f target/checkout/web-container/pom.xml", returnStdout: true).trim()
|
def jarPath = sh(script: "ls target/checkout/web-container/target/*.jar | head -n 1", returnStdout: true).trim()
|
||||||
def registry = env.DOCKER_REGISTRY.toLowerCase()
|
def releaseVer = sh(script: "pkgx mvn help:evaluate -Dexpression=project.version -q -DforceStdout -f target/checkout/web-container/pom.xml", returnStdout: true).trim()
|
||||||
def registryHost = registry.replace("https://", "").replace("http://", "").replaceAll("/\$", "").toLowerCase()
|
def registry = env.DOCKER_REGISTRY.toLowerCase()
|
||||||
def imageTag = "${registryHost}/nbscloud:${releaseVer}".toLowerCase()
|
def registryHost = registry.replace("https://", "").replace("http://", "").replaceAll("/\$", "").toLowerCase()
|
||||||
|
def imageTag = "${registryHost}/nbscloud:${releaseVer}".toLowerCase()
|
||||||
|
|
||||||
docker.withRegistry(registry, '') {
|
docker.withRegistry(registry, '') {
|
||||||
def customImage = docker.build(imageTag, "-f build/Dockerfile --build-arg JAR_FILE=${jarPath} .")
|
def customImage = docker.build(imageTag, "-f build/Dockerfile --build-arg JAR_FILE=${jarPath} .")
|
||||||
|
|
||||||
if (params.DRY_RUN) {
|
if (params.DRY_RUN) {
|
||||||
echo "DRY_RUN - do not push image to registry"
|
echo "DRY_RUN - do not push image to registry"
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
customImage.push("${releaseVer}")
|
customImage.push("${releaseVer}")
|
||||||
customImage.push("latest")
|
customImage.push("latest")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user