From 0fb7f9f6a3f36c77334f2dbdf05a8432685f2e6c Mon Sep 17 00:00:00 2001 From: Vivienne Ansah Date: Sat, 2 Jul 2022 06:44:51 +0100 Subject: [PATCH] Added comments to jenkinsfile --- Jenkinsfile | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 568fa86..bf8ade8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,15 +9,15 @@ environment { } stages { - // stage('Checkout') { - // steps { - // checkout([$class: 'GitSCM', - // branches: [[name: '*/master']], - // extensions: [], - // userRemoteConfigs: [[url: 'https://github.com/voa2000/demo-python-nginx-app.git']]]) - // } - // } - stage('Build'){ + stage('Checkout Source Code') { + steps { + checkout([$class: 'GitSCM', + branches: [[name: '*/master']], + extensions: [], + userRemoteConfigs: [[url: 'https://github.com/voa2000/demo-python-nginx-app.git']]]) + } + } + stage('Build Images'){ steps { sh ''' #!/bin/bash @@ -28,18 +28,20 @@ environment { ''' } } - stage('Login') { + stage('Login to DockerHub') { steps { sh 'echo $DOCKERHUB_CREDENTIALS_PSW | docker login -u $DOCKERHUB_CREDENTIALS_USR --password-stdin' } } - stage('Push') { + stage('Push to DockerHub') { steps { sh ''' #!/bin/bash + echo "###### Pushing Image images to DockerHub !! ######"; docker push voa2000/nginx-demo:nginx$tag docker push voa2000/nginx-demo:app-1$tag docker push voa2000/nginx-demo:app-2$tag + echo "###### Image Publish to DockerHub Complete!! ######"; ''' } }