1
0
Fork 0

Feature/jenkins pipeline (#2691)

This commit is contained in:
Frank Celler 2017-06-28 21:51:44 +02:00 committed by GitHub
parent 8f666990c3
commit e8fd6be407
3 changed files with 29 additions and 15 deletions

View File

@ -1,9 +1,14 @@
// -*- mode: groovy-mode
echo "BRANCH_NAME: " + env.BRANCH_NAME
echo "CHANGE_ID: " + env.CHANGE_ID
echo "CHANGE_TARGET: " + env.CHANGE_TARGET
echo "JOB_NAME: " + env.JOB_NAME
properties([
parameters([
booleanParam(
defaultValue: false,
defaultValue: true,
description: 'build and run tests on Linux',
name: 'Linux'
),
@ -23,7 +28,7 @@ properties([
name: 'cleanBuild'
),
booleanParam(
defaultValue: false,
defaultValue: true,
description: 'build and run tests for community',
name: 'buildCommunity'
),
@ -43,7 +48,7 @@ properties([
name: 'runResilience'
),
booleanParam(
defaultValue: false,
defaultValue: true,
description: 'run tests',
name: 'runTests'
)
@ -84,6 +89,10 @@ runTests = params.runTests
// --SECTION-- CONSTANTS AND HELPERS
// -----------------------------------------------------------------------------
// users
jenkinsMaster = 'jenkins-master@c1'
jenkinsSlave = 'jenkins'
// github repositiory for resilience tests
resilienceRepo = 'https://github.com/arangodb/resilience-tests'
@ -247,14 +256,14 @@ def unstashSourceCode(os) {
if (os == 'linux' || os == 'mac') {
lock('cache') {
sh 'scp "jenkins@c1:' + cacheDir + '/source.zip" source.zip'
sh 'scp "' + jenkinsMaster + ':' + cacheDir + '/source.zip" source.zip'
}
sh 'unzip -o -q source.zip'
}
else if (os == 'windows') {
lock('cache') {
bat 'scp -F c:/Users/jenkins/ssh_config "jenkins@c1:' + cacheDir + '/source.zip" source.zip'
bat 'scp -F c:/Users/jenkins/ssh_config "' + jenkinsMaster + ':' + cacheDir + '/source.zip" source.zip'
}
bat 'c:\\cmake\\bin\\cmake -E tar xf source.zip'
@ -269,7 +278,7 @@ def stashBuild(edition, os) {
sh 'zip -r -1 -y -q ' + name + ' build-' + edition
lock('cache') {
sh 'scp ' + name + ' "jenkins@c1:' + cacheDir + '"'
sh 'scp ' + name + ' "' + jenkinsMaster + ':' + cacheDir + '"'
}
}
else if (os == 'windows') {
@ -277,7 +286,7 @@ def stashBuild(edition, os) {
PowerShell('Compress -Archive -Path build-' + edition + ' -DestinationPath ' + name)
lock('cache') {
bat 'scp -F c:/Users/jenkins/ssh_config ' + name + ' "jenkins@c1:' + cacheDir + '"'
bat 'scp -F c:/Users/jenkins/ssh_config ' + name + ' "' + jenkinsMaster + ':' + cacheDir + '"'
}
}
}
@ -287,14 +296,14 @@ def unstashBuild(edition, os) {
if (os == 'linux' || os == 'mac') {
lock('cache') {
sh 'scp "jenkins@c1:' + cacheDir + '/' + name + '" ' + name
sh 'scp "' + jenkinsMaster + ':' + cacheDir + '/' + name + '" ' + name
}
sh 'unzip -o -q ' + name
}
else if (os == 'windows') {
lock('cache') {
bat 'scp -F c:/Users/jenkins/ssh_config "jenkins@c1:' + cacheDir + '/' + name + '" ' + name
bat 'scp -F c:/Users/jenkins/ssh_config "' + jenkinsMaster + ':' + cacheDir + '/' + name + '" ' + name
}
bat 'c:\\cmake\\bin\\cmake -E tar xf ' + name
@ -315,7 +324,7 @@ def stashBinaries(edition, os) {
}
lock('cache') {
sh 'scp ' + name + ' "jenkins@c1:' + cacheDir + '"'
sh 'scp ' + name + ' "' + jenkinsMaster + ':' + cacheDir + '"'
}
}
}
@ -327,7 +336,7 @@ def unstashBinaries(edition, os) {
if (os == 'linux' || os == 'mac') {
lock('cache') {
sh 'scp "jenkins@c1:' + cacheDir + '/' + name + '" ' + name
sh 'scp "' + jenkinsMaster + ':' + cacheDir + '/' + name + '" ' + name
}
sh 'unzip -o -q ' + name

View File

@ -1,6 +1,7 @@
echo "TYPE: $type"
test -z "$type" || echo "TYPE: $type"
test -z "$foxx" || echo "FOXX: $foxx"
echo "ENGINE: $engine"
echo "CONCURRENY: $concurrency"
test -z "$concurrency" || echo "CONCURRENY: $concurrency"
echo "HOST: `hostname`"
echo "PWD: `pwd`"
echo "CORE PATTERN: `cat /proc/sys/kernel/core_pattern`"

View File

@ -2,6 +2,9 @@ foxx="$1"
engine="$2"
os="$3"
. ./Installation/Pipeline/include/test_log_info.inc
. ./Installation/Pipeline/include/test_setup_tmp.inc
PORT01=`./Installation/Pipeline/port.sh`
PORTTRAP="./Installation/Pipeline/port.sh --clean $PORT01 ;"
@ -15,8 +18,7 @@ trap "$PORTTRAP" EXIT
ln -s ../etc .
ln -s ../js .
npm install
./build/bin/arangod --version
npm install > ../log-output/npm-install.log 2>&1
if [ "$foxx" == yes ]; then
TESTS=$(find test/* -name "*foxx*")
@ -24,6 +26,8 @@ trap "$PORTTRAP" EXIT
TESTS=$(find test/* -not -name "*foxx*")
fi
echo "TESTS: $TESTS"
MIN_PORT=`expr $PORT01 + 0` \
MAX_PORT=`expr $PORT01 + 1999` \
PORT_OFFSET=10 \