qw
BOT_open_sesam/pipeline/head There was a failure building this commit Details

main
korotkov 2026-04-01 11:26:27 +05:00
parent 63ab836f1a
commit 5f59c4df92
1 changed files with 15 additions and 15 deletions

30
Jenkinsfile vendored
View File

@ -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,9 +47,13 @@ pipeline {
echo "[OK] Build success" echo "[OK] Build success"
} }
} }
}
} }
// Old_version // Old_version
// pipeline { // pipeline {
// agent { label 'agent_smith' } // agent { label 'agent_smith' }