Jenkinsfile: add RelativeTargetDirectory

pull/658/head
pabloFuente 2021-10-26 14:59:15 +02:00
parent 7afbb8345c
commit 2b00cf8d7a
1 changed files with 5 additions and 1 deletions

View File

@ -1,17 +1,21 @@
node('container') {
// Load and execute common functions Groovy script
sh 'curl -O https://raw.githubusercontent.com/OpenVidu/openvidu/master/openvidu-test-e2e/jenkins/commonFunctions.groovy'
def commonFunctions = load 'commonFunctions.groovy'
commonFunctions.prepareTestingEnvironment()
// Clone and checkout OpenVidu/openvidu repository
def commitId = "${OPENVIDU_COMMIT}"
checkout([$class: 'GitSCM', branches: [[name: commitId]], userRemoteConfigs: [[url: 'https://github.com/OpenVidu/openvidu']]])
checkout([$class: 'GitSCM', branches: [[name: commitId]], userRemoteConfigs: [[url: 'https://github.com/OpenVidu/openvidu']], extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'openvidu']],])
// Volumes to use in container openvidu/openvidu-test-e2e
def bindsArray = ['-v /var/run/docker.sock:/var/run/docker.sock:rw',
'-v /dev/shm:/dev/shm',
'-v /opt/openvidu:/opt/openvidu',
'-v /opt/openvidu-cache/test-layouts:/opt/openvidu/test-layouts',
'-v /opt/openvidu-cache/.m2:/root/.m2'].join(' ')
// Run openvidu/openvidu-test-e2e 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 ' + "${bindsArray}" + ' --privileged') {
stage('Preparation') {
sh(script: '''#!/bin/bash -xe