mirror of https://github.com/OpenVidu/openvidu.git
Jenkinsfile: check env variables instead of parameterizing them
parent
e80c17cc04
commit
e867e7963d
|
@ -2,7 +2,7 @@ node('container') {
|
|||
// Load and execute common functions Groovy script
|
||||
sh 'curl -O https://raw.githubusercontent.com/OpenVidu/openvidu/master/openvidu-test-e2e/jenkins/commonFunctions.groovy'
|
||||
def commonFunctions = load 'commonFunctions.groovy'
|
||||
commonFunctions.prepareTestingEnvironment("${DISTRO}", "${MEDIASOUP_CONTROLLER_DOCKER_VERSION}")
|
||||
commonFunctions.prepareTestingEnvironment()
|
||||
|
||||
// Clone and checkout OpenVidu/openvidu repository
|
||||
def commitId = "${OPENVIDU_COMMIT}"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!groovy
|
||||
def prepareTestingEnvironment(def DISTRO, def MEDIASOUP_CONTROLLER_DOCKER_VERSION) {
|
||||
def prepareTestingEnvironment() {
|
||||
println('Deleting folder /opt/openvidu')
|
||||
sh 'sudo rm -rf /opt/openvidu/* || true'
|
||||
|
||||
|
@ -41,10 +41,14 @@ def prepareTestingEnvironment(def DISTRO, def MEDIASOUP_CONTROLLER_DOCKER_VERSIO
|
|||
println('Pulling containers')
|
||||
parallel (
|
||||
'Pull openvidu/openvidu-test-e2e': {
|
||||
if (env.DISTRO) {
|
||||
docker.image('openvidu/openvidu-test-e2e:$DISTRO').pull()
|
||||
}
|
||||
},
|
||||
'Pull openvidu/openvidu-pro-test-e2e': {
|
||||
if (env.DISTRO) {
|
||||
docker.image('openvidu/openvidu-pro-test-e2e:$DISTRO').pull()
|
||||
}
|
||||
},
|
||||
'Pull selenium/standalone-chrome': {
|
||||
docker.image('selenium/standalone-chrome:latest').pull()
|
||||
|
@ -56,8 +60,10 @@ def prepareTestingEnvironment(def DISTRO, def MEDIASOUP_CONTROLLER_DOCKER_VERSIO
|
|||
docker.image('selenium/standalone-opera:latest').pull()
|
||||
},
|
||||
'Pull openvidu/mediasoup-controller': {
|
||||
if (env.MEDIASOUP_CONTROLLER_DOCKER_VERSION) {
|
||||
docker.image('openvidu/mediasoup-controller:$MEDIASOUP_CONTROLLER_DOCKER_VERSION').pull()
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
println('Downloading files')
|
||||
|
|
Loading…
Reference in New Issue