@@ -19,18 +19,47 @@ pipeline {
1919 if (params. CBL_BUILD == ' ' ) { error " CBL_BUILD is required" }
2020 if (params. CBL_DATASET_VERSION == ' ' ) { error " CBL_DATASET_VERSION is required" }
2121 if (params. SGW_VERSION == ' ' ) { error " SGW_VERSION is required" }
22- currentBuild. displayName = " ${ params.CBL_VERSION} -${ params.CBL_BUILD} - ${ CBL_EDITION } "
23- currentBuild. description = " Dataset: ${ params.CBL_DATASET_VERSION } / SGW: ${ params.SGW_VERSION} "
22+ currentBuild. displayName = " ${ params.CBL_VERSION} -${ params.CBL_BUILD} "
23+ currentBuild. description = " SGW: ${ params.SGW_VERSION} "
2424 }
2525 }
2626 }
27- stage(' Desktop' ) {
27+ stage(' Prebuild Servers' ) {
28+ steps {
29+ script {
30+ def platforms = [
31+ ' dotnet_windows' , ' dotnet_ios' , ' dotnet_android' , ' dotnet_macos'
32+ ]
33+ def parallelBuilds = [:]
34+ for (p in platforms) {
35+ // Groovy stupidness. Need to set a local variable here
36+ // to avoid late binding (all jobs use dotnet_macos).
37+ def platform = p
38+ parallelBuilds[platform] = {
39+ build job : ' prebuild-test-server' ,
40+ parameters : [
41+ string(name : ' TS_PLATFORM' , value : platform),
42+ string(name : ' CBL_VERSION' , value : params. CBL_VERSION ),
43+ string(name : ' CBL_BUILD' , value : params. CBL_BUILD )
44+ ],
45+ wait : true ,
46+ propagate : true
47+ }
48+ }
49+ parallel parallelBuilds
50+ }
51+ }
52+ }
53+ stage(' Run Tests' ) {
2854 parallel {
2955 stage(" Windows" ) {
3056 agent { label ' mob-e2e-win-01' }
3157 options {
3258 lock(" mob-e2e-win-01" )
3359 }
60+ environment {
61+ TS_ARTIFACTS_DIR = ' windows'
62+ }
3463 steps {
3564 timeout(time : 60 , unit : ' MINUTES' ) {
3665 pwsh " jenkins\\ pipelines\\ dev_e2e\\ dotnet\\ run_test.ps1 -Version ${ params.CBL_VERSION} -${ params.CBL_BUILD} -Dataset ${ params.CBL_DATASET_VERSION} -SgwVersion ${ params.SGW_VERSION} -PrivateKeyPath C:\\ Users\\ mob-e\\ .ssh\\ jborden.pem"
@@ -41,8 +70,7 @@ pipeline {
4170 timeout(time : 5 , unit : ' MINUTES' ) {
4271 pwsh ' jenkins\\ pipelines\\ dev_e2e\\ dotnet\\ teardown.ps1'
4372 }
44- archiveArtifacts artifacts : ' tests\\ dev_e2e\\ session.log' , fingerprint : true , allowEmptyArchive : true
45- archiveArtifacts artifacts : ' tests\\ dev_e2e\\ http_log\\ *' , fingerprint : true , allowEmptyArchive : true
73+ archiveArtifacts artifacts : ' tests\\ dev_e2e\\ windows\\ **' , fingerprint : true , allowEmptyArchive : true
4674 }
4775 }
4876 }
@@ -55,6 +83,7 @@ pipeline {
5583 KEYCHAIN_PASSWORD = credentials(' mob-e2e-mac-01-keychain-password' )
5684 DEVELOPER_DIR = " /Applications/Xcode.app"
5785 MD_APPLE_SDK_ROOT = " /Applications/Xcode.app"
86+ TS_ARTIFACTS_DIR = ' macos'
5887 }
5988 steps {
6089 sh ' security unlock-keychain -p ${KEYCHAIN_PASSWORD} ~/Library/Keychains/login.keychain-db'
@@ -67,56 +96,57 @@ pipeline {
6796 timeout(time : 5 , unit : ' MINUTES' ) {
6897 sh ' jenkins/pipelines/dev_e2e/dotnet/teardown.sh'
6998 }
70- archiveArtifacts artifacts : ' tests/dev_e2e/session.log' , fingerprint : true , allowEmptyArchive : true
71- archiveArtifacts artifacts : ' tests/dev_e2e/http_log/*' , fingerprint : true , allowEmptyArchive : true
99+ archiveArtifacts artifacts : ' tests/dev_e2e/macos/**' , fingerprint : true , allowEmptyArchive : true
72100 }
73101 }
74102 }
75- }
76- }
77- stage(' iOS' ) {
78- options {
79- lock(" mob-e2e-iphone-01" )
80- }
81- environment {
82- KEYCHAIN_PASSWORD = credentials(' mob-e2e-mac-01-keychain-password' )
83- DEVELOPER_DIR = " /Applications/Xcode.app"
84- MD_APPLE_SDK_ROOT = " /Applications/Xcode.app"
85- }
86- agent { label ' mob-e2e-mac-01' }
87- steps {
88- sh ' security unlock-keychain -p ${KEYCHAIN_PASSWORD} ~/Library/Keychains/login.keychain-db'
89- timeout(time : 60 , unit : ' MINUTES' ) {
90- sh " jenkins/pipelines/dev_e2e/dotnet/run_test.sh ${ params.CBL_VERSION} -${ params.CBL_BUILD} ${ params.CBL_DATASET_VERSION} ios '${ params.SGW_VERSION} ' ~/.ssh/jborden.pem"
91- }
92- }
93- post {
94- always {
95- timeout(time : 5 , unit : ' MINUTES' ) {
96- sh ' jenkins/pipelines/dev_e2e/dotnet/teardown.sh'
103+ stage(' iOS' ) {
104+ options {
105+ lock(" mob-e2e-iphone-01" )
106+ }
107+ environment {
108+ KEYCHAIN_PASSWORD = credentials(' mob-e2e-mac-01-keychain-password' )
109+ DEVELOPER_DIR = " /Applications/Xcode.app"
110+ MD_APPLE_SDK_ROOT = " /Applications/Xcode.app"
111+ TS_ARTIFACTS_DIR = ' ios'
112+ }
113+ agent { label ' mob-e2e-mac-01' }
114+ steps {
115+ sh ' security unlock-keychain -p ${KEYCHAIN_PASSWORD} ~/Library/Keychains/login.keychain-db'
116+ timeout(time : 60 , unit : ' MINUTES' ) {
117+ sh " jenkins/pipelines/dev_e2e/dotnet/run_test.sh ${ params.CBL_VERSION} -${ params.CBL_BUILD} ${ params.CBL_DATASET_VERSION} ios '${ params.SGW_VERSION} ' ~/.ssh/jborden.pem"
118+ }
119+ }
120+ post {
121+ always {
122+ timeout(time : 5 , unit : ' MINUTES' ) {
123+ sh ' jenkins/pipelines/dev_e2e/dotnet/teardown.sh'
124+ }
125+ archiveArtifacts artifacts : ' tests/dev_e2e/ios/**' , fingerprint : true , allowEmptyArchive : true
126+ }
97127 }
98- archiveArtifacts artifacts : ' tests/dev_e2e/session.log' , fingerprint : true , allowEmptyArchive : true
99- archiveArtifacts artifacts : ' tests/dev_e2e/http_log/*' , fingerprint : true , allowEmptyArchive : true
100- }
101- }
102- }
103- stage(' Android' ) {
104- options {
105- lock(" mob-e2e-android-01" )
106- }
107- agent { label ' mob-e2e-mac-01' }
108- steps {
109- timeout(time : 60 , unit : ' MINUTES' ) {
110- sh " jenkins/pipelines/dev_e2e/dotnet/run_test.sh ${ params.CBL_VERSION} -${ params.CBL_BUILD} ${ params.CBL_DATASET_VERSION} android '${ params.SGW_VERSION} ' ~/.ssh/jborden.pem"
111128 }
112- }
113- post {
114- always {
115- timeout(time : 5 , unit : ' MINUTES' ) {
116- sh ' jenkins/pipelines/dev_e2e/dotnet/teardown.sh'
129+ stage(' Android' ) {
130+ options {
131+ lock(" mob-e2e-android-01" )
132+ }
133+ agent { label ' mob-e2e-mac-01' }
134+ environment {
135+ TS_ARTIFACTS_DIR = ' android'
136+ }
137+ steps {
138+ timeout(time : 60 , unit : ' MINUTES' ) {
139+ sh " jenkins/pipelines/dev_e2e/dotnet/run_test.sh ${ params.CBL_VERSION} -${ params.CBL_BUILD} ${ params.CBL_DATASET_VERSION} android '${ params.SGW_VERSION} ' ~/.ssh/jborden.pem"
140+ }
141+ }
142+ post {
143+ always {
144+ timeout(time : 5 , unit : ' MINUTES' ) {
145+ sh ' jenkins/pipelines/dev_e2e/dotnet/teardown.sh'
146+ }
147+ archiveArtifacts artifacts : ' tests/dev_e2e/android/**' , fingerprint : true , allowEmptyArchive : true
148+ }
117149 }
118- archiveArtifacts artifacts : ' tests/dev_e2e/session.log' , fingerprint : true , allowEmptyArchive : true
119- archiveArtifacts artifacts : ' tests/dev_e2e/http_log/*' , fingerprint : true , allowEmptyArchive : true
120150 }
121151 }
122152 }
0 commit comments