mirror of https://github.com/OpenVidu/openvidu.git
Jenkinsfile: parallel stages
parent
1a2dd5b203
commit
7b8afcc21a
|
@ -1,19 +1,36 @@
|
||||||
node('container') {
|
node('container') {
|
||||||
|
|
||||||
sh 'docker rm -f e2e chrome firefox opera mediasoup || true'
|
sh 'docker rm -f e2e chrome firefox opera mediasoup || true'
|
||||||
sh 'rm -rf /opt/openvidu/* || true'
|
sh 'rm -rf /opt/openvidu/* || true'
|
||||||
|
parallel (
|
||||||
|
'Download fake video': {
|
||||||
sh 'wget https://github.com/OpenVidu/openvidu/raw/master/openvidu-test-e2e/docker/barcode.y4m -P /opt/openvidu'
|
sh 'wget https://github.com/OpenVidu/openvidu/raw/master/openvidu-test-e2e/docker/barcode.y4m -P /opt/openvidu'
|
||||||
|
},
|
||||||
|
'Download fake audio': {
|
||||||
sh 'wget https://github.com/OpenVidu/openvidu/raw/master/openvidu-test-e2e/docker/fakeaudio.wav -P /opt/openvidu'
|
sh 'wget https://github.com/OpenVidu/openvidu/raw/master/openvidu-test-e2e/docker/fakeaudio.wav -P /opt/openvidu'
|
||||||
|
},
|
||||||
|
'Download custom layout': {
|
||||||
sh 'wget --directory-prefix=/opt/openvidu/test-layouts/layout1 https://raw.githubusercontent.com/OpenVidu/openvidu/master/openvidu-test-e2e/docker/my-custom-layout/index.html'
|
sh 'wget --directory-prefix=/opt/openvidu/test-layouts/layout1 https://raw.githubusercontent.com/OpenVidu/openvidu/master/openvidu-test-e2e/docker/my-custom-layout/index.html'
|
||||||
|
}
|
||||||
|
)
|
||||||
|
parallel (
|
||||||
|
'Pull openvidu/openvidu-test-e2e': {
|
||||||
docker.image('openvidu/openvidu-test-e2e:$DISTRO').pull()
|
docker.image('openvidu/openvidu-test-e2e:$DISTRO').pull()
|
||||||
|
},
|
||||||
|
'Pull selenium/standalone-chrome': {
|
||||||
docker.image('selenium/standalone-chrome:latest').pull()
|
docker.image('selenium/standalone-chrome:latest').pull()
|
||||||
|
},
|
||||||
|
'Pull selenium/standalone-firefox': {
|
||||||
docker.image('selenium/standalone-firefox:latest').pull()
|
docker.image('selenium/standalone-firefox:latest').pull()
|
||||||
|
},
|
||||||
|
'Pull selenium/standalone-opera': {
|
||||||
docker.image('selenium/standalone-opera:latest').pull()
|
docker.image('selenium/standalone-opera:latest').pull()
|
||||||
|
},
|
||||||
|
'Pull openvidu/mediasoup-controller': {
|
||||||
docker.image('openvidu/mediasoup-controller:$MEDIASOUP_CONTROLLER_DOCKER_VERSION').pull()
|
docker.image('openvidu/mediasoup-controller:$MEDIASOUP_CONTROLLER_DOCKER_VERSION').pull()
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
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') {
|
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') {
|
stage('Preparation') {
|
||||||
sh 'rm -rf ~/.m2 || true'
|
sh 'rm -rf ~/.m2 || true'
|
||||||
sh 'rm -rf openvidu || true'
|
sh 'rm -rf openvidu || true'
|
||||||
|
@ -40,6 +57,8 @@ node('container') {
|
||||||
'''.stripIndent())
|
'''.stripIndent())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
parallel {
|
||||||
|
|
||||||
stage('OpenVidu Browser build') {
|
stage('OpenVidu Browser build') {
|
||||||
sh(script: '''#!/bin/bash -xe
|
sh(script: '''#!/bin/bash -xe
|
||||||
cd openvidu
|
cd openvidu
|
||||||
|
@ -68,6 +87,8 @@ node('container') {
|
||||||
'''.stripIndent())
|
'''.stripIndent())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
stage('OpenVidu TestApp build') {
|
stage('OpenVidu TestApp build') {
|
||||||
sh(script: '''#!/bin/bash -xe
|
sh(script: '''#!/bin/bash -xe
|
||||||
cd openvidu
|
cd openvidu
|
||||||
|
@ -141,7 +162,7 @@ node('container') {
|
||||||
openViduE2ETest('kurento')
|
openViduE2ETest('kurento')
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
echo "Test failed"
|
echo 'Test failed'
|
||||||
currentBuild.result = 'FAILURE'
|
currentBuild.result = 'FAILURE'
|
||||||
} finally {
|
} finally {
|
||||||
// Kill all environment for next test
|
// Kill all environment for next test
|
||||||
|
@ -159,7 +180,7 @@ node('container') {
|
||||||
openViduE2ETest('mediasoup')
|
openViduE2ETest('mediasoup')
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
echo "Test failed"
|
echo 'Test failed'
|
||||||
currentBuild.result = 'FAILURE'
|
currentBuild.result = 'FAILURE'
|
||||||
} finally {
|
} finally {
|
||||||
environmentStop()
|
environmentStop()
|
||||||
|
|
Loading…
Reference in New Issue