Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.4 main release pipeline #1501

Merged
merged 2 commits into from
May 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 22 additions & 41 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,20 @@ pipeline {
label 'openjdk8bot'
}
options {
disableConcurrentBuilds()
disableConcurrentBuilds()
}
tools {
maven 'maven-3.6'
maven 'maven-3.8'
jdk 'adoptopenjdk-jdk8'
}
environment {
MAVEN_OPTS='-Djava.awt.headless=true -Xmx4096m'
}
parameters {
string name: 'REL_VERSION', defaultValue: "3.4.x", description: 'Next release version'
string name: 'DEV_VERSION', defaultValue: "3.4.x-SNAPSHOT", description: 'Next snapshot version'
booleanParam name: 'PERFORM_RELEASE', defaultValue: false, description: 'Perform release build (on main branch only)'
}
stages {
stage ('Initialize') {
steps {
Expand All @@ -26,14 +31,14 @@ pipeline {
}
stage ('Build') {
steps {
echo 'Unit testing'
sh 'mvn -B -C -Poracle,mssql clean test-compile'
echo 'Building'
sh 'mvn -B -C -P oracle,mssql clean test-compile'
}
}
stage ('Integration Test') {
stage ('Test') {
steps {
echo 'Integration testing'
sh 'mvn -B -C -Pintegration-tests,oracle,mssql install'
echo 'Testing'
sh 'mvn -B -C -P integration-tests,oracle,mssql install'
}
post {
always {
Expand All @@ -43,62 +48,38 @@ pipeline {
}
stage ('Quality Checks') {
when {
branch 'master'
branch '3.4-main*'
}
steps {
echo 'Quality checking'
sh 'mvn -B -C -fae -Poracle,mssql com.github.spotbugs:spotbugs-maven-plugin:spotbugs checkstyle:checkstyle javadoc:javadoc'
sh 'mvn -B -C -fae -P oracle,mssql com.github.spotbugs:spotbugs-maven-plugin:spotbugs checkstyle:checkstyle javadoc:javadoc'
}
post {
success {
findbugs canComputeNew: false, defaultEncoding: '', excludePattern: '', healthy: '', includePattern: '', pattern: '**/spotbugsXml.xml', unHealthy: ''
checkstyle canComputeNew: false, canRunOnFailed: true, defaultEncoding: '', healthy: '', pattern: '**/checkstyle-result.xml', unHealthy: ''
}
}
}
stage ('Acceptance Test') {
when {
branch 'master'
}
steps {
echo 'Preparing test harness: TEAM Engine'
echo 'Download and start TEAM Engine'
echo 'Start SUT deegree webapp with test configuration'
echo 'Run FAT'
}
post {
success {
echo 'FAT passed successfully'
javadoc javadocDir: '**/target/site/apidocs', keepAll: true
}
}
}
stage ('Release') {
when {
branch 'master'
allOf{
triggeredBy cause: "UserIdCause", detail: "tmc"
expression { return params.PERFORM_RELEASE }
}
}
steps {
echo 'Prepare release version...'
echo 'Build and publish documentation'
sh 'mvn -pl :deegree-webservices-handbook -Phandbook install'
echo 'Build docker image...'
echo 'Prepare release version ${REL_VERSION}'
sh 'mvn -Dresume=false -DdryRun=true -DreleaseVersion=${REL_VERSION} -DdevelopmentVersion=${DEV_VERSION} -Dgoals=deploy release:prepare -P integration-tests,oracle,mssql,handbook'
}
post {
success {
// post release on github
archiveArtifacts artifacts: '**/target/deegree-webservices-*.war', fingerprint: true
archiveArtifacts artifacts: '**/target/deegree-webservices-handbook*.zip', fingerprint: true
}
}
}
stage ('Deploy PROD') {
when {
branch 'master'
}
// install current release version on demo.deegree.org
steps {
echo 'Deploying to demo.deegree.org...'
echo 'Running smoke tests...'
}
}
}
post {
always {
Expand Down