Skip to content

Commit

Permalink
add Jenkinsfile.local
Browse files Browse the repository at this point in the history
  • Loading branch information
devopswise committed Jan 16, 2019
1 parent e0b90b5 commit 6a06f7d
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions Jenkinsfile.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
pipeline {
agent { label 'jenkins-jnlp-slave-docker-cli' }
stages {
stage('run cdt-installer'){
steps {
withCredentials([sshUserPrivateKey(credentialsId: 'devopswise', keyFileVariable: 'identity', passphraseVariable: '', usernameVariable: 'userName')]) {
remote.user = "root"
remote.identityFile = identity
sshCommand remote: remote, command: 'hostname'
sshCommand remote: remote, command: 'xe vm-list'
}

withCredentials([string(credentialsId: 'AWS_ACCESS_KEY', variable: 'AWS_ACCESS_KEY_ID'),
string(credentialsId: 'AWS_SECRET_KEY', variable: 'AWS_SECRET_ACCESS_KEY'),
]) {
wrap([$class: 'AnsiColorBuildWrapper', colorMapName: "xterm"]) {
sh '''docker run -i \
-e AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} \
-e AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} \
-e KEY_PAIR=dwtools \
-e PEM_FILE=/opt/cdt/dwtools.pem \
-e DEBUG="-vv" \
-v /opt/source/cdt-test/aws:/opt/cdt \
devopswise/cdt-installer:latest "cdt --launch" '''
}
}
}
}
}
}

0 comments on commit 6a06f7d

Please sign in to comment.