@@ -10,6 +10,8 @@ pipeline {
1010 MVN_QUALITY_PROFILES = ' -P full'
1111 JACOCO_EXEC_FILE_PATH = ' ${WORKSPACE}/jacoco.exec'
1212 BUILD_KEY = (github. isPullRequest() ? CHANGE_TARGET : BRANCH_NAME ). replaceFirst(/ ^v/ , ' ' )
13+ CAPELLA_PRODUCT_PATH = " ${ WORKSPACE} /capella/capella"
14+ CAPELLA_BRANCH = ' master'
1315 }
1416 stages {
1517 stage(' Generate TP' ) {
@@ -60,29 +62,63 @@ pipeline {
6062 }
6163 }
6264 }
63- stage(' Run tests' ) {
64- steps {
65- wrap([$class : ' Xvnc' , takeScreenshot : false , useXauthority : true ]) {
66- script {
67- // Launch test
68- sh ' mvn -Dmaven.test.failure.ignore=true -Dtycho.localArtifacts=ignore integration-test -P tests -e -f pom.xml'
69- }
65+ stage(' Download Capella' ) {
66+ steps {
67+ script {
68+ def capellaURL = capella. getDownloadURL(" ${ CAPELLA_BRANCH} " , ' linux' , ' ' )
69+
70+ sh " curl -k -o capella.tar.gz ${ capellaURL} "
71+ sh " tar xvzf capella.tar.gz"
72+
73+ }
74+ }
75+ }
76+
77+ stage(' Install test features' ) {
78+ steps {
79+ script {
80+ sh " chmod 755 ${ CAPELLA_PRODUCT_PATH} "
81+ sh " chmod 755 ${ WORKSPACE} /capella/jre/bin/java"
82+
83+ eclipse. installFeature(" ${ CAPELLA_PRODUCT_PATH} " , capella. getTestUpdateSiteURL(" ${ CAPELLA_BRANCH} " ), ' org.polarsys.capella.test.feature.feature.group' , " -Dlogback.configurationFile=${ CAPELLA_PRODUCT_PATH} /configuration/logback.xml" )
84+
85+ eclipse. installFeature(" ${ CAPELLA_PRODUCT_PATH} " , " file:/${ WORKSPACE} /releng/org.polarsys.capella.docgen.site/target/repository/" . replace(" \\ " , " /" ), ' org.polarsys.capella.docgen.feature.feature.group' , " -Dlogback.configurationFile=${ CAPELLA_PRODUCT_PATH} /configuration/logback.xml" )
86+ eclipse. installFeature(" ${ CAPELLA_PRODUCT_PATH} " , " file:/${ WORKSPACE} /releng/org.polarsys.capella.docgen.site/target/repository/" . replace(" \\ " , " /" ), ' org.polarsys.capella.docgen.test.ju' , " -Dlogback.configurationFile=${ CAPELLA_PRODUCT_PATH} /configuration/logback.xml" )
87+
88+ }
89+ }
90+ }
91+
92+ stage(' Run tests' ) {
93+ steps {
94+ script {
95+ wrap([$class : ' Xvnc' , takeScreenshot : false , useXauthority : true ]) {
96+
97+ tester. runUITests(" ${ CAPELLA_PRODUCT_PATH} " , ' CommandLineTestSuite' , ' org.polarsys.capella.docgen.test.ju' ,
98+ [' org.polarsys.capella.docgen.test.ju.suites.CommandLineTestSuite' ])
99+ tester. runUITests(" ${ CAPELLA_PRODUCT_PATH} " , ' IFESampleTestSuite' , ' org.polarsys.capella.docgen.test.ju' ,
100+ [' org.polarsys.capella.docgen.test.ju.suites.IFESampleTestSuite' ])
101+ }
102+
103+ tester. publishTests()
70104 }
71105 }
72106 }
73- stage(' Publish results' ) {
74- steps {
75- junit allowEmptyResults : true , testResults : ' *.xml,**/target/surefire-reports/*.xml'
76- sh " mvn -Djacoco.dataFile=$JACOCO_EXEC_FILE_PATH org.jacoco:jacoco-maven-plugin:$JACOCO_VERSION :report $MVN_QUALITY_PROFILES -e -f pom.xml"
77- archiveArtifacts artifacts : ' tests/**'
78- }
79- }
107+
108+
80109 stage(' Perform Sonar analysis' ) {
81110 steps {
82111 script {
83112 sonar. runSonar(" eclipse-capella_capella-xhtml-docgen" , " eclipse/capella-xhtml-docgen" , " sonar-token-capella-xhtml-docgen" )
84113 }
85114 }
86115 }
116+
117+
87118 }
119+ post {
120+ always {
121+ archiveArtifacts artifacts : ' **/*.log, *.log, *.xml, **/*.layout'
122+ }
123+ }
88124}
0 commit comments