diff --git a/Jenkinsfile b/Jenkinsfile index 01c6b00a543df6bcebb7dd37e8a3370659d6c7b5..cd33fb8f7aef7dc9397033a6cde7e3021bee42c3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -46,8 +46,20 @@ pipeline { } container("quarkus-22"){ configFileProvider([configFile(fileId: 'maven-settings', variable: 'MAVEN_SETTINGS')]) { - //sh 'mvn -s $MAVEN_SETTINGS clean install -Dmaven.wagon.http.retryHandler.count=3' - sh './mvnw -s $MAVEN_SETTINGS package -Pnative -Dquarkus.native.container-build=true' + sh './mvnw -s $MAVEN_SETTINGS clean deploy -Dmaven.wagon.http.retryHandler.count=3' + } + } + } + } + + stage('Build native image') { + steps { + script { + FAILED_STAGE=env.STAGE_NAME + } + container("quarkus-22"){ + configFileProvider([configFile(fileId: 'maven-settings', variable: 'MAVEN_SETTINGS')]) { + sh './mvnw -s $MAVEN_SETTINGS -Pnative -Dquarkus.native.container-build=true -Dmaven.wagon.http.retryHandler.count=3' } } } @@ -72,26 +84,6 @@ pipeline { // } // } - stage('Build image') { - steps { - script { - FAILED_STAGE=env.STAGE_NAME - - container("docker") { - withCredentials([usernamePassword(credentialsId: 'jenkins-docker-login', usernameVariable: 'USER', passwordVariable: 'PASSWORD')]) { - sh 'docker login docker.ozg-sh.de -u ${USER} -p ${PASSWORD}' - - //sh './mvnw -s $MAVEN_SETTINGS clean package -Pnative -DskipTests' - - sh 'docker build -f src/main/docker/Dockerfile.native -t docker.ozg-sh.de/user-manager:build-latest .' - //sh './mvnw -s $MAVEN_SETTINGS verify -Pnative' - sleep time: 10000, unit: 'MILLISECONDS' - } - } - } - } - } - stage('Push Docker image') { steps { script {