Skip to content

Commit

Permalink
Publish Jenkins Report (#191)
Browse files Browse the repository at this point in the history
* Publish Jenkins Report

* Publish Jenkins Report
  • Loading branch information
rajkatla-hmcts authored Nov 23, 2021
1 parent 94fee38 commit e4c0c8b
Show file tree
Hide file tree
Showing 3 changed files with 96 additions and 8 deletions.
75 changes: 71 additions & 4 deletions Jenkinsfile_CNP
Original file line number Diff line number Diff line change
Expand Up @@ -74,21 +74,88 @@ withPipeline(type, product, component) {
env.IDAM_URL = "https://idam-api.aat.platform.hmcts.net"
env.TEST_URL = "http://rd-judicial-api-aat.service.core-compute-aat.internal"

after('functionalTest:preview') {
steps.archiveArtifacts allowEmptyArchive: true, artifacts: '**/site/serenity/**/*'

after('sonarscan') {

publishHTML target: [
allowMissing : true,
alwaysLinkToLastBuild: true,
keepAll : true,
reportDir : "build/reports/tests/test",
reportFiles : "index.html",
reportName : "Unit Tests Report"
]

publishHTML target: [
allowMissing : true,
alwaysLinkToLastBuild: true,
keepAll : true,
reportDir : "build/reports/tests/integration",
reportFiles : "index.html",
reportName : "Integration Test Report"
]
}

after('smoketest:preview') {
publishHTML target: [
allowMissing : true,
alwaysLinkToLastBuild: true,
keepAll : true,
reportDir : "build/reports/tests/smoke",
reportFiles : "index.html",
reportName : "Smoke Test Report"
]
}

after('smoketest:aat') {
publishHTML target: [
allowMissing : true,
alwaysLinkToLastBuild: true,
keepAll : true,
reportDir : "build/reports/tests/smoke",
reportFiles : "index.html",
reportName : "Smoke Test Report"
]
}

after('functionalTest:aat') {
steps.archiveArtifacts allowEmptyArchive: true, artifacts: '**/site/serenity/**/*'
publishHTML target: [
allowMissing : true,
alwaysLinkToLastBuild: true,
keepAll : true,
reportDir : "target/site/serenity/",
reportFiles : "index.html",
reportName : "Functional Tests Report"
]
}

after('functionalTest:preview') {
steps.archiveArtifacts allowEmptyArchive: true, artifacts: '**/site/serenity/**/*'
publishHTML target: [
allowMissing : true,
alwaysLinkToLastBuild: true,
keepAll : true,
reportDir : "target/site/serenity/",
reportFiles : "index.html",
reportName : "Functional Tests Report"
]
}

after('pact-provider-verification') {
publishHTML target: [
allowMissing : true,
alwaysLinkToLastBuild: true,
keepAll : true,
reportDir : "build/reports/tests/runProviderPactVerification",
reportFiles : "index.html",
reportName : "Contract Tests Report"
]
steps.archiveArtifacts allowEmptyArchive: true, artifacts: 'build/reports/tests/**/*'
}


enablePactAs([
AppPipelineDsl.PactRoles.PROVIDER
])

}
}
27 changes: 24 additions & 3 deletions Jenkinsfile_nightly
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,32 @@ withNightlyPipeline(type, product, component) {
enableSecurityScan()
enableFortifyScan()

after('fortify-scan') {
steps.archiveArtifacts allowEmptyArchive: true, artifacts: '**/Fortify Scan/**/*'
}

after('mutationTest') {
publishHTML target: [
allowMissing : true,
alwaysLinkToLastBuild: true,
keepAll : true,
reportDir : "build/reports/pitest",
reportFiles : "index.html",
reportName : "Mutation Test Report"
]
}

after('fullFunctionalTest') {
steps.archiveArtifacts allowEmptyArchive: true, artifacts: '**/site/serenity/**/*'
}
steps.archiveArtifacts allowEmptyArchive: true, artifacts: 'build/reports/**/*'
publishHTML target: [
allowMissing : true,
alwaysLinkToLastBuild: true,
keepAll : true,
reportDir : "target/site/serenity/",
reportFiles : "index.html",
reportName : "Functional Tests Report"
]

after('fortify-scan') {
steps.archiveArtifacts allowEmptyArchive: true, artifacts: '**/Fortify Scan/**/*'
}
}
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ pitest {
historyInputLocation = 'build/reports/pitest/fastermutationtesting'
historyOutputLocation = 'build/reports/pitest/fastermutationtestingoutput'
outputFormats = ['XML', 'HTML']
timestampedReports = true
timestampedReports = false
mutationThreshold = 90
useClasspathFile = true
}
Expand Down

0 comments on commit e4c0c8b

Please sign in to comment.