Bind the GitHub credentials for pushing

This commit is contained in:
Ovidio Mallo 2017-01-02 05:07:48 +01:00
parent 56de4014c6
commit bb84665750
1 changed files with 4 additions and 2 deletions

View File

@ -29,8 +29,10 @@ node() {
if (isPromoteToTest) {
stage("Deploy to TEST") {
sh "git tag ${tagVersion}"
sh "git push --tags"
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'github-omallo', usernameVariable: 'GIT_USERNAME', passwordVariable: 'GIT_PASSWORD']]) {
sh "git tag ${tagVersion}"
sh "git push --tags https://${GIT_USERNAME}:${GIT_PASSWORD}@github.com/omallo/ruby-ex.git"
}
ocutil.ocTag("rubex-dev", "frontend", "dev", tagVersion)
ocutil.ocTag("rubex-dev", "frontend", tagVersion, "test")