Skip to content

Commit

Permalink
Jenkinsfile: add -x flag in all bash scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
pabloFuente committed Nov 12, 2020
1 parent 70d30a5 commit 33831f8
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions openvidu-test-e2e/jenkins/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ node('container') {
sh 'rm -rf kurento-java || true'
sh 'git clone https://github.com/OpenVidu/openvidu.git'
sh 'cd openvidu && git fetch --all && git checkout $OPENVIDU_COMMIT'
sh(script: '''#!/bin/bash -e
sh(script: '''#!/bin/bash -xe
if [[ $KURENTO_JAVA_COMMIT != "default" ]]; then
git clone https://github.com/Kurento/kurento-java.git
cd kurento-java
git checkout -f $KURENTO_JAVA_COMMIT
mvn clean install
fi
'''.stripIndent())
sh(script: '''#!/bin/bash -e
sh(script: '''#!/bin/bash -xe
if $KURENTO_MEDIA_SERVER_DEV ; then
echo "Upgrading KMS to dev version"
sudo apt-get update && sudo apt-get install -y aptitude
Expand All @@ -39,7 +39,7 @@ node('container') {
}

stage('OpenVidu Browser build') {
sh(script: '''#!/bin/bash -e
sh(script: '''#!/bin/bash -xe
cd openvidu
if [[ $OPENVIDU_BROWSER_COMMIT != "default" ]]; then
git checkout -f $OPENVIDU_BROWSER_COMMIT
Expand All @@ -53,7 +53,7 @@ node('container') {
}

stage('OpenVidu Node Client build') {
sh(script: '''#!/bin/bash -e
sh(script: '''#!/bin/bash -xe
cd openvidu
if [[ $OPENVIDU_NODE_CLIENT_COMMIT != "default" ]]; then
git checkout -f $OPENVIDU_NODE_CLIENT_COMMIT
Expand All @@ -67,7 +67,7 @@ node('container') {
}

stage('OpenVidu TestApp build') {
sh(script: '''#!/bin/bash -e
sh(script: '''#!/bin/bash -xe
cd openvidu
if [[ $OPENVIDU_TESTAPP_COMMIT != "default" ]]; then
git checkout -f $OPENVIDU_TESTAPP_COMMIT
Expand All @@ -83,7 +83,7 @@ node('container') {
}

stage('OpenVidu Java Client build') {
sh(script: '''#!/bin/bash -e
sh(script: '''#!/bin/bash -xe
cd openvidu
if [[ $OPENVIDU_JAVA_CLIENT_COMMIT != "default" ]]; then
git checkout -f $OPENVIDU_JAVA_CLIENT_COMMIT
Expand All @@ -98,7 +98,7 @@ node('container') {
}

stage('OpenVidu parent build') {
sh(script: '''#!/bin/bash -e
sh(script: '''#!/bin/bash -xe
if [[ $KURENTO_JAVA_COMMIT != "default" ]]; then
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
Expand All @@ -117,7 +117,7 @@ node('container') {
}

stage('OpenVidu Server build') {
sh(script: '''#!/bin/bash -e
sh(script: '''#!/bin/bash -xe
cd openvidu/openvidu-server/src/dashboard && npm install --unsafe-perm && npm install /opt/openvidu/openvidu-browser-*.tgz && export NG_CLI_ANALYTICS="false" && npm run build-prod
cd ../..
mvn --batch-mode package
Expand All @@ -130,7 +130,7 @@ node('container') {
sh 'cd /opt/openvidu/testapp && http-server -S -p 4200 &> /opt/openvidu/testapp.log &'
sh '/usr/bin/kurento-media-server &> /kms.log &'
sh 'until $(curl --insecure --output /dev/null --silent http://127.0.0.1:8888/kurento); do echo "Waiting for KMS..."; sleep 1; done'
sh(script: '''#!/bin/bash -e
sh(script: '''#!/bin/bash -xe
if [ "$DOCKER_RECORDING_VERSION" != "default" ]; then
echo "Using custom openvidu-recording tag: $DOCKER_RECORDING_VERSION"
java -jar -DDOMAIN_OR_PUBLIC_IP=172.17.0.1 -DOPENVIDU_SECRET=MY_SECRET -DHTTPS_PORT=4443 -DOPENVIDU_RECORDING=true -DOPENVIDU_RECORDING_CUSTOM_LAYOUT=/opt/openvidu/test-layouts -DOPENVIDU_RECORDING_VERSION=$DOCKER_RECORDING_VERSION -DOPENVIDU_WEBHOOK=true -DOPENVIDU_WEBHOOK_ENDPOINT=http://127.0.0.1:7777/webhook /opt/openvidu/openvidu-server-*.jar &> openvidu-server.log &
Expand All @@ -144,7 +144,7 @@ node('container') {

stage ('OpenVidu E2E tests') {
try {
sh(script: '''#!/bin/bash -e
sh(script: '''#!/bin/bash -xe
cd openvidu
if [[ $OPENVIDU_TESTE2E_COMMIT != "default" ]]; then
git checkout -f $OPENVIDU_TESTE2E_COMMIT
Expand Down

0 comments on commit 33831f8

Please sign in to comment.