alpine/Jenkinsfile
2020-05-23 16:36:39 +02:00

19 lines
633 B
Groovy

pipeline {
agent any
stages {
stage('Build image') {
steps {
withDockerRegistry([ credentialsId: "6ff44976-23cd-4cc2-902c-de8c340e65e5", url: "https://reg.zknt.org" ]) {
echo 'Starting to build docker image'
script {
def customImage = docker.build("reg.zknt.org/zknt/alpine", "--build-arg VERSION=$env.BRANCH_NAME .")
customImage.push(env.BRANCH_NAME)
customImage.push(env.BRANCH_NAME.split(/\./)[0,1].join('.'))
customImage.push(env.BRANCH_NAME.split(/\./)[0])
customImage.push("latest")
}
}
}
}
}
}