qw
BOT_open_sesam/pipeline/head There was a failure building this commit
Details
BOT_open_sesam/pipeline/head There was a failure building this commit
Details
parent
63ab836f1a
commit
5f59c4df92
|
|
@ -1,32 +1,29 @@
|
|||
pipeline {
|
||||
agent {
|
||||
docker {
|
||||
image "docker:dind"
|
||||
args "-v /var/run/docker.sock:/var/run/docker.sock"
|
||||
}
|
||||
}
|
||||
|
||||
environment {
|
||||
REGISTRY_URL = "https://proxy.docker.dataekb.ru/local_cache"
|
||||
IMAGE_NAME = "open_sesam"
|
||||
IMAGE_TAG = "latest"
|
||||
}
|
||||
|
||||
agent { label 'agent_smith'}
|
||||
|
||||
stages {
|
||||
stage("Build Docker Image") {
|
||||
|
||||
stage ('push main') {
|
||||
steps {
|
||||
script {
|
||||
docker.build("${IMAGE_NAME}:${IMAGE_TAG}")
|
||||
docker.withRegistry("${REGISTRY_URL}", 'jenkins_harbor') {
|
||||
def customImage = docker.build("proxy.docker.dataekb.ru/local_cache/${IMAGE_NAME}:latest")
|
||||
customImage.push()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Push to Harbor') {
|
||||
stage ('clear after build and push') {
|
||||
steps {
|
||||
script {
|
||||
docker.withRegistry("${REGISTRY_URL}", "jenkins_harbor") {
|
||||
docker.image("${IMAGE_NAME}:${IMAGE_TAG}").push()
|
||||
}
|
||||
sh "docker image prune --filter label=stage=builder"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -41,7 +38,6 @@ pipeline {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
post {
|
||||
failure {
|
||||
|
|
@ -51,9 +47,13 @@ pipeline {
|
|||
echo "[OK] Build success"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Old_version
|
||||
// pipeline {
|
||||
// agent { label 'agent_smith' }
|
||||
|
|
|
|||
Loading…
Reference in New Issue