with cred

This commit is contained in:
Gregory Hendrickson
2023-06-09 15:46:21 -07:00
parent 3328c05d09
commit 87e3a85c2c

9
Jenkinsfile vendored
View File

@@ -2,7 +2,6 @@ pipeline {
agent any
environment {
DOCKERHUB_CREDENTIALS=credentials('dockerhub-cred')
SSH_CREDENTIALS=credentials('ssh-cred')
}
stages {
@@ -26,12 +25,15 @@ pipeline {
stage('Pull and Deploy') {
steps {
withCredentials([
usernamePassword(credentialsId: 'ssh-cred', usernameVariable: 'SSH_USER', passwordVariable: 'SSH_PASSWORD')
]) {
script {
def remote = [:]
remote.name = 'ubuntu-kc'
remote.host = '172.16.11.90'
remote.user = "greg"
remote.password = "Password1!"
remote.user = "${SSH_USER}"
remote.password = "${SSH_PASSWORD}"
remote.allowAnyHosts = true
writeFile file: 'run-pull-deploy.sh', text: '''
@@ -50,6 +52,7 @@ pipeline {
}
}
}
}
post {
always {