Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
59 lines (39 sloc) 1.6 KB
import com.cloudogu.ces.cesbuildlib.*
// Don't run concurrent builds, because the ITs use the same port causing random failures on concurrent builds.
node {
String cesFqdn = findHostName()
String cesUrl = "https://${cesFqdn}"
String credentialsId = 'scmCredentials'
Maven mvn = new MavenWrapper(this)
catchError {
stage('Checkout') {
checkout scm
stage('Build') {
mvn 'clean package -DskipTests'
archiveArtifacts artifacts: '**/target/*.jar'
String jacoco = "org.jacoco:jacoco-maven-plugin:0.8.1"
stage('Test') {
mvn "${jacoco}:prepare-agent test ${jacoco}:report"
stage('Integration Test') {
mvn "${jacoco}:prepare-agent-integration failsafe:integration-test failsafe:verify ${jacoco}:report-integration"
stage('Static Code Analysis') {
def sonarQube = new SonarQube(this, [usernamePassword: credentialsId, sonarHostUrl: "${cesUrl}/sonar"])
stage('Deploy') {
mvn.useDeploymentRepository([id: cesFqdn, url: "${cesUrl}/nexus", credentialsId: credentialsId, type: 'Nexus3'])
// Archive Unit and integration test results, if any
junit allowEmptyResults: true, testResults: '**/target/failsafe-reports/TEST-*.xml,**/target/surefire-reports/TEST-*.xml'
You can’t perform that action at this time.