Skip to content

Commit

Permalink
Create Jenkinsfile
Browse files Browse the repository at this point in the history
  • Loading branch information
em-tpt-bbandi authored Jun 17, 2024
1 parent adaa914 commit 76368fd
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
pipeline {
agent any
stages {
stage('Executing Shell Script On Server') {
steps {
script {
sshagent(credentials: ['"${credentials}"']) {
sh '''
ssh -t -t ${userName}@${hostIP} -o StrictHostKeyChecking=no << EOF
${listOfCommands}
logout
EOF
'''
}
}
}
}
}
post {
always {
cleanWs(cleanWhenNotBuilt: false,
deleteDirs: true,
disableDeferredWipeout: true,
notFailBuild: true,
patterns: [[pattern: '.gitignore', type: 'INCLUDE'],
[pattern: '.propsfile', type: 'EXCLUDE']])
}
}
}

0 comments on commit 76368fd

Please sign in to comment.