From 557a2e764ab6516ad56557ffbbf082532c30a482 Mon Sep 17 00:00:00 2001 From: pabloFuente Date: Wed, 9 Sep 2020 12:40:26 +0200 Subject: [PATCH] Updated Jenkinsfile to support openvidu-browser, openvidu-node-client commit selection --- openvidu-test-e2e/jenkins/Jenkinsfile | 40 +++++++++++++++++++++------ 1 file changed, 31 insertions(+), 9 deletions(-) diff --git a/openvidu-test-e2e/jenkins/Jenkinsfile b/openvidu-test-e2e/jenkins/Jenkinsfile index 762d0aa7..dd4cfdfe 100644 --- a/openvidu-test-e2e/jenkins/Jenkinsfile +++ b/openvidu-test-e2e/jenkins/Jenkinsfile @@ -18,13 +18,13 @@ node('container') { sh 'cd openvidu && git fetch origin && git checkout $OPENVIDU_COMMIT' sh(script: '''#!/bin/bash if $KURENTO_JAVA_SNAPSHOT ; then - git clone https://github.com/Kurento/kurento-java.git - cd kurento-java && MVN_VERSION=$(mvn --batch-mode -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec) - cd ../openvidu && mvn --batch-mode versions:set-property -Dproperty=version.kurento -DnewVersion=$MVN_VERSION - mvn dependency:get -DrepoUrl=https://maven.openvidu.io/repository/snapshots/ -Dartifact=org.kurento:kurento-client:$MVN_VERSION - mvn dependency:get -DrepoUrl=https://maven.openvidu.io/repository/snapshots/ -Dartifact=org.kurento:kurento-jsonrpc-client-jetty:$MVN_VERSION - mvn dependency:get -DrepoUrl=https://maven.openvidu.io/repository/snapshots/ -Dartifact=org.kurento:kurento-jsonrpc-server:$MVN_VERSION - mvn dependency:get -DrepoUrl=https://maven.openvidu.io/repository/snapshots/ -Dartifact=org.kurento:kurento-test:$MVN_VERSION + git clone https://github.com/Kurento/kurento-java.git + cd kurento-java && MVN_VERSION=$(mvn --batch-mode -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec) + cd ../openvidu && mvn --batch-mode versions:set-property -Dproperty=version.kurento -DnewVersion=$MVN_VERSION + mvn dependency:get -DrepoUrl=https://maven.openvidu.io/repository/snapshots/ -Dartifact=org.kurento:kurento-client:$MVN_VERSION + mvn dependency:get -DrepoUrl=https://maven.openvidu.io/repository/snapshots/ -Dartifact=org.kurento:kurento-jsonrpc-client-jetty:$MVN_VERSION + mvn dependency:get -DrepoUrl=https://maven.openvidu.io/repository/snapshots/ -Dartifact=org.kurento:kurento-jsonrpc-server:$MVN_VERSION + mvn dependency:get -DrepoUrl=https://maven.openvidu.io/repository/snapshots/ -Dartifact=org.kurento:kurento-test:$MVN_VERSION fi '''.stripIndent()) sh(script: '''#!/bin/bash @@ -44,10 +44,32 @@ node('container') { sh 'cd openvidu && mvn --batch-mode -DskipTests=true clean install' } stage('OpenVidu Browser build') { - sh 'cd openvidu/openvidu-browser && npm install --unsafe-perm && npm run build && npm link' + sh(script: '''#!/bin/bash + if [[ $OPENVIDU_BROWSER_COMMIT != "default" ]]; then + cd openvidu + git checkout $OPENVIDU_BROWSER_COMMIT + cd openvidu-browser + npm install --unsafe-perm && npm run build && npm link + cd .. + git checkout $OPENVIDU_COMMIT + else + cd openvidu/openvidu-browser && npm install --unsafe-perm && npm run build && npm link + fi + '''.stripIndent()) } stage('OpenVidu Node Client build') { - sh 'cd openvidu/openvidu-node-client && npm install --unsafe-perm && npm run build && npm link' + sh(script: '''#!/bin/bash + if [[ $OPENVIDU_NODE_CLIENT_COMMIT != "default" ]]; then + cd openvidu + git checkout $OPENVIDU_NODE_CLIENT_COMMIT + cd openvidu-node-client + npm install --unsafe-perm && npm run build && npm link + cd .. + git checkout $OPENVIDU_COMMIT + else + cd openvidu/openvidu-node-client && npm install --unsafe-perm && npm run build && npm link + fi + '''.stripIndent()) } stage('OpenVidu TestApp build') { sh 'cd openvidu/openvidu-testapp && npm install --unsafe-perm && npm link openvidu-browser && npm link openvidu-node-client && export NG_CLI_ANALYTICS=ci && ./node_modules/@angular/cli/bin/ng build --prod'