From 24db9bf2e81f94950f249550f9cab276fd2624b4 Mon Sep 17 00:00:00 2001 From: Jan Rabcan Date: Wed, 20 Oct 2021 03:01:13 +0200 Subject: [PATCH] a. --- Jenkinsfile | 52 ++++++++++++++++++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 20 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index e1a8042..542fe12 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,24 +1,36 @@ -node { +pipeline { - stage('Installation') { - echo "start Installation" - echo "finish Installation" - } - stage('Build') { - echo "Running ${env.BUILD_ID} on ${env.JENKINS_URL}" - echo 'Building..' -// sh 'docker build -t registry.proxyq.co/hellsos/website .' - } - stage('Test') { - echo "start Testing" - sh 'sleep 5' - echo "finish Testing" - } - stage('Deploy') { - echo "${env.ENV_REGISTRY_URL}" - docker.withRegistry("https://registry.proxyq.co", 'registry-credentials-id') { - def customImage = docker.build("registry.proxyq.co/jenkins/website:${env.BUILD_ID}", '.') - customImage.push() + agent { dockerfile true } + + stages { + stage('Installation') { + steps { + echo "start Installation" + echo "finish Installation" + } + } + stage('Build') { + steps { + echo "Running ${env.BUILD_ID} on ${env.JENKINS_URL}" + echo 'Building..' + sh 'docker build -t registry.proxyq.co/cd/website .' + } + } + stage('Test') { + steps { + echo "start Testing" + sh 'sleep 5' + echo "finish Testing" + } + } + stage('Deploy') { + steps { + echo "${env.ENV_REGISTRY_URL}" +// docker.withRegistry("https://registry.proxyq.co", 'registry-credentials-id') { +// def customImage = docker.build("registry.proxyq.co/jenkins/website:${env.BUILD_ID}", '.') +// customImage.push() +// } +} } } }