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 {
|
pipeline {
|
||||||
agent {
|
|
||||||
docker {
|
|
||||||
image "docker:dind"
|
|
||||||
args "-v /var/run/docker.sock:/var/run/docker.sock"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
environment {
|
environment {
|
||||||
REGISTRY_URL = "https://proxy.docker.dataekb.ru/local_cache"
|
REGISTRY_URL = "https://proxy.docker.dataekb.ru/local_cache"
|
||||||
IMAGE_NAME = "open_sesam"
|
IMAGE_NAME = "open_sesam"
|
||||||
IMAGE_TAG = "latest"
|
IMAGE_TAG = "latest"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
agent { label 'agent_smith'}
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
stage("Build Docker Image") {
|
|
||||||
|
stage ('push main') {
|
||||||
steps {
|
steps {
|
||||||
script {
|
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 {
|
steps {
|
||||||
script {
|
script {
|
||||||
docker.withRegistry("${REGISTRY_URL}", "jenkins_harbor") {
|
sh "docker image prune --filter label=stage=builder"
|
||||||
docker.image("${IMAGE_NAME}:${IMAGE_TAG}").push()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -41,7 +38,6 @@ pipeline {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
post {
|
post {
|
||||||
failure {
|
failure {
|
||||||
|
|
@ -51,7 +47,11 @@ pipeline {
|
||||||
echo "[OK] Build success"
|
echo "[OK] Build success"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Old_version
|
// Old_version
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue