Skip to content

Commit

Permalink
Update Jenkins_Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
em-tpt-bbandi authored Jun 24, 2024
1 parent 9a5dcbb commit f0f8bd4
Showing 1 changed file with 21 additions and 23 deletions.
44 changes: 21 additions & 23 deletions Jenkins_Docker
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit f0f8bd4

Please sign in to comment.