mirror of
https://github.com/ghndrx/docker-test-image.git
synced 2026-02-10 14:55:14 +00:00
with cred
This commit is contained in:
9
Jenkinsfile
vendored
9
Jenkinsfile
vendored
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user