From 5f59c4df922f472eb521b445f0ea5c8dc93c697a Mon Sep 17 00:00:00 2001 From: korotkov Date: Wed, 1 Apr 2026 11:26:27 +0500 Subject: [PATCH] qw --- Jenkinsfile | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index ff9f4aa..aa11371 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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' }