Skip to content

Commit

Permalink
Deprecate report portal integration and enhance jenkins template
Browse files Browse the repository at this point in the history
  • Loading branch information
bjuric committed Aug 18, 2024
1 parent a6f3490 commit 3185a30
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 8 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
3.72.1
======
18 August 2024
- Set project name to BUILD_TAG when calling docker-compose in Jenkinsfile template
- Set publishHTML.allowMissing to true in generated Jenkinsfile
- Set publishHTML.alwaysLinkToLastBuild to false in generated Jenkinsfile
- Improved error handling in Jenkins template
- Update Gwen core from v3.61.3 to v[3.61.4](https://github.com/gwen-interpreter/gwen/releases/tag/v3.61.4)
- Deprecate report portal integration

3.72.0
======
15 August 2024
Expand Down
4 changes: 2 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
enablePlugins(GitVersioning)

// gwen core & web versions
val gwenVersion = "3.61.3"
val gwenWebVersion = "3.72.0"
val gwenVersion = "3.61.4"
val gwenWebVersion = "3.72.1"

git.baseVersion := gwenWebVersion
git.useGitDescribe := true
Expand Down
29 changes: 23 additions & 6 deletions src/main/resources/init/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,31 +25,48 @@ pipeline {
stage("Prepare") {
steps {
script {
// Create output dir to avoid potential permission issues in docker
// Prepare output dir
sh 'mkdir -p ${gwen.initDir}${slash}output'
sh 'rm -rf ${gwen.initDir}${slash}output/**'
}
}
}
stage("Gwen") {
steps {
script {
// Spin up environment and execute Gwen in docker
sh 'docker-compose${docker.compose.options} run gwen'
try {
// Spin up environment and execute Gwen in docker
sh "docker-compose -p ${env.BUILD_TAG.toLowerCase()}${docker.compose.options} run gwen"
if (!fileExists('${gwen.initDir}${slash}output/reports/html/index.html')) {
error 'Evaluation report not generated'
}
} catch(err) {
if (fileExists('${gwen.initDir}${slash}output/reports/html/index.html')) {
unstable 'Gwen completed with failure(s) reported.'
} else {
error "Gwen failed to execute or complete: ${err.getMessage()}"
}
}
}
}
post {
always {
sh 'docker-compose${docker.compose.options} down'
sh "docker-compose -p ${env.BUILD_TAG.toLowerCase()}${docker.compose.options} down || true"
archiveArtifacts artifacts: '${gwen.initDir}${slash}output/reports/**'
publishHTML(target: [
allowMissing : false,
alwaysLinkToLastBuild : true,
allowMissing : true,
alwaysLinkToLastBuild : false,
keepAll : true,
reportDir : '${gwen.initDir}${slash}output/reports/html',
reportFiles : 'index.html',
reportName : "Gwen-Report"
])
}
failure {
script {
// something went wrong, raise alert here
}
}
}
}
}
Expand Down

0 comments on commit 3185a30

Please sign in to comment.