forked from External/greenlight
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:
parent
a9be611d00
commit
fd1b586c6e
|
@ -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})")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -2,6 +2,6 @@
|
|||
|
||||
module Greenlight
|
||||
class Application
|
||||
VERSION = "2.0.0"
|
||||
VERSION = "2"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue