move selenium-chrome build to helper job
refs DE-384 Change-Id: Ibcaa7295774145cef04eef77a3056b8e9b456bfd Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/254586 QA-Review: Aaron Ogata <aogata@instructure.com> Product-Review: Aaron Ogata <aogata@instructure.com> Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com> Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
This commit is contained in:
parent
4c75f3f7f7
commit
cba7565a76
|
@ -0,0 +1,54 @@
|
|||
#!/usr/bin/env groovy
|
||||
|
||||
/*
|
||||
* Copyright (C) 2020 - present Instructure, Inc.
|
||||
*
|
||||
* This file is part of Canvas.
|
||||
*
|
||||
* Canvas is free software: you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License as published by the Free
|
||||
* Software Foundation, version 3 of the License.
|
||||
*
|
||||
* Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
* A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
pipeline {
|
||||
agent { label 'canvas-docker' }
|
||||
options {
|
||||
ansiColor('xterm')
|
||||
timestamps()
|
||||
}
|
||||
|
||||
stages {
|
||||
stage ('Parameters Check') {
|
||||
steps {
|
||||
script {
|
||||
if (!params.TARGET || !params.SELENIUM_VERSION) {
|
||||
currentBuild.result = 'ABORTED'
|
||||
error('TARGET and SELENIUM_VERSION parameters must be specified.')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Build Selenium Image') {
|
||||
steps {
|
||||
script {
|
||||
sh "docker build -t $TARGET --build-arg SELENIUM_VERSION=\"$SELENIUM_VERSION\" build/docker-compose/selenium-chrome"
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Push Selenium Image') {
|
||||
steps {
|
||||
script {
|
||||
sh "./build/new-jenkins/docker-with-flakey-network-protection.sh push $TARGET"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -5,9 +5,7 @@ set -x -o errexit -o errtrace -o nounset -o pipefail
|
|||
# pull docker images (or build them if missing)
|
||||
REGISTRY_BASE=starlord.inscloudgate.net/jenkins
|
||||
|
||||
./build/new-jenkins/docker-with-flakey-network-protection.sh pull $REGISTRY_BASE/selenium-chrome:"$SELENIUM_VERSION" || \
|
||||
(docker build -t $REGISTRY_BASE/selenium-chrome:"$SELENIUM_VERSION" --build-arg SELENIUM_VERSION="$SELENIUM_VERSION" build/docker-compose/selenium-chrome && \
|
||||
./build/new-jenkins/docker-with-flakey-network-protection.sh push $REGISTRY_BASE/selenium-chrome:"$SELENIUM_VERSION")
|
||||
./build/new-jenkins/docker-with-flakey-network-protection.sh pull $REGISTRY_BASE/selenium-chrome:"$SELENIUM_VERSION"
|
||||
|
||||
# pull canvas-rce-api here to avoid flakes, dependency of docker-compose.new-jenkins.selenium.yml
|
||||
./build/new-jenkins/docker-with-flakey-network-protection.sh pull $BUILD_REGISTRY_FQDN/jenkins/canvas-rce-api
|
||||
|
|
Loading…
Reference in New Issue