2024-10-10 14:05:33 +02:00
|
|
|
pipeline {
|
|
|
|
agent {
|
|
|
|
dockerfile {
|
|
|
|
filename 'etc/jenkinsAgent.Dockerfile'
|
|
|
|
// additionalBuildArgs ...
|
|
|
|
args '--network=bridge --user root -v $PWD:$PWD -v /var/run/docker.sock:/var/run/docker.sock --group-add 984'
|
|
|
|
reuseNode true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
environment {
|
|
|
|
DOCKER_HOST = 'unix:///var/run/docker.sock'
|
|
|
|
HSADMINNG_POSTGRES_ADMIN_USERNAME = 'admin'
|
|
|
|
HSADMINNG_POSTGRES_RESTRICTED_USERNAME = 'restricted'
|
|
|
|
HSADMINNG_MIGRATION_DATA_PATH = 'migration'
|
|
|
|
}
|
|
|
|
|
|
|
|
triggers {
|
|
|
|
pollSCM('H/1 * * * *')
|
|
|
|
}
|
|
|
|
|
|
|
|
stages {
|
|
|
|
stage('Checkout') {
|
|
|
|
steps {
|
|
|
|
checkout scm
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
stage ('Compile & Test') {
|
|
|
|
steps {
|
|
|
|
sh './gradlew clean check --no-daemon -x pitest -x dependencyCheckAnalyze'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
post {
|
|
|
|
always {
|
|
|
|
// archive test results
|
|
|
|
junit 'build/test-results/test/*.xml'
|
|
|
|
|
|
|
|
// archive the JaCoCo coverage report in XML and HTML format
|
2024-10-11 11:14:02 +02:00
|
|
|
jacoco(
|
|
|
|
execPattern: 'build/jacoco/*.exec',
|
|
|
|
classPattern: 'build/classes/java/main',
|
|
|
|
sourcePattern: 'src/main/java'
|
|
|
|
)
|
2024-10-10 14:05:33 +02:00
|
|
|
|
|
|
|
// cleanup workspace
|
|
|
|
cleanWs()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|