Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 38 additions & 17 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -39,6 +43,8 @@ timestampedNode('SLAVE') {
./autotest.sh pgsql
'''
}

stage 'PHPUnit 5.6/oci'
executeAndReport('tests/autotest-results-oci.xml') {
sh '''
export NOCOVERAGE=1
Expand All @@ -48,28 +54,34 @@ 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
unset USEDOCKER
./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
unset USEDOCKER
./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
unset USEDOCKER
./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
Expand All @@ -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

Expand All @@ -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) {
Expand All @@ -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'
Expand Down