From ec9dfcc214c368a7ef6443f8220450b8ce404745 Mon Sep 17 00:00:00 2001 From: Jan Rabcan Date: Wed, 20 Oct 2021 02:42:59 +0200 Subject: [PATCH] s. --- Jenkinsfile | 50 ++++++++++++++++++++++++-------------------------- 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index db70f79..49c90d7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,33 +1,31 @@ -pipeline { - agent any - stages { - stage('Installation') { - steps { - echo "start Installation" - echo "finish Installation" - } +node { + + stage('Installation') { + steps { + echo "start Installation" + echo "finish Installation" } - stage('Build') { - steps { - echo "Running ${env.BUILD_ID} on ${env.JENKINS_URL}" - echo 'Building..' + } + stage('Build') { + steps { + echo "Running ${env.BUILD_ID} on ${env.JENKINS_URL}" + echo 'Building..' // sh 'docker build -t registry.proxyq.co/hellsos/website .' - } } - stage('Test') { - steps { - echo "start Testing" - sh 'sleep 5' - echo "finish Testing" - } + } + stage('Test') { + steps { + echo "start Testing" + sh 'sleep 5' + echo "finish Testing" } - stage('Deploy') { - node { - checkout scm - docker.withRegistry("${env.ENV_REGISTRY_URL}", 'registry-credentials-id') { - def customImage = docker.build("${env.ENV_REGISTRY_URL}/jenkins/website:${env.BUILD_ID}") - customImage.push() - } + } + stage('Deploy') { + node { + checkout scm + docker.withRegistry("${env.ENV_REGISTRY_URL}", 'registry-credentials-id') { + def customImage = docker.build("${env.ENV_REGISTRY_URL}/jenkins/website:${env.BUILD_ID}") + customImage.push() } } }