From 1d53c87500a41b9922a16e9187f1a75703c7d6dd Mon Sep 17 00:00:00 2001 From: pabloFuente Date: Fri, 22 Oct 2021 11:47:00 +0200 Subject: [PATCH] Jenkinsfile: fix parallel syntax --- openvidu-test-e2e/jenkins/Jenkinsfile | 89 ++++++++++++++------------- 1 file changed, 46 insertions(+), 43 deletions(-) diff --git a/openvidu-test-e2e/jenkins/Jenkinsfile b/openvidu-test-e2e/jenkins/Jenkinsfile index 0144a5ce..f063178e 100644 --- a/openvidu-test-e2e/jenkins/Jenkinsfile +++ b/openvidu-test-e2e/jenkins/Jenkinsfile @@ -31,6 +31,7 @@ node('container') { ) docker.image('openvidu/openvidu-test-e2e:$DISTRO').inside('--name e2e -p 4200:4200 -p 4443:4443 -p 5555:5555 -u root -e MY_UID=0 -v /var/run/docker.sock:/var/run/docker.sock:rw -v /dev/shm:/dev/shm -v /opt/openvidu:/opt/openvidu --privileged') { + stage('Preparation') { sh 'rm -rf ~/.m2 || true' sh 'rm -rf openvidu || true' @@ -57,36 +58,53 @@ node('container') { '''.stripIndent()) } - parallel { + stage('Artifacts build') { + parallel { + + stage('OpenVidu Browser build') { + sh(script: '''#!/bin/bash -xe + cd openvidu + if [[ $OPENVIDU_BROWSER_COMMIT != "default" ]]; then + git checkout -f $OPENVIDU_BROWSER_COMMIT + fi + cd openvidu-browser + npm install --unsafe-perm && npm run build && npm pack + cp openvidu-browser-*.tgz /opt/openvidu + cd .. + git checkout -f $OPENVIDU_COMMIT + '''.stripIndent()) + } + + stage('OpenVidu Node Client build') { + sh(script: '''#!/bin/bash -xe + cd openvidu + if [[ $OPENVIDU_NODE_CLIENT_COMMIT != "default" ]]; then + git checkout -f $OPENVIDU_NODE_CLIENT_COMMIT + fi + cd openvidu-node-client + npm install --unsafe-perm && npm run build && npm pack + cp openvidu-node-client-*.tgz /opt/openvidu + cd .. + git checkout -f $OPENVIDU_COMMIT + '''.stripIndent()) + } + + stage('OpenVidu Java Client build') { + sh(script: '''#!/bin/bash -xe + cd openvidu + if [[ $OPENVIDU_JAVA_CLIENT_COMMIT != "default" ]]; then + git checkout -f $OPENVIDU_JAVA_CLIENT_COMMIT + fi + cd openvidu-java-client + mvn --batch-mode versions:set -DnewVersion=TEST + mvn clean compile package + mvn install:install-file -Dfile=target/openvidu-java-client-TEST.jar -DgroupId=io.openvidu -DartifactId=openvidu-java-client -Dversion=TEST -Dpackaging=jar + cd .. + git checkout -f $OPENVIDU_COMMIT + '''.stripIndent()) + } - stage('OpenVidu Browser build') { - sh(script: '''#!/bin/bash -xe - cd openvidu - if [[ $OPENVIDU_BROWSER_COMMIT != "default" ]]; then - git checkout -f $OPENVIDU_BROWSER_COMMIT - fi - cd openvidu-browser - npm install --unsafe-perm && npm run build && npm pack - cp openvidu-browser-*.tgz /opt/openvidu - cd .. - git checkout -f $OPENVIDU_COMMIT - '''.stripIndent()) } - - stage('OpenVidu Node Client build') { - sh(script: '''#!/bin/bash -xe - cd openvidu - if [[ $OPENVIDU_NODE_CLIENT_COMMIT != "default" ]]; then - git checkout -f $OPENVIDU_NODE_CLIENT_COMMIT - fi - cd openvidu-node-client - npm install --unsafe-perm && npm run build && npm pack - cp openvidu-node-client-*.tgz /opt/openvidu - cd .. - git checkout -f $OPENVIDU_COMMIT - '''.stripIndent()) - } - } stage('OpenVidu TestApp build') { @@ -105,21 +123,6 @@ node('container') { '''.stripIndent()) } - stage('OpenVidu Java Client build') { - sh(script: '''#!/bin/bash -xe - cd openvidu - if [[ $OPENVIDU_JAVA_CLIENT_COMMIT != "default" ]]; then - git checkout -f $OPENVIDU_JAVA_CLIENT_COMMIT - fi - cd openvidu-java-client - mvn --batch-mode versions:set -DnewVersion=TEST - mvn clean compile package - mvn install:install-file -Dfile=target/openvidu-java-client-TEST.jar -DgroupId=io.openvidu -DartifactId=openvidu-java-client -Dversion=TEST -Dpackaging=jar - cd .. - git checkout -f $OPENVIDU_COMMIT - '''.stripIndent()) - } - stage('OpenVidu parent build') { sh(script: '''#!/bin/bash -xe if [[ $KURENTO_JAVA_COMMIT != "default" ]]; then