canvas-lms/Jenkinsfile.xbrowser

52 lines
1.5 KiB
Groovy

#!/usr/bin/env groovy
/*
* Copyright (C) 2019 - 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 none
options {
ansiColor('xterm')
}
environment {
COMPOSE_FILE = 'docker-compose.new-jenkins.yml'
// 'refs/changes/63/181863/8' -> '63.181863.8'
NAME = "${env.GERRIT_REFSPEC}".minus('refs/changes/').replaceAll('/','.')
}
// Todo: This will run all xbrowser tests consecutively, still need to get parallel depending on runtime
stages {
stage ('Xbrowser Tests') {
agent { label 'docker' }
steps {
timeout(time: 60) {
sh 'printenv | sort'
sh 'build/new-jenkins/docker-compose-build.sh'
sh 'build/new-jenkins/xbrowser-test.sh'
}
}
post {
cleanup {
sh 'docker-compose stop && docker-compose down --volumes --remove-orphans --rmi all'
}
}
}
}
}