Shortened commit tag used for build version (#299)

This commit is contained in:
Jesus Federico 2018-10-16 14:58:52 -04:00 committed by GitHub
parent 1617b7dba1
commit de5bbc44f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

2
Jenkinsfile vendored
View File

@ -61,7 +61,7 @@ volumes: [
withCredentials([file(credentialsId: 'cloud-datastore-user-account-creds', variable: 'FILE'), string(credentialsId: 'DOCKER_USER', variable: 'DOCKER_USER'), string(credentialsId: 'DOCKER_PASSWORD', variable: 'DOCKER_PASSWORD')]) { withCredentials([file(credentialsId: 'cloud-datastore-user-account-creds', variable: 'FILE'), string(credentialsId: 'DOCKER_USER', variable: 'DOCKER_USER'), string(credentialsId: 'DOCKER_PASSWORD', variable: 'DOCKER_PASSWORD')]) {
sh "gcloud auth activate-service-account --key-file=$FILE" sh "gcloud auth activate-service-account --key-file=$FILE"
if (stageBuild) { if (stageBuild) {
sh "sed -i 's/VERSION =.*/VERSION = \"${gitBranch} (${gitCommit.substring(7)})\"/g' config/initializers/version.rb" sh "sed -i 's/VERSION =.*/VERSION = \"${gitBranch} (${gitCommit.substring(0, 7)})\"/g' config/initializers/version.rb"
sh "gcloud docker -- build -t ${imageTag} -t 'bigbluebutton/${appName}:master' . && gcloud docker -- push ${imageTag}" sh "gcloud docker -- build -t ${imageTag} -t 'bigbluebutton/${appName}:master' . && gcloud docker -- push ${imageTag}"
sh "docker login -u $DOCKER_USER -p $DOCKER_PASSWORD" sh "docker login -u $DOCKER_USER -p $DOCKER_PASSWORD"
sh "docker push 'bigbluebutton/${appName}:master'" sh "docker push 'bigbluebutton/${appName}:master'"