add configuration for publishable tag

fixes: CCI-381
flag = none

Test-Plan:
the build passes and we see the new publishable tag

Change-Id: I01e3cd9299bb238137cdee1d32c4c46153bd7695
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/237341
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: James Butters <jbutters@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
Product-Review: James Butters <jbutters@instructure.com>
This commit is contained in:
Rex Fleischer 2020-05-14 08:19:56 -07:00
parent ece230a8cc
commit b678d90773
2 changed files with 14 additions and 3 deletions

13
Jenkinsfile vendored
View File

@ -40,6 +40,10 @@ def getImageTagVersion() {
flags.getImageTagVersion()
}
def getPublishableTagSuffix() {
load('build/new-jenkins/groovy/configuration.groovy').publishableTagSuffix()
}
def runDatadogMetric(name, body) {
def dd = load('build/new-jenkins/groovy/datadog.groovy')
dd.runDataDogForMetric(name,body)
@ -122,14 +126,17 @@ pipeline {
BUILD_REGISTRY_FQDN = buildRegistryFQDN()
BUILD_IMAGE = "$BUILD_REGISTRY_FQDN/jenkins/canvas-lms"
// e.g. postgres-9.5-ruby-passenger-2.4-xenial
// e.g. postgres-9.5-ruby-passenger-2.6
TAG_SUFFIX = "postgres-$POSTGRES-ruby-passenger-$RUBY_PASSENGER"
// this is found in the PUBLISHABLE_TAG_SUFFIX config file on jenkins
PUBLISHABLE_TAG_SUFFIX = getPublishableTagSuffix()
// e.g. canvas-lms:01.123456.78-postgres-12-ruby-passenger-2.6
PATCHSET_TAG = "$BUILD_IMAGE:$NAME-$TAG_SUFFIX"
// e.g. canvas-lms:01.123456.78-postgres-9.5-ruby-passenger-2.4-xenial
PUBLISHABLE_TAG = "$BUILD_IMAGE:$NAME-postgres-9.5-ruby-passenger-2.4-xenial"
// e.g. canvas-lms:01.123456.78-postgres-9.5-ruby-passenger-2.6
PUBLISHABLE_TAG = "$BUILD_IMAGE:$NAME-$PUBLISHABLE_TAG_SUFFIX"
// e.g. canvas-lms:master when not on another branch
MERGE_TAG = "$CANVAS_LMS_IMAGE:$GERRIT_BRANCH"

View File

@ -25,6 +25,10 @@ def fscPropagate() {
return raw != null && raw == '1'
}
def publishableTagSuffix() {
return findVariable('PUBLISHABLE_TAG_SUFFIX', true)
}
/**
* this is a standard way of finding configuration from different places.
* the checks happen in this order: