@@ -115,12 +115,34 @@ env.TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX = "hmctspublic.azurecr.io/imported/"
115115
116116withPipeline(" java" , product, component) {
117117 afterAlways(' test' ) {
118- builder. gradle(' integration' )
119-
120- // hmcts/cnp-jenkins-library may fail to copy artifacts after checkstyle error so repeat command (see /src/uk/gov/hmcts/contino/GradleBuilder.groovy)
121- steps. archiveArtifacts allowEmptyArchive : true , artifacts : ' **/reports/checkstyle/*.html'
122-
123- steps. archiveArtifacts allowEmptyArchive : true , artifacts : ' **/reports/pmd/*.html'
118+ builder. gradle(' integration' )
119+
120+ // hmcts/cnp-jenkins-library may fail to copy artifacts after checkstyle error so repeat command (see /src/uk/gov/hmcts/contino/GradleBuilder.groovy)
121+ steps. archiveArtifacts allowEmptyArchive : true , artifacts : ' **/reports/checkstyle/*.html'
122+ steps. archiveArtifacts allowEmptyArchive : true , artifacts : ' **/reports/pmd/*.html'
123+
124+ copyIgnore(' ./build/reports/tests/test' , ' ./Unit Tests/' )
125+ copyIgnore(' ./build/reports/tests/integration' , ' ./Integration Tests/' )
126+ steps. archiveArtifacts allowEmptyArchive : true , artifacts : ' **/Unit Tests/**/*'
127+ steps. archiveArtifacts allowEmptyArchive : true , artifacts : ' **/Integration Tests/**/*'
128+
129+ publishHTML target : [
130+ allowMissing : true ,
131+ alwaysLinkToLastBuild : true ,
132+ keepAll : true ,
133+ reportDir : ' Unit Tests' ,
134+ reportFiles : " index.html" ,
135+ reportName : " Unit Test Report"
136+ ]
137+
138+ publishHTML target : [
139+ allowMissing : true ,
140+ alwaysLinkToLastBuild : true ,
141+ keepAll : true ,
142+ reportDir : ' Integration Tests' ,
143+ reportFiles : " index.html" ,
144+ reportName : " Integration Test Report"
145+ ]
124146 }
125147 onMaster {
126148 enableSlackNotifications(' #ccd-master-builds' )
@@ -162,23 +184,67 @@ withPipeline("java", product, component) {
162184 afterAlways(' smoketest:preview' ) {
163185 copyIgnore(' ./build/reports/tests/befta/smoke/cucumber-html-reports' , ' ./BEFTA Report for Smoke Tests/' )
164186 steps. archiveArtifacts allowEmptyArchive : true , artifacts : ' **/BEFTA Report for Smoke Tests/**/*'
187+ publishHTML target : [
188+ allowMissing : true ,
189+ alwaysLinkToLastBuild : true ,
190+ keepAll : true ,
191+ reportDir : ' BEFTA Report for Smoke Tests' ,
192+ reportFiles : " overview-features.html" ,
193+ reportName : " Smoke Test Report"
194+ ]
165195 }
166196
167197 afterAlways(' smoketest:aat' ) {
168198 copyIgnore(' ./build/reports/tests/befta/smoke/cucumber-html-reports' , ' ./BEFTA Report for Smoke Tests/' )
169199 steps. archiveArtifacts allowEmptyArchive : true , artifacts : ' **/BEFTA Report for Smoke Tests/**/*'
200+ publishHTML target : [
201+ allowMissing : true ,
202+ alwaysLinkToLastBuild : true ,
203+ keepAll : true ,
204+ reportDir : ' BEFTA Report for Smoke Tests' ,
205+ reportFiles : " overview-features.html" ,
206+ reportName : " Smoke Test Report"
207+ ]
170208 }
171209
172210 afterAlways(' functionalTest:preview' ) {
173211 copyIgnore(' ./build/reports/tests/befta/functional/cucumber-html-reports' , ' ./BEFTA Report for Functional Tests/' )
174212 steps. archiveArtifacts allowEmptyArchive : true , artifacts : ' **/BEFTA Report for Functional Tests/**/*'
213+ publishHTML target : [
214+ allowMissing : true ,
215+ alwaysLinkToLastBuild : true ,
216+ keepAll : true ,
217+ reportDir : ' BEFTA Report for Functional Tests' ,
218+ reportFiles : " overview-features.html" ,
219+ reportName : " Functional Test Report"
220+ ]
175221 }
176222
177223 afterAlways(' functionalTest:aat' ) {
178224 copyIgnore(' ./build/reports/tests/befta/functional/cucumber-html-reports' , ' ./BEFTA Report for Functional Tests/' )
179225 steps. archiveArtifacts allowEmptyArchive : true , artifacts : ' **/BEFTA Report for Functional Tests/**/*'
226+ publishHTML target : [
227+ allowMissing : true ,
228+ alwaysLinkToLastBuild : true ,
229+ keepAll : true ,
230+ reportDir : ' BEFTA Report for Functional Tests' ,
231+ reportFiles : " overview-features.html" ,
232+ reportName : " Functional Test Report"
233+ ]
234+ }
235+
236+ afterAlways(' pact-provider-verification' ) {
237+ steps. archiveArtifacts allowEmptyArchive : true , artifacts : ' build/reports/tests/**/*'
238+ publishHTML target : [
239+ allowMissing : true ,
240+ alwaysLinkToLastBuild : true ,
241+ keepAll : true ,
242+ reportDir : " build/reports/tests/runProviderPactVerification" ,
243+ reportFiles : " index.html" ,
244+ reportName : " Contract Tests Report"
245+ ]
246+ }
180247 }
181- }
182248
183249/**
184250 * Forces a recursive copy by always returning 0 regardless of errors
0 commit comments