node { try{ stage('Checkout') { checkout scm } stage('Build') { docker.image("registry.nspop.dk/tools/nspbuilder:${NSPBUILDER_TAG}").inside(){ sh "mvn -B install -Drevision=${DOCKERTAG}" } junit '**/target/surefire-reports/*.xml' // maximumLineCoverage should really be 80... but the code only have a bit more then 70% coverage when we took over the code. jacoco changeBuildStatus: true, maximumLineCoverage: '60', minimumLineCoverage: '50', exclusionPattern: '**/webservices/pid/certifikat/dk/**/*.*,**/localhost/**/*.*,**/dk/sosi/sts/fuldmagt/**/*.*,**/dk/sosi/sts/fuldmagt/v2/**/*.*,**/dk/sosi/sts/pidcpr/stub/**/*.*,**/dk/sosi/sts/ridcpr/stub/**/*.*' // jacoco changeBuildStatus: true, exclusionPattern: '**/dk/nsp/nas/test/**/*.*,**/dk/medcom/dgws/**/*.*,**/dk/nsi/**/*.*,**/oasis/names/**/*.*,**/org/oasis_open/**/*.*,**/org/w3/**/*.*,**/org/xmlsoap/**/*.*', maximumLineCoverage: '80', minimumLineCoverage: '60' } stage ('Archive') { docker.build("registry.nspop.dk/components/sts/sts:${DOCKERTAG}", '--pull --build-arg BASE_TAG=${NSP_BASE_TAG} modules/sts-server') docker.build("registry.nspop.dk/components/sts/fuldmagt-stub:${DOCKERTAG}", '--pull modules/fuldmagt-stub') docker.build("registry.nspop.dk/components/sts/fuldmagt-stub-v2:${DOCKERTAG}", '--pull modules/fuldmagt-stubV2') // SDS-6669: docker.build("registry.nspop.dk/components/sts/ridcpr-stub:${DOCKERTAG}", '--pull modules/ridcpr-stub') } } catch (err) { slackSend channel: 'kit_ci', color: 'bad', message: "${env.JOB_NAME} ${env.BUILD_NUMBER} - Build failed ... (<${env.BUILD_URL}|Open>)", tokenCredentialId: 'Slack-Token' throw err } finally { stage('Cleanup') { deleteDir() } } }