From f0f8bd460d2f309b76d775d628d354dfe5f953c8 Mon Sep 17 00:00:00 2001 From: Bhanu Prakash Reddy <126443511+em-tpt-bbandi@users.noreply.github.com> Date: Mon, 24 Jun 2024 11:08:11 +0530 Subject: [PATCH] Update Jenkins_Docker --- Jenkins_Docker | 44 +++++++++++++++++++++----------------------- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/Jenkins_Docker b/Jenkins_Docker index bb77488..a3ba02d 100644 --- a/Jenkins_Docker +++ b/Jenkins_Docker @@ -1,15 +1,15 @@ pipeline { agent any - // stages { - // stage('Checkout') { - // steps { - // script { - // // Checkout the specified branch - // git branch: "${BRANCH_NAME}", url: 'https://github.com/beckn/protocol-server.git' - // } - // } - // } + stages { + stage('Checkout') { + steps { + script { + // Checkout the specified branch + git branch: "${BRANCH_NAME}", url: 'https://github.com/beckn/protocol-server.git' + } + } + } stage('Build Docker Image') { steps { @@ -40,22 +40,20 @@ pipeline { } stage('Executing Shell Script On Server') { - steps { - script { - sshagent(credentials: ['"${credentials}"']) { - sh ''' - ssh -t -t ${userName}@${hostIP} -o StrictHostKeyChecking=no << EOF - ${listOfCommands} - logout - EOF - ''' - } + steps { + script { + sshagent(credentials: ["${credentials}"]) { + sh ''' + ssh -t -t ${userName}@${hostIP} -o StrictHostKeyChecking=no << EOF + ${listOfCommands} + logout + EOF + ''' + } + } + } } - } } - } - - post { always {