From a2daa6baa049584467caac3c33ef4a4155b95d3b Mon Sep 17 00:00:00 2001 From: pabloFuente Date: Fri, 11 Sep 2020 12:35:42 +0200 Subject: [PATCH] Jenkinsfile updated to not overwrite branch changes --- openvidu-test-e2e/jenkins/Jenkinsfile | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/openvidu-test-e2e/jenkins/Jenkinsfile b/openvidu-test-e2e/jenkins/Jenkinsfile index 7c656b54..37073784 100644 --- a/openvidu-test-e2e/jenkins/Jenkinsfile +++ b/openvidu-test-e2e/jenkins/Jenkinsfile @@ -15,7 +15,7 @@ node('container') { sh 'rm -rf openvidu || true' sh 'rm -rf kurento-java || true' sh 'git clone https://github.com/OpenVidu/openvidu.git' - sh 'cd openvidu && git fetch origin && git checkout $OPENVIDU_COMMIT' + sh 'cd openvidu && git fetch --all && git checkout $OPENVIDU_COMMIT' sh(script: '''#!/bin/bash if $KURENTO_JAVA_SNAPSHOT ; then git clone https://github.com/Kurento/kurento-java.git @@ -42,28 +42,26 @@ node('container') { sh(script: '''#!/bin/bash cd openvidu if [[ $OPENVIDU_BROWSER_COMMIT != "default" ]]; then - git checkout -f $OPENVIDU_BROWSER_COMMIT + git checkout $OPENVIDU_BROWSER_COMMIT fi cd openvidu-browser - npm install --unsafe-perm && npm run build - npm pack + npm install --unsafe-perm && npm run build && npm pack cp openvidu-browser-*.tgz /opt/openvidu cd .. - git checkout -f $OPENVIDU_COMMIT + git checkout $OPENVIDU_COMMIT '''.stripIndent()) } stage('OpenVidu Node Client build') { sh(script: '''#!/bin/bash cd openvidu if [[ $OPENVIDU_NODE_CLIENT_COMMIT != "default" ]]; then - git checkout -f $OPENVIDU_NODE_CLIENT_COMMIT + git checkout $OPENVIDU_NODE_CLIENT_COMMIT fi cd openvidu-node-client - npm install --unsafe-perm && npm run build - npm pack + npm install --unsafe-perm && npm run build && npm pack cp openvidu-node-client-*.tgz /opt/openvidu cd .. - git checkout -f $OPENVIDU_COMMIT + git checkout $OPENVIDU_COMMIT '''.stripIndent()) } stage('OpenVidu TestApp build') {