From a30fd89d858dcf2ac5da060f5fe15488e9b122c0 Mon Sep 17 00:00:00 2001 From: pabloFuente Date: Sun, 31 Oct 2021 14:18:16 +0100 Subject: [PATCH] Jenkinsfile: fix mediasoup-controller container launch with env variables --- openvidu-test-e2e/jenkins/Jenkinsfile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/openvidu-test-e2e/jenkins/Jenkinsfile b/openvidu-test-e2e/jenkins/Jenkinsfile index 0d1f7645..6700c389 100644 --- a/openvidu-test-e2e/jenkins/Jenkinsfile +++ b/openvidu-test-e2e/jenkins/Jenkinsfile @@ -227,9 +227,15 @@ def environmentStop() { def openViduE2ETest(mediaServerImage) { script { env.mediaServerImage = mediaServerImage + env.openviduProLicense = "${OPENVIDU_PRO_LICENSE}" + env.openviduProLicenseApi = "${OPENVIDU_PRO_LICENSE_API}" sh(script: '''#!/bin/bash -xe cd openvidu/openvidu-test-e2e - sudo mvn -B -Dtest=OpenViduTestAppE2eTest -DMEDIA_SERVER_IMAGE=${mediaServerImage} -DAPP_URL=https://172.17.0.1:4200/ -DOPENVIDU_URL=https://172.17.0.1:4443/ -DREMOTE_URL_CHROME=http://172.17.0.1:6666/wd/hub/ -DREMOTE_URL_FIREFOX=http://172.17.0.1:6667/wd/hub/ -DREMOTE_URL_OPERA=http://172.17.0.1:6668/wd/hub/ -DEXTERNAL_CUSTOM_LAYOUT_URL=http://172.17.0.1:5555 -DEXTERNAL_CUSTOM_LAYOUT_PARAMS=sessionId,CUSTOM_LAYOUT_SESSION,secret,MY_SECRET test + ENV_VARS="-DMEDIA_SERVER_IMAGE=${mediaServerImage} -Dtest=OpenViduTestAppE2eTest -DAPP_URL=https://172.17.0.1:4200/ -DOPENVIDU_URL=https://172.17.0.1:4443/ -DREMOTE_URL_CHROME=http://172.17.0.1:6666/wd/hub/ -DREMOTE_URL_FIREFOX=http://172.17.0.1:6667/wd/hub/ -DREMOTE_URL_OPERA=http://172.17.0.1:6668/wd/hub/ -DEXTERNAL_CUSTOM_LAYOUT_URL=http://172.17.0.1:5555 -DEXTERNAL_CUSTOM_LAYOUT_PARAMS=sessionId,CUSTOM_LAYOUT_SESSION,secret,MY_SECRET" + if [[ $mediaServerImage == *"openvidu/mediasoup-controller"* ]]; then + ENV_VARS+=" -DOPENVIDU_PRO_LICENSE=${openviduProLicense} -DOPENVIDU_PRO_LICENSE_API=${openviduProLicenseApi}" + fi + sudo mvn -B ${ENV_VARS} test '''.stripIndent()) } }