diff --git a/Jenkinsfile b/Jenkinsfile index 3ac90adfd96a..1f1362e7abcd 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -14,7 +14,7 @@ timestampedNode('SLAVE') { sh '''./autotest-js.sh''' } - stage 'PHPUnit' + stage 'PHPUnit 7.0/sqlite' executeAndReport('tests/autotest-results-sqlite.xml') { sh ''' export NOCOVERAGE=1 @@ -23,14 +23,18 @@ timestampedNode('SLAVE') { ./autotest.sh sqlite ''' } + + stage 'PHPUnit 7.0/mysql' executeAndReport('tests/autotest-results-mysql.xml') { sh ''' export NOCOVERAGE=1 unset USEDOCKER - phpenv local 5.4 + phpenv local 7.0 ./autotest.sh mysql ''' } + + stage 'PHPUnit 5.6/pgsql' executeAndReport('tests/autotest-results-pgsql.xml') { sh ''' export NOCOVERAGE=1 @@ -39,6 +43,8 @@ timestampedNode('SLAVE') { ./autotest.sh pgsql ''' } + + stage 'PHPUnit 5.6/oci' executeAndReport('tests/autotest-results-oci.xml') { sh ''' export NOCOVERAGE=1 @@ -48,7 +54,7 @@ timestampedNode('SLAVE') { ''' } - stage 'Files External Testing' + stage 'Files External: webdav' executeAndReport('tests/autotest-external-results-sqlite-webdav-ownCloud.xml') { sh '''phpenv local 7.0 export NOCOVERAGE=1 @@ -56,6 +62,8 @@ timestampedNode('SLAVE') { ./autotest-external.sh sqlite webdav-ownCloud ''' } + + stage 'Files External: SMB/SAMBA' executeAndReport('tests/autotest-external-results-sqlite-smb-silvershell.xml') { sh '''phpenv local 7.0 export NOCOVERAGE=1 @@ -63,6 +71,8 @@ timestampedNode('SLAVE') { ./autotest-external.sh sqlite smb-silvershell ''' } + + stage 'Files External: swift/ceph' executeAndReport('tests/autotest-external-results-sqlite-swift-ceph.xml') { sh '''phpenv local 7.0 export NOCOVERAGE=1 @@ -70,6 +80,8 @@ timestampedNode('SLAVE') { ./autotest-external.sh sqlite swift-ceph ''' } + + stage 'Files External: SMB/WINDOWS' executeAndReport('tests/autotest-external-results-sqlite-smb-windows.xml') { sh '''phpenv local 7.0 export NOCOVERAGE=1 @@ -80,7 +92,7 @@ timestampedNode('SLAVE') { step([$class: 'JUnitResultArchiver', testResults: 'tests/autotest-external-results-sqlite.xml']) - stage 'Primary Objectstore Test - Swift' + stage 'Primary Objectstore: swift' executeAndReport('tests/autotest-results-mysql.xml') { sh '''phpenv local 7.0 @@ -94,18 +106,27 @@ timestampedNode('SLAVE') { ''' } - stage 'Integration Testing' - executeAndReport('build/integration/output/*.xml') { - sh '''phpenv local 7.0 - rm -rf config/config.php - ./occ maintenance:install --admin-pass=admin - rm -rf build/integration/output - rm -rf build/integration/vendor - rm -rf build/integration/composer.lock - cd build/integration - ./run.sh - ''' - } + if (isOnReleaseBranch()) { + stage 'Integration Testing' + executeAndReport('build/integration/output/*.xml') { + sh '''phpenv local 7.0 + rm -rf config/config.php + ./occ maintenance:install --admin-pass=admin + rm -rf build/integration/output + rm -rf build/integration/vendor + rm -rf build/integration/composer.lock + cd build/integration + ./run.sh + ''' + } + } +} + +def isOnReleaseBranch () { + if (env.BRANCH_NAME == 'master' || env.BRANCH_NAME == 'stable9.1' || env.BRANCH_NAME == 'stable9' || env.BRANCH_NAME == 'stable8.2') { + return true; + } + return false } void executeAndReport(String testResultLocation, def body) { @@ -124,7 +145,7 @@ void executeAndReport(String testResultLocation, def body) { if (failed) { - if (env.BRANCH_NAME == 'master' || env.BRANCH_NAME == 'stable9.1' || env.BRANCH_NAME == 'stable9' || env.BRANCH_NAME == 'stable8.2') { + if (isOnReleaseBranch()) { mail body: "project build error is here: ${env.BUILD_URL}" , subject: "Build on release branch failed: ${env.BRANCH_NAME}", to: 'jenkins@owncloud.com'