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 17, 2019
1 parent ebe76f6 commit 6c08f34
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions Jenkinsfile.local
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ pipeline {
parameters { string(defaultValue: "master", description: 'What branch?', name: 'branchName')
string(defaultValue: "", description: 'Which server?', name: 'serverFqdn') }


environment {
CDT_BRANCH=${params.branchName}
CDT_SERVER_FQDN=${params.serverFqdn}
}
stages {
stage('run cdt-installer'){
steps {
Expand All @@ -14,16 +17,15 @@ pipeline {
}
sh "sleep 15"
withCredentials([string(credentialsId: 'AWS_ACCESS_KEY', variable: 'AWS_ACCESS_KEY_ID'),
string(credentialsId: 'AWS_SECRET_KEY', variable: 'AWS_SECRET_ACCESS_KEY'),
string(credentialsId: 'CDT_SERVER_FQDN', variable: 'CDT_SERVER_FQDN'),
string(credentialsId: 'AWS_SECRET_KEY', variable: 'AWS_SECRET_ACCESS_KEY')
]) {
wrap([$class: 'AnsiColorBuildWrapper', colorMapName: "xterm"]) {
sh '''docker run -i \
sh '''env && docker run -i \
-e AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} \
-e AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} \
-e DO_NOT_PROVISION_EC2="true" \
-e CDT_BRANCH=${params.branchName} \
-e SERVER_FQDN=${params.serverFqdn} \
-e CDT_BRANCH=${CDT_BRANCH} \
-e SERVER_FQDN=${CDT_SERVER_FQDN} \
-e KEY_PAIR=dwtools \
-e PEM_FILE=/opt/cdt/dwtools.pem \
-e DEBUG="-vv" \
Expand Down

0 comments on commit 6c08f34

Please sign in to comment.