Skip to content

Commit 7d7ea3e

Browse files
Yakov Feldmanyakov-feldman
authored andcommitted
DEVO-204:Update develop pipeline to run full develop pipeline nightly
1 parent 4132eed commit 7d7ea3e

File tree

1 file changed

+61
-113
lines changed

1 file changed

+61
-113
lines changed

Jenkinsfile

Lines changed: 61 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -818,25 +818,28 @@ pipeline{
818818
}
819819

820820
stage('rh7-singlenode'){
821+
options {timeout(time: 3, unit: 'HOURS')}
821822
when { expression {return params.regressions} }
822823
agent { label 'dhfLinuxAgent'}
823824
steps{
824-
script{
825-
props = readProperties file:'data-hub/pipeline.properties';
826-
copyRPM 'Release','9.0-11'
827-
setUpML '$WORKSPACE/xdmp/src/Mark*.rpm'
828-
sh 'export JAVA_HOME=`eval echo "$JAVA_HOME_DIR"`;export GRADLE_USER_HOME=$WORKSPACE$GRADLE_DIR;export M2_HOME=$MAVEN_HOME/bin;export PATH=$JAVA_HOME/bin:$GRADLE_USER_HOME:$PATH:$MAVEN_HOME/bin;cd $WORKSPACE/data-hub;rm -rf $GRADLE_USER_HOME/caches;./gradlew clean;set +e;./gradlew marklogic-data-hub:bootstrapAndTest -Dorg.gradle.jvmargs=-Xmx1g -i --stacktrace -PnodeDistributionBaseUrl=http://node-mirror.eng.marklogic.com:8080/;sleep 10s;./gradlew ml-data-hub:test -i --stacktrace -PnodeDistributionBaseUrl=http://node-mirror.eng.marklogic.com:8080/;sleep 10s;./gradlew web:test -i --stacktrace -PnodeDistributionBaseUrl=http://node-mirror.eng.marklogic.com:8080/;sleep 10s;./gradlew marklogic-data-hub-central:test -i --stacktrace -PnodeDistributionBaseUrl=http://node-mirror.eng.marklogic.com:8080/ |& tee console.log;sleep 10s;./gradlew marklogic-data-hub-spark-connector:test -i --stacktrace -PnodeDistributionBaseUrl=http://node-mirror.eng.marklogic.com:8080/;sleep 10s;./gradlew ml-data-hub:testFullCycle -i --stacktrace -PnodeDistributionBaseUrl=http://node-mirror.eng.marklogic.com:8080/ ;sleep 10s;./gradlew marklogic-data-hub-spark-connector:test -i --stacktrace -PnodeDistributionBaseUrl=http://node-mirror.eng.marklogic.com:8080/;'
829-
junit '**/TEST-*.xml'
830-
def output=readFile 'data-hub/console.log'
831-
def result=false;
832-
if(output.contains("npm ERR!")){
833-
result=true;
834-
}
835-
if(result){
836-
currentBuild.result='UNSTABLE'
837-
}
838-
}
839-
}
825+
catchError(buildResult: 'SUCCESS', catchInterruptions: true) {
826+
827+
script{
828+
props = readProperties file:'data-hub/pipeline.properties';
829+
copyRPM 'Release','9.0-11'
830+
setUpML '$WORKSPACE/xdmp/src/Mark*.rpm'
831+
sh 'export JAVA_HOME=`eval echo "$JAVA_HOME_DIR"`;export GRADLE_USER_HOME=$WORKSPACE$GRADLE_DIR;export M2_HOME=$MAVEN_HOME/bin;export PATH=$JAVA_HOME/bin:$GRADLE_USER_HOME:$PATH:$MAVEN_HOME/bin;cd $WORKSPACE/data-hub;rm -rf $GRADLE_USER_HOME/caches;./gradlew clean;set +e;./gradlew marklogic-data-hub:bootstrapAndTest -Dorg.gradle.jvmargs=-Xmx1g -i --stacktrace -PnodeDistributionBaseUrl=http://node-mirror.eng.marklogic.com:8080/;sleep 10s;./gradlew ml-data-hub:test -i --stacktrace -PnodeDistributionBaseUrl=http://node-mirror.eng.marklogic.com:8080/;sleep 10s;./gradlew web:test -i --stacktrace -PnodeDistributionBaseUrl=http://node-mirror.eng.marklogic.com:8080/;sleep 10s;./gradlew marklogic-data-hub-central:test -i --stacktrace -PnodeDistributionBaseUrl=http://node-mirror.eng.marklogic.com:8080/ |& tee console.log;sleep 10s;./gradlew marklogic-data-hub-spark-connector:test -i --stacktrace -PnodeDistributionBaseUrl=http://node-mirror.eng.marklogic.com:8080/;sleep 10s;./gradlew ml-data-hub:testFullCycle -i --stacktrace -PnodeDistributionBaseUrl=http://node-mirror.eng.marklogic.com:8080/ ;sleep 10s;./gradlew marklogic-data-hub-spark-connector:test -i --stacktrace -PnodeDistributionBaseUrl=http://node-mirror.eng.marklogic.com:8080/;'
832+
junit '**/TEST-*.xml'
833+
def output=readFile 'data-hub/console.log'
834+
def result=false;
835+
if(output.contains("npm ERR!")){
836+
result=true;
837+
}
838+
if(result){
839+
currentBuild.result='UNSTABLE'
840+
}
841+
}
842+
}}
840843
post{
841844
always{
842845
sh 'rm -rf $WORKSPACE/xdmp'
@@ -859,10 +862,11 @@ pipeline{
859862
when { expression {return params.regressions} }
860863
parallel{
861864
stage('rh7_cluster_10.0-Nightly'){
862-
agent { label 'dhfLinuxAgent'}
865+
options {timeout(time: 3, unit: 'HOURS')}
866+
agent { label 'dhfLinuxAgent'}
863867
steps{
864-
dhflinuxTests("10.0","Latest")
865-
}
868+
catchError(buildResult: 'SUCCESS', catchInterruptions: true) { dhflinuxTests("10.0","Latest")}
869+
}
866870
post{
867871
always{
868872
sh 'rm -rf $WORKSPACE/xdmp'
@@ -879,9 +883,10 @@ pipeline{
879883
}
880884
}
881885
stage('rh7_cluster_9.0-Nightly'){
886+
options {timeout(time: 3, unit: 'HOURS')}
882887
agent { label 'dhfLinuxAgent'}
883888
steps{
884-
dhflinuxTests("9.0","Latest")
889+
catchError(buildResult: 'SUCCESS', catchInterruptions: true){dhflinuxTests("9.0","Latest")}
885890
}
886891
post{
887892
always{
@@ -898,9 +903,10 @@ pipeline{
898903
}
899904
}
900905
stage('rh7_cluster_9.0-11'){
906+
options {timeout(time: 3, unit: 'HOURS')}
901907
agent { label 'dhfLinuxAgent'}
902908
steps{
903-
dhflinuxTests("9.0-11","Release")
909+
catchError(buildResult: 'SUCCESS', catchInterruptions: true){dhflinuxTests("9.0-11","Release")}
904910
}
905911
post{
906912
always{
@@ -916,9 +922,10 @@ pipeline{
916922
}
917923
}
918924
stage('rh7_cluster_10.0-3'){
925+
options {timeout(time: 3, unit: 'HOURS')}
919926
agent { label 'dhfLinuxAgent'}
920927
steps{
921-
dhflinuxTests("10.0-3","Release");
928+
catchError(buildResult: 'SUCCESS', catchInterruptions: true){dhflinuxTests("10.0-3","Release")}
922929
}
923930
post{
924931
always{
@@ -935,9 +942,10 @@ pipeline{
935942
}
936943
}
937944
stage('rh7_cluster_10.0-4'){
945+
options {timeout(time: 3, unit: 'HOURS')}
938946
agent { label 'dhfLinuxAgent'}
939947
steps{
940-
dhflinuxTests("10.0-4.4","Release");
948+
catchError(buildResult: 'SUCCESS', catchInterruptions: true){dhflinuxTests("10.0-4.4","Release")}
941949
}
942950
post{
943951
always{
@@ -954,9 +962,10 @@ pipeline{
954962
}
955963
}
956964
stage('rh7_cluster_10.0-5'){
965+
options {timeout(time: 3, unit: 'HOURS')}
957966
agent { label 'dhfLinuxAgent'}
958967
steps{
959-
dhflinuxTests("10.0-5.3","Release");
968+
catchError(buildResult: 'SUCCESS', catchInterruptions: true){dhflinuxTests("10.0-5.3","Release")}
960969
}
961970
post{
962971
always{
@@ -973,9 +982,10 @@ pipeline{
973982
}
974983
}
975984
stage('rh7_cluster_10.0-6'){
985+
options {timeout(time: 3, unit: 'HOURS')}
976986
agent { label 'dhfLinuxAgent'}
977987
steps{
978-
dhflinuxTests("10.0-6","Release");
988+
catchError(buildResult: 'SUCCESS', catchInterruptions: true){dhflinuxTests("10.0-6","Release")}
979989
}
980990
post{
981991
always{
@@ -998,8 +1008,11 @@ pipeline{
9981008
when { expression {return params.regressions} }
9991009
parallel{
10001010
stage('dh5-example'){
1001-
agent { label 'dhfLinuxAgent'}
1002-
steps{dh5Example()}
1011+
options {timeout(time: 3, unit: 'HOURS')}
1012+
agent { label 'dhfLinuxAgent'}
1013+
steps {
1014+
catchError(buildResult: 'SUCCESS', catchInterruptions: true){dh5Example()}
1015+
}
10031016
post{
10041017
always{
10051018
sh 'rm -rf $WORKSPACE/xdmp';
@@ -1013,10 +1026,11 @@ pipeline{
10131026
}
10141027
}
10151028
stage('dhf-customhook'){
1016-
agent { label 'dhfLinuxAgent'}
1029+
options {timeout(time: 3, unit: 'HOURS')}
1030+
agent { label 'dhfLinuxAgent'}
10171031
steps{
1018-
dhCustomHook();
1019-
}
1032+
catchError(buildResult: 'SUCCESS', catchInterruptions: true){dhCustomHook()}
1033+
}
10201034
post{
10211035
always{
10221036
sh 'rm -rf $WORKSPACE/xdmp';
@@ -1030,9 +1044,10 @@ pipeline{
10301044
}
10311045
}
10321046
stage('mapping-example'){
1033-
agent { label 'dhfLinuxAgent'}
1047+
options {timeout(time: 3, unit: 'HOURS')}
1048+
agent { label 'dhfLinuxAgent'}
10341049
steps{
1035-
mappingExample()
1050+
catchError(buildResult: 'SUCCESS', catchInterruptions: true){mappingExample()}
10361051
}
10371052
post{
10381053
always{
@@ -1047,9 +1062,10 @@ pipeline{
10471062
}
10481063
}
10491064
stage('smart-mastering-complete'){
1050-
agent { label 'dhfLinuxAgent'}
1065+
options {timeout(time: 3, unit: 'HOURS')}
1066+
agent { label 'dhfLinuxAgent'}
10511067
steps{
1052-
smartMastering()
1068+
catchError(buildResult: 'SUCCESS', catchInterruptions: true){smartMastering()}
10531069
}
10541070
post{
10551071
always{
@@ -1069,10 +1085,11 @@ pipeline{
10691085
when { expression {return params.regressions} }
10701086
parallel{
10711087
stage('w10_SN_9.0-Nightly'){
1072-
agent { label 'dhfWinagent'}
1073-
steps{
1074-
dhfWinTests("9.0","Latest")
1075-
}
1088+
options {timeout(time: 3, unit: 'HOURS')}
1089+
agent { label 'dhfWinagent'}
1090+
steps{
1091+
catchError(buildResult: 'SUCCESS', catchInterruptions: true){dhfWinTests("9.0","Latest")}
1092+
}
10761093
post{
10771094
always{
10781095
bat 'RMDIR /S/Q xdmp'
@@ -1088,9 +1105,10 @@ pipeline{
10881105
}
10891106
}
10901107
stage('w10_SN_10.0-Nightly'){
1108+
options {timeout(time: 3, unit: 'HOURS')}
10911109
agent { label 'dhfWinagent'}
10921110
steps{
1093-
dhfWinTests("10.0","Latest")
1111+
catchError(buildResult: 'SUCCESS', catchInterruptions: true){dhfWinTests("10.0","Latest")}
10941112
}
10951113
post{
10961114
always{
@@ -1107,9 +1125,10 @@ pipeline{
11071125
}
11081126
}
11091127
stage('w10_SN_9.0-11'){
1128+
options {timeout(time: 3, unit: 'HOURS')}
11101129
agent { label 'dhfWinagent'}
11111130
steps{
1112-
dhfWinTests("9.0-11","Release")
1131+
catchError(buildResult: 'SUCCESS', catchInterruptions: true){dhfWinTests("9.0-11","Release")}
11131132
}
11141133
post{
11151134
always{
@@ -1126,9 +1145,10 @@ pipeline{
11261145
}
11271146
}
11281147
stage('w12_cluster_10.0-6'){
1148+
options {timeout(time: 3, unit: 'HOURS')}
11291149
agent { label 'dhfWinCluster'}
11301150
steps{
1131-
winParallel()
1151+
catchError(buildResult: 'SUCCESS', catchInterruptions: true){winParallel()}
11321152
}
11331153
post{
11341154
always{
@@ -1147,78 +1167,6 @@ pipeline{
11471167

11481168
}
11491169
}
1150-
stage('quick start linux parallel'){
1151-
when { expression {return params.regressions} }
1152-
parallel{
1153-
stage('qs_rh7_90-nightly'){
1154-
agent { label 'lnx-dhf-jenkins-slave-2'}
1155-
steps{
1156-
dhfqsLinuxTests("9.0","Latest")
1157-
}
1158-
post{
1159-
1160-
success {
1161-
println("qs_rh7_90-nightly Tests Completed")
1162-
sendMail Email,'<h3>Quick start End-End Tests Passed on Nigtly 9.0 ML Server Cluster </h3><h4><a href=${RUN_DISPLAY_URL}>Check the Pipeline View</a></h4><h4> <a href=${BUILD_URL}/console> Check Console Output Here</a></h4>',false,'$BRANCH_NAME branch | Quick Start End-End | Linux RH7 | ML-9.0-Nightly | Cluster | Passed'
1163-
}
1164-
unstable {
1165-
println("qs_rh7_90-nightly Tests Failed")
1166-
sendMail Email,'<h3>Some Quick Start End-End Tests Failed on Nightly 9.0 ML Server Cluster </h3><h4><a href=${JENKINS_URL}/blue/organizations/jenkins/Datahub_CI/detail/$JOB_BASE_NAME/$BUILD_ID/tests><font color=red>Check the Test Report</font></a></h4><h4><a href=${RUN_DISPLAY_URL}>Check the Pipeline View</a></h4><h4> <a href=${BUILD_URL}/console> Check Console Output Here</a></h4><h4>Please create bugs for the failed regressions and fix them</h4>',false,'$BRANCH_NAME branch | Quick Start End-End | Linux RH7 | ML-9.0-Nightly | Cluster | Failed'
1167-
}
1168-
}
1169-
}
1170-
stage('qs_rh7_10-nightly'){
1171-
agent { label 'lnx-dhf-jenkins-slave-2'}
1172-
steps{
1173-
dhfqsLinuxTests("10.0","Latest")
1174-
}
1175-
post{
1176-
1177-
success {
1178-
println("qs_rh7_10-nightly Tests Completed")
1179-
sendMail Email,'<h3>Quick start End-End Tests Passed on Nigtly 10.0 ML Server Cluster </h3><h4><a href=${RUN_DISPLAY_URL}>Check the Pipeline View</a></h4><h4> <a href=${BUILD_URL}/console> Check Console Output Here</a></h4>',false,'$BRANCH_NAME branch | Quick Start End-End | Linux RH7 | ML-10.0-Nightly | Cluster | Passed'
1180-
}
1181-
unstable {
1182-
println("qs_rh7_10-nightly Tests Failed")
1183-
sendMail Email,'<h3>Some Quick Start End-End Tests Failed on Nightly 10.0 ML Server Cluster </h3><h4><a href=${JENKINS_URL}/blue/organizations/jenkins/Datahub_CI/detail/$JOB_BASE_NAME/$BUILD_ID/tests><font color=red>Check the Test Report</font></a></h4><h4><a href=${RUN_DISPLAY_URL}>Check the Pipeline View</a></h4><h4> <a href=${BUILD_URL}/console> Check Console Output Here</a></h4><h4>Please create bugs for the failed regressions and fix them</h4>',false,'$BRANCH_NAME branch | Quick Start End-End | Linux RH7 | ML-9.0-Nightly | Cluster | Failed'
1184-
}
1185-
}
1186-
}
1187-
stage('qs_rh7_90-release'){
1188-
agent { label 'lnx-dhf-jenkins-slave-2'}
1189-
steps{
1190-
dhfqsLinuxTests("9.0-11","Release")
1191-
}
1192-
post{
1193-
1194-
success {
1195-
println("qs_rh7_90-release Tests Completed")
1196-
sendMail Email,'<h3>Quick start End-End Tests Passed on Released 9.0 ML Server Cluster </h3><h4><a href=${RUN_DISPLAY_URL}>Check the Pipeline View</a></h4><h4> <a href=${BUILD_URL}/console> Check Console Output Here</a></h4>',false,'$BRANCH_NAME branch | Quick Start End-End | Linux RH7 | ML-9.0-11 | Cluster | Passed'
1197-
}
1198-
unstable {
1199-
println("qs_rh7_90-release Tests Failed")
1200-
sendMail Email,'<h3>Some Quick Start End-End Tests Failed on Nightly 9.0 ML Server Cluster </h3><h4><a href=${JENKINS_URL}/blue/organizations/jenkins/Datahub_CI/detail/$JOB_BASE_NAME/$BUILD_ID/tests><font color=red>Check the Test Report</font></a></h4><h4><a href=${RUN_DISPLAY_URL}>Check the Pipeline View</a></h4><h4> <a href=${BUILD_URL}/console> Check Console Output Here</a></h4><h4>Please create bugs for the failed regressions and fix them</h4>',false,'$BRANCH_NAME branch | Quick Start End-End | Linux RH7 | ML-9.0-11 | Cluster | Failed'
1201-
}
1202-
}
1203-
}
1204-
stage('qs_rh7_10-release'){
1205-
agent { label 'lnx-dhf-jenkins-slave-2'}
1206-
steps{
1207-
dhfqsLinuxTests("10.0-6","Release")
1208-
}
1209-
post{
12101170

1211-
success {
1212-
println("qs_rh7_10-release Tests Completed")
1213-
sendMail Email,'<h3>Quick start End-End Tests Passed on Released 10.0 ML Server Cluster </h3><h4><a href=${RUN_DISPLAY_URL}>Check the Pipeline View</a></h4><h4> <a href=${BUILD_URL}/console> Check Console Output Here</a></h4>',false,'$BRANCH_NAME branch | Quick Start End-End | Linux RH7 | ML-10.0-6 | Cluster | Passed'
1214-
}
1215-
unstable {
1216-
println("qs_rh7_10-release Tests Failed")
1217-
sendMail Email,'<h3>Some Quick Start End-End Tests Failed on Released 10.0 ML Server Cluster </h3><h4><a href=${JENKINS_URL}/blue/organizations/jenkins/Datahub_CI/detail/$JOB_BASE_NAME/$BUILD_ID/tests><font color=red>Check the Test Report</font></a></h4><h4><a href=${RUN_DISPLAY_URL}>Check the Pipeline View</a></h4><h4> <a href=${BUILD_URL}/console> Check Console Output Here</a></h4><h4>Please create bugs for the failed regressions and fix them</h4>',false,'$BRANCH_NAME branch | Quick Start End-End | Linux RH7 | ML-10.0-6 | Cluster | Failed'
1218-
}
1219-
}
1220-
}
1221-
}
1222-
}
12231171
}
12241172
}

0 commit comments

Comments
 (0)