diff --git a/Jenkinsfile b/Jenkinsfile index ca8ab5d21eaa66fef242f599bf7671ae5def723b..71a02b02472a389bad18be2cd73326cf76132c06 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -52,7 +52,35 @@ pipeline { } } } - stage('Build Pluto-Interface') { + + stage('Build Pluto / NachrichtenManagner') { + steps { + script { + FAILED_STAGE=env.STAGE_NAME + } + container("maven-17"){ + sh 'mvn --version' + configFileProvider([configFile(fileId: 'maven-settings', variable: 'MAVEN_SETTINGS')]) { + sh 'mvn -s $MAVEN_SETTINGS clean install -Dmaven.wagon.http.retryHandler.count=3' + + script { + try { + if (env.BRANCH_NAME == 'master') { + withSonarQubeEnv('sonarqube-ozg-sh'){ + sh 'mvn -s $MAVEN_SETTINGS sonar:sonar' + } + } + } catch (Exception e) { + unstable("SonarQube failed") + } + } + } + } + + } + } + + /* stage('Build Pluto-Interface') { steps { script { FAILED_STAGE=env.STAGE_NAME @@ -77,10 +105,31 @@ pipeline { } } } + + } + }*/ + + stage('Deploy to Nexus'){ + when { + anyOf { + branch 'master' + branch 'release' + } + } + steps { + script { + FAILED_STAGE = env.STAGE_NAME + } + container('maven-17') { + configFileProvider([configFile(fileId: 'maven-settings', variable: 'MAVEN_SETTINGS')]) { + sh 'mvn -s $MAVEN_SETTINGS -DskipTests clean deploy' + } + + } } } - stage('Deploy Pluto-Interface to Nexus'){ + /* stage('Deploy Pluto-Interface to Nexus'){ when { anyOf { branch 'master' @@ -197,7 +246,7 @@ pipeline { } } } - } + }*/