diff --git a/Jenkinsfile b/Jenkinsfile index 53e2c8b2..e8c64eaf 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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})") } } -} +} \ No newline at end of file diff --git a/config/initializers/version.rb b/config/initializers/version.rb index 9933426f..4f36f6bc 100644 --- a/config/initializers/version.rb +++ b/config/initializers/version.rb @@ -2,6 +2,6 @@ module Greenlight class Application - VERSION = "2.0.0" + VERSION = "2" end end