Fixed #266 Externalize version tag so it is based on GitHub tag when deployed to production (GRN-1) (#292)

* Update Jenkinsfile

* updating Jenkinsfile

* updating version in Jenkins

* Update version.rb
This commit is contained in:
Bruck Wubete 2018-10-12 16:11:22 -04:00 committed by Jesus Federico
parent a9be611d00
commit fd1b586c6e
2 changed files with 4 additions and 2 deletions

4
Jenkinsfile vendored
View File

@ -61,10 +61,12 @@ 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')]) {
sh "gcloud auth activate-service-account --key-file=$FILE"
if (stageBuild) {
sh "sed -i 's/VERSION =.*/VERSION = \"${gitBranch}\"/g' config/initializers/version.rb"
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 push 'bigbluebutton/${appName}:master'"
} else if (releaseBuild) {
sh "sed -i 's/VERSION =.*/VERSION = \"${gitTag.substring(8)}\"/g' config/initializers/version.rb"
imageTag = "gcr.io/${project}/${appName}:${gitTag}"
sh "gcloud docker -- build -t ${imageTag} -t 'bigbluebutton/${appName}:${greenlightVersion}' -t 'bigbluebutton/${appName}:${gitTag}' . && gcloud docker -- push ${imageTag}"
sh "docker login -u $DOCKER_USER -p $DOCKER_PASSWORD"
@ -91,4 +93,4 @@ volumes: [
slackSend (color: '#FF0000', message: "FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' message: ${e} (${env.BUILD_URL})")
}
}
}
}

View File

@ -2,6 +2,6 @@
module Greenlight
class Application
VERSION = "2.0.0"
VERSION = "2"
end
end