From fa3d4f609718c1cfc8cd6261c20e9ac600f3b477 Mon Sep 17 00:00:00 2001 From: pabloFuente Date: Fri, 22 Oct 2021 11:57:00 +0200 Subject: [PATCH] Jenkinsfile: fix parallel syntax --- openvidu-test-e2e/jenkins/Jenkinsfile | 88 +++++++++++++-------------- 1 file changed, 43 insertions(+), 45 deletions(-) diff --git a/openvidu-test-e2e/jenkins/Jenkinsfile b/openvidu-test-e2e/jenkins/Jenkinsfile index f063178e..a67331a8 100644 --- a/openvidu-test-e2e/jenkins/Jenkinsfile +++ b/openvidu-test-e2e/jenkins/Jenkinsfile @@ -59,51 +59,49 @@ node('container') { } 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()) - } - + parallel openviduBrowser: { + 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()) + } + }, openviduNodeClient: { + 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()) + } + }, openviduJavaClient: { + 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()) + } } }