Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions jenkins/pipelines/dev_e2e/android/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ pipeline {
string(name: 'SGW_VERSION', defaultValue: '', description: "The version of Sync Gateway to download")
string(name: 'TS_DATASET_VERSION', defaultValue: '4.0', description: 'The version of the dataset to use on the test servers')
string(name: 'TS_TEST_FILTER', defaultValue: '', description: 'An optional filter for running a subset of tests')
booleanParam(name: 'RUN_PREBUILD', defaultValue: true, description: 'Prebuild the test server. Uncheck to skip prebuild entirely and reuse existing artifacts.')
}
options {
ansiColor('xterm')
Expand All @@ -24,6 +25,7 @@ pipeline {
}
}
stage('Prebuild Server') {
when { beforeAgent true; expression { params.RUN_PREBUILD } }
steps {
script {
build job: 'prebuild-test-server',
Expand Down
55 changes: 37 additions & 18 deletions jenkins/pipelines/dev_e2e/c/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ pipeline {
string(name: 'SGW_VERSION', defaultValue: '', description: "The version of Sync Gateway to download")
string(name: 'TS_DATASET_VERSION', defaultValue: '4.0', description: 'The version of the dataset to use on the test servers')
string(name: 'TS_TEST_FILTER', defaultValue: '', description: 'An optional filter for running a subset of tests')
booleanParam(name: 'RUN_PREBUILD', defaultValue: true, description: 'Prebuild test servers (only for the checked platforms). Uncheck to skip prebuild entirely and reuse existing artifacts.')
booleanParam(name: 'RUN_MACOS', defaultValue: true, description: 'Run macOS tests')
booleanParam(name: 'RUN_IOS', defaultValue: true, description: 'Run iOS tests')
booleanParam(name: 'RUN_ANDROID', defaultValue: true, description: 'Run Android tests')
booleanParam(name: 'RUN_LINUX', defaultValue: true, description: 'Run Linux tests')
booleanParam(name: 'RUN_WINDOWS', defaultValue: true, description: 'Run Windows tests')
}
options {
ansiColor('xterm')
Expand All @@ -26,34 +32,43 @@ pipeline {
}
}
stage('Prebuild Servers') {
when { beforeAgent true; expression { params.RUN_PREBUILD } }
steps {
script {
def platforms = [
'c_windows', 'c_ios', 'c_android', 'c_macos', 'c_linux_x86_64'
]
def parallelBuilds = [:]
for(p in platforms) {
// Groovy stupidness. Need to set a local variable here
// to avoid late binding (all jobs use dotnet_macos).
def platform = p
parallelBuilds[platform] = {
build job: 'prebuild-test-server',
parameters: [
string(name: 'TS_PLATFORM', value: platform),
string(name: 'CBL_VERSION', value: params.CBL_VERSION),
string(name: 'CBL_BUILD', value: params.CBL_BUILD)
],
wait: true,
propagate: true
def platforms = []
if (params.RUN_WINDOWS) { platforms << 'c_windows' }
if (params.RUN_IOS) { platforms << 'c_ios' }
if (params.RUN_ANDROID) { platforms << 'c_android' }
if (params.RUN_MACOS) { platforms << 'c_macos' }
if (params.RUN_LINUX) { platforms << 'c_linux_x86_64' }
if (platforms.isEmpty()) {
echo "No platforms selected — nothing to prebuild"
} else {
def parallelBuilds = [:]
for(p in platforms) {
// Groovy stupidness. Need to set a local variable here
// to avoid late binding (all jobs use dotnet_macos).
def platform = p
parallelBuilds[platform] = {
build job: 'prebuild-test-server',
parameters: [
string(name: 'TS_PLATFORM', value: platform),
string(name: 'CBL_VERSION', value: params.CBL_VERSION),
string(name: 'CBL_BUILD', value: params.CBL_BUILD)
],
wait: true,
propagate: true
}
}
parallel parallelBuilds
}
parallel parallelBuilds
}
}
}
stage('Run Tests') {
parallel {
stage('macOS') {
when { beforeAgent true; expression { params.RUN_MACOS } }
agent { label 'e2e&&macos-host' }
environment {
TS_ARTIFACTS_DIR = 'macos'
Expand Down Expand Up @@ -81,6 +96,7 @@ pipeline {
}
}
stage('iOS') {
when { beforeAgent true; expression { params.RUN_IOS } }
agent { label 'mob-e2e-iphone-03' }
environment {
KEYCHAIN_PASSWORD = credentials("${env.NODE_NAME}-keychain-password")
Expand Down Expand Up @@ -111,6 +127,7 @@ pipeline {
}
}
stage('Android') {
when { beforeAgent true; expression { params.RUN_ANDROID } }
agent { label 'mob-e2e-android-01' }
environment {
TS_ARTIFACTS_DIR = 'android'
Expand Down Expand Up @@ -138,6 +155,7 @@ pipeline {
}
}
stage('linux') {
when { beforeAgent true; expression { params.RUN_LINUX } }
agent { label 'e2e&&linux-host' }
environment {
TS_ARTIFACTS_DIR = 'linux_x86_64'
Expand Down Expand Up @@ -165,6 +183,7 @@ pipeline {
}
}
stage('windows') {
when { beforeAgent true; expression { params.RUN_WINDOWS } }
agent { label 'e2e&&windows-host' }
steps {
lock("${env.NODE_NAME}") {
Expand Down
52 changes: 34 additions & 18 deletions jenkins/pipelines/dev_e2e/dotnet/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ pipeline {
string(name: 'SGW_VERSION', defaultValue: '', description: "The version of Sync Gateway to download")
string(name: 'TS_DATASET_VERSION', defaultValue: '4.0', description: 'The version of the dataset to use on the test servers')
string(name: 'TS_TEST_FILTER', defaultValue: '', description: 'An optional filter for running a subset of tests')
booleanParam(name: 'RUN_PREBUILD', defaultValue: true, description: 'Prebuild test servers (only for the checked platforms). Uncheck to skip prebuild entirely and reuse existing artifacts.')
booleanParam(name: 'RUN_WINDOWS', defaultValue: true, description: 'Run Windows tests')
booleanParam(name: 'RUN_MACOS', defaultValue: true, description: 'Run Mac Catalyst tests')
booleanParam(name: 'RUN_IOS', defaultValue: true, description: 'Run iOS tests')
booleanParam(name: 'RUN_ANDROID', defaultValue: true, description: 'Run Android tests')
}
options {
ansiColor('xterm')
Expand All @@ -25,34 +30,42 @@ pipeline {
}
}
stage('Prebuild Servers') {
when { beforeAgent true; expression { params.RUN_PREBUILD } }
steps {
script {
def platforms = [
'dotnet_windows', 'dotnet_ios', 'dotnet_android', 'dotnet_macos'
]
def parallelBuilds = [:]
for(p in platforms) {
// Groovy stupidness. Need to set a local variable here
// to avoid late binding (all jobs use dotnet_macos).
def platform = p
parallelBuilds[platform] = {
build job: 'prebuild-test-server',
parameters: [
string(name: 'TS_PLATFORM', value: platform),
string(name: 'CBL_VERSION', value: params.CBL_VERSION),
string(name: 'CBL_BUILD', value: params.CBL_BUILD)
],
wait: true,
propagate: true
def platforms = []
if (params.RUN_WINDOWS) { platforms << 'dotnet_windows' }
if (params.RUN_IOS) { platforms << 'dotnet_ios' }
if (params.RUN_ANDROID) { platforms << 'dotnet_android' }
if (params.RUN_MACOS) { platforms << 'dotnet_macos' }
if (platforms.isEmpty()) {
echo "No platforms selected — nothing to prebuild"
} else {
def parallelBuilds = [:]
for(p in platforms) {
// Groovy stupidness. Need to set a local variable here
// to avoid late binding (all jobs use dotnet_macos).
def platform = p
parallelBuilds[platform] = {
build job: 'prebuild-test-server',
parameters: [
string(name: 'TS_PLATFORM', value: platform),
string(name: 'CBL_VERSION', value: params.CBL_VERSION),
string(name: 'CBL_BUILD', value: params.CBL_BUILD)
],
wait: true,
propagate: true
}
}
parallel parallelBuilds
}
parallel parallelBuilds
}
}
}
stage('Run Tests') {
parallel {
stage("Windows") {
when { beforeAgent true; expression { params.RUN_WINDOWS } }
agent { label 'e2e&&windows-host' }
environment {
TS_ARTIFACTS_DIR = 'windows'
Expand All @@ -78,6 +91,7 @@ pipeline {
}
}
stage("Mac Catalyst") {
when { beforeAgent true; expression { params.RUN_MACOS } }
agent { label 'e2e&&macos-host' }
environment {
KEYCHAIN_PASSWORD = credentials("${env.NODE_NAME}-keychain-password")
Expand Down Expand Up @@ -105,6 +119,7 @@ pipeline {
}
}
stage('iOS') {
when { beforeAgent true; expression { params.RUN_IOS } }
agent { label 'mob-e2e-iphone-03' }
environment {
KEYCHAIN_PASSWORD = credentials("${env.NODE_NAME}-keychain-password")
Expand Down Expand Up @@ -132,6 +147,7 @@ pipeline {
}
}
stage('Android') {
when { beforeAgent true; expression { params.RUN_ANDROID } }
agent { label 'mob-e2e-android-01' }
environment {
TS_ARTIFACTS_DIR = 'android'
Expand Down
2 changes: 2 additions & 0 deletions jenkins/pipelines/dev_e2e/ios/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ pipeline {
string(name: 'SGW_VERSION', defaultValue: '', description: "The version of Sync Gateway to download")
string(name: 'TS_DATASET_VERSION', defaultValue: '4.0', description: 'The version of the dataset to use on the test servers')
string(name: 'TS_TEST_FILTER', defaultValue: '', description: 'An optional filter for running a subset of tests')
booleanParam(name: 'RUN_PREBUILD', defaultValue: true, description: 'Prebuild the test server. Uncheck to skip prebuild entirely and reuse existing artifacts.')
}
options {
ansiColor('xterm')
Expand All @@ -25,6 +26,7 @@ pipeline {
}
}
stage('Prebuild Server') {
when { beforeAgent true; expression { params.RUN_PREBUILD } }
steps {
script {
build job: 'prebuild-test-server',
Expand Down
59 changes: 41 additions & 18 deletions jenkins/pipelines/dev_e2e/java/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ pipeline {
string(name: 'SGW_VERSION', defaultValue: '', description: "The version of Sync Gateway to download")
string(name: 'TS_DATASET_VERSION', defaultValue: '4.0', description: 'The version of the dataset to use on the test servers')
string(name: 'TS_TEST_FILTER', defaultValue: '', description: 'An optional filter for running a subset of tests')
booleanParam(name: 'RUN_PREBUILD', defaultValue: true, description: 'Prebuild test servers (only for the checked platforms). Uncheck to skip prebuild entirely and reuse existing artifacts.')
booleanParam(name: 'RUN_MACOS_DESKTOP', defaultValue: true, description: 'Run macOS Desktop tests')
booleanParam(name: 'RUN_WINDOWS_DESKTOP', defaultValue: true, description: 'Run Windows Desktop tests')
booleanParam(name: 'RUN_LINUX_DESKTOP', defaultValue: true, description: 'Run Linux Desktop tests')
booleanParam(name: 'RUN_MACOS_WEBSERVICE', defaultValue: true, description: 'Run macOS Web Service tests')
booleanParam(name: 'RUN_WINDOWS_WEBSERVICE', defaultValue: true, description: 'Run Windows Web Service tests')
booleanParam(name: 'RUN_LINUX_WEBSERVICE', defaultValue: true, description: 'Run Linux Web Service tests')
}
options {
ansiColor('xterm')
Expand All @@ -26,28 +33,38 @@ pipeline {
}

stage('Prebuild Servers') {
when { beforeAgent true; expression { params.RUN_PREBUILD } }
steps {
script {
def platforms = [
'jak_desktop', 'jak_webservice'
]
def parallelBuilds = [:]
for(p in platforms) {
// Groovy stupidness. Need to set a local variable here
// to avoid late binding (all jobs use dotnet_macos).
def platform = p
parallelBuilds[platform] = {
build job: 'prebuild-test-server',
parameters: [
string(name: 'TS_PLATFORM', value: platform),
string(name: 'CBL_VERSION', value: params.CBL_VERSION),
string(name: 'CBL_BUILD', value: params.CBL_BUILD)
],
wait: true,
propagate: true
// Each server flavor is prebuilt only when at least one of its
// test stages is selected.
def anyDesktop = params.RUN_MACOS_DESKTOP || params.RUN_WINDOWS_DESKTOP || params.RUN_LINUX_DESKTOP
def anyWebService = params.RUN_MACOS_WEBSERVICE || params.RUN_WINDOWS_WEBSERVICE || params.RUN_LINUX_WEBSERVICE

def platforms = []
if (anyDesktop) { platforms << 'jak_desktop' }
if (anyWebService) { platforms << 'jak_webservice' }
if (platforms.isEmpty()) {
echo "No platforms selected — nothing to prebuild"
} else {
def parallelBuilds = [:]
for(p in platforms) {
// Groovy stupidness. Need to set a local variable here
// to avoid late binding (all jobs use dotnet_macos).
def platform = p
parallelBuilds[platform] = {
build job: 'prebuild-test-server',
parameters: [
string(name: 'TS_PLATFORM', value: platform),
string(name: 'CBL_VERSION', value: params.CBL_VERSION),
string(name: 'CBL_BUILD', value: params.CBL_BUILD)
],
wait: true,
propagate: true
}
}
parallel parallelBuilds
}
parallel parallelBuilds
}
}
}
Expand All @@ -59,6 +76,7 @@ pipeline {
stage('Tests') {
parallel {
stage('OSX Desktop Test') {
when { beforeAgent true; expression { params.RUN_MACOS_DESKTOP } }
agent { label 'e2e&&macos-host' }
environment {
TS_ARTIFACTS_DIR = 'macos_desktop'
Expand Down Expand Up @@ -93,6 +111,7 @@ pipeline {
}

stage('Windows Desktop Test') {
when { beforeAgent true; expression { params.RUN_WINDOWS_DESKTOP } }
agent { label 'e2e&&windows-host' }
environment {
TS_ARTIFACTS_DIR = 'windows_desktop'
Expand Down Expand Up @@ -125,6 +144,7 @@ pipeline {
}

stage('Linux Desktop Test') {
when { beforeAgent true; expression { params.RUN_LINUX_DESKTOP } }
agent { label 'e2e&&linux-host' }
environment {
TS_ARTIFACTS_DIR = 'linux_desktop'
Expand Down Expand Up @@ -159,6 +179,7 @@ pipeline {
}

stage('OSX Web Service Test') {
when { beforeAgent true; expression { params.RUN_MACOS_WEBSERVICE } }
agent { label 'e2e&&macos-host' }
environment {
TS_ARTIFACTS_DIR = 'macos_webservice'
Expand Down Expand Up @@ -193,6 +214,7 @@ pipeline {
}

stage('Windows Web Service Test') {
when { beforeAgent true; expression { params.RUN_WINDOWS_WEBSERVICE } }
agent { label 'e2e&&windows-host' }
environment {
TS_ARTIFACTS_DIR = 'windows_webservice'
Expand Down Expand Up @@ -227,6 +249,7 @@ pipeline {
}

stage('Linux Web Service Test') {
when { beforeAgent true; expression { params.RUN_LINUX_WEBSERVICE } }
agent { label 'e2e&&linux-host' }
environment {
TS_ARTIFACTS_DIR = 'linux_webservice'
Expand Down
2 changes: 2 additions & 0 deletions jenkins/pipelines/dev_e2e/javascript/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ pipeline {
string(name: 'CBL_BUILD', defaultValue: '', description: 'Couchbase Lite Build Number')
string(name: 'SGW_VERSION', defaultValue: '', description: "The version of Sync Gateway to download")
string(name: 'TS_TEST_FILTER', defaultValue: '', description: 'An optional filter for running a subset of tests')
booleanParam(name: 'RUN_PREBUILD', defaultValue: true, description: 'Prebuild the test server. Uncheck to skip prebuild entirely and reuse existing artifacts.')
}
options {
ansiColor('xterm')
Expand All @@ -24,6 +25,7 @@ pipeline {
}
}
stage('Prebuild Server') {
when { beforeAgent true; expression { params.RUN_PREBUILD } }
steps {
script {
build job: 'prebuild-test-server',
Expand Down
Loading