mirror of https://gitee.com/bigwinds/arangodb
parent
38fc1536fc
commit
7879e4262f
|
@ -1,19 +1,53 @@
|
||||||
// -*- mode: groovy-mode
|
// -*- mode: groovy-mode
|
||||||
|
|
||||||
|
properties([
|
||||||
|
parameters([
|
||||||
|
booleanParam(
|
||||||
|
defaultValue: false,
|
||||||
|
description: 'clean build',
|
||||||
|
name: 'cleanBuild'
|
||||||
|
),
|
||||||
|
booleanParam(
|
||||||
|
defaultValue: false,
|
||||||
|
description: 'build enterprise',
|
||||||
|
name: 'buildEnterprise'
|
||||||
|
),
|
||||||
|
booleanParam(
|
||||||
|
defaultValue: true,
|
||||||
|
description: 'build Linux',
|
||||||
|
name: 'buildLinux'
|
||||||
|
),
|
||||||
|
booleanParam(
|
||||||
|
defaultValue: false,
|
||||||
|
description: 'build Mac',
|
||||||
|
name: 'buildMac'
|
||||||
|
),
|
||||||
|
booleanParam(
|
||||||
|
defaultValue: false,
|
||||||
|
description: 'build Windows',
|
||||||
|
name: 'buildWindows'
|
||||||
|
),
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
// start with empty build directory
|
// start with empty build directory
|
||||||
cleanBuild = false
|
cleanBuild = params.cleanBuild
|
||||||
|
|
||||||
// build enterprise version
|
// build enterprise version
|
||||||
buildEnterprise = false
|
buildEnterprise = params.buildEnterprise
|
||||||
|
|
||||||
// build linux
|
// build linux
|
||||||
buildLinux = true
|
buildLinux = params.buildLinux
|
||||||
|
|
||||||
// build mac
|
// build mac
|
||||||
buildMac = false
|
buildMac = params.buildMac
|
||||||
|
|
||||||
// build windows
|
// build windows
|
||||||
buildWindows = false
|
buildWindows = params.buildWindows
|
||||||
|
|
||||||
|
// -----------------------------------------------------------------------------
|
||||||
|
// --SECTION-- CONSTANTS AND HELPERS
|
||||||
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
// github repositiory for enterprise version
|
// github repositiory for enterprise version
|
||||||
enterpriseRepo = 'https://github.com/arangodb/enterprise'
|
enterpriseRepo = 'https://github.com/arangodb/enterprise'
|
||||||
|
@ -34,6 +68,10 @@ def PowerShell(psCmd) {
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
def checkoutCommunity() {
|
def checkoutCommunity() {
|
||||||
|
if (cleanBuild) {
|
||||||
|
sh 'rm -rf *'
|
||||||
|
}
|
||||||
|
|
||||||
retry(3) {
|
retry(3) {
|
||||||
try {
|
try {
|
||||||
checkout scm
|
checkout scm
|
||||||
|
@ -103,6 +141,16 @@ def checkCommitMessages() {
|
||||||
cleanBuild = true
|
cleanBuild = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (msg ==~ /(?i).*\[ci:[^\]]*no-clean[ \]].*/) {
|
||||||
|
echo "using clean build because message contained 'no-clean'"
|
||||||
|
cleanBuild = false
|
||||||
|
}
|
||||||
|
|
||||||
|
if (msg ==~ /(?i).*\[ci:[^\]]*linux[ \]].*/) {
|
||||||
|
echo "not building linux because message contained 'linux'"
|
||||||
|
buildLinux = true
|
||||||
|
}
|
||||||
|
|
||||||
if (msg ==~ /(?i).*\[ci:[^\]]*no-linux[ \]].*/) {
|
if (msg ==~ /(?i).*\[ci:[^\]]*no-linux[ \]].*/) {
|
||||||
echo "not building linux because message contained 'no-linux'"
|
echo "not building linux because message contained 'no-linux'"
|
||||||
buildLinux = false
|
buildLinux = false
|
||||||
|
@ -113,16 +161,31 @@ def checkCommitMessages() {
|
||||||
buildMac = true
|
buildMac = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (msg ==~ /(?i).*\[ci:[^\]]*no-mac[ \]].*/) {
|
||||||
|
echo "building mac because message contained 'no-mac'"
|
||||||
|
buildMac = false
|
||||||
|
}
|
||||||
|
|
||||||
if (msg ==~ /(?i).*\[ci:[^\]]*windows[ \]].*/) {
|
if (msg ==~ /(?i).*\[ci:[^\]]*windows[ \]].*/) {
|
||||||
echo "building windows because message contained 'windows'"
|
echo "building windows because message contained 'windows'"
|
||||||
buildWindows = true
|
buildWindows = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (msg ==~ /(?i).*\[ci:[^\]]*no-windows[ \]].*/) {
|
||||||
|
echo "building windows because message contained 'no-windows'"
|
||||||
|
buildWindows = false
|
||||||
|
}
|
||||||
|
|
||||||
if (msg ==~ /(?i).*\[ci:[^\]]*enterprise[ \]].*/) {
|
if (msg ==~ /(?i).*\[ci:[^\]]*enterprise[ \]].*/) {
|
||||||
echo "building enterprise because message contained 'enterprise'"
|
echo "building enterprise because message contained 'enterprise'"
|
||||||
buildEnterprise = true
|
buildEnterprise = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (msg ==~ /(?i).*\[ci:[^\]]*no-enterprise[ \]].*/) {
|
||||||
|
echo "building enterprise because message contained 'no-enterprise'"
|
||||||
|
buildEnterprise = false
|
||||||
|
}
|
||||||
|
|
||||||
def files = new ArrayList(entry.affectedFiles)
|
def files = new ArrayList(entry.affectedFiles)
|
||||||
|
|
||||||
for (int k = 0; k < files.size(); k++) {
|
for (int k = 0; k < files.size(); k++) {
|
||||||
|
@ -132,6 +195,12 @@ def checkCommitMessages() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echo 'Clean Build: ' + (cleanBuild ? 'true' : 'false')
|
||||||
|
echo 'Build Enterprise: ' + (buildEnterprise ? 'true' : 'false')
|
||||||
|
echo 'Build Linux: ' + (buildLinux ? 'true' : 'false')
|
||||||
|
echo 'Build Mac: ' + (buildMac ? 'true' : 'false')
|
||||||
|
echo 'Build Windows: ' + (buildWindows ? 'true' : 'false')
|
||||||
}
|
}
|
||||||
|
|
||||||
def stashSourceCode() {
|
def stashSourceCode() {
|
||||||
|
@ -293,7 +362,7 @@ if (buildLinux) {
|
||||||
def edition = 'community'
|
def edition = 'community'
|
||||||
|
|
||||||
node(os) {
|
node(os) {
|
||||||
echo "Running singleserver community rocksdb linux test"
|
echo "Running singleserver " + edition + " rocksdb " + os + " test"
|
||||||
|
|
||||||
unstashBinaries(edition, os)
|
unstashBinaries(edition, os)
|
||||||
testEdition(edition, os, 'singleserver', 'rocksdb')
|
testEdition(edition, os, 'singleserver', 'rocksdb')
|
||||||
|
@ -305,7 +374,7 @@ if (buildLinux) {
|
||||||
|
|
||||||
if (buildEnterprise) {
|
if (buildEnterprise) {
|
||||||
node(os) {
|
node(os) {
|
||||||
echo "Running singleserver enterprise mmfiles linux test"
|
echo "Running singleserver " + edition + " mmfiles " + os + " test"
|
||||||
|
|
||||||
unstashBinaries(edition, os)
|
unstashBinaries(edition, os)
|
||||||
testEdition(edition, os, 'singleserver', 'mmfiles')
|
testEdition(edition, os, 'singleserver', 'mmfiles')
|
||||||
|
|
|
@ -1,17 +1,31 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
concurrency="$1"
|
concurrency="$1"
|
||||||
engine="$2"
|
edition="$2"
|
||||||
|
engine="$3"
|
||||||
|
|
||||||
|
type="test_singleserver"
|
||||||
|
|
||||||
|
if [ "$edition" == community ]; then
|
||||||
|
type="${type}_${edition}"
|
||||||
|
elif [ "$edition" == enterprise ]; then
|
||||||
|
type="${type}_${edition}"
|
||||||
|
else
|
||||||
|
echo "$0: unknown edition '$edition', expecting 'community' or 'enterprise'"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$engine" == mmfiles ]; then
|
if [ "$engine" == mmfiles ]; then
|
||||||
type="test_singleserver_community_mmfiles_linux"
|
type="${type}_${engine}"
|
||||||
elif [ "$engine" == rocksdb ]; then
|
elif [ "$engine" == rocksdb ]; then
|
||||||
type="test_singleserver_community_rocksdb_linux"
|
type="${type}_${engine}"
|
||||||
else
|
else
|
||||||
echo "$0: unknown engine '$engine', expecting 'mmfiles' or 'rocksdb'"
|
echo "$0: unknown engine '$engine', expecting 'mmfiles' or 'rocksdb'"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
type="${type}_linux"
|
||||||
|
|
||||||
. ./Installation/Pipeline/include/test_log_info.inc
|
. ./Installation/Pipeline/include/test_log_info.inc
|
||||||
. ./Installation/Pipeline/include/test_setup_tmp.inc
|
. ./Installation/Pipeline/include/test_setup_tmp.inc
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
./Installation/Pipeline/include/test_singleserver_community_ENGINE_linux.inc $1 mmfiles
|
./Installation/Pipeline/include/test_singleserver_EDITION_ENGINE_linux.inc $1 community mmfiles
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
./Installation/Pipeline/include/test_singleserver_community_ENGINE_linux.inc $1 rocksdb
|
./Installation/Pipeline/include/test_singleserver_EDITION_ENGINE_linux.inc $1 community rocksdb
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
./Installation/Pipeline/include/test_singleserver_EDITION_ENGINE_linux.inc $1 enterprise mmfiles
|
Loading…
Reference in New Issue