fixed CI issues with maven
This commit is contained in:
parent
651a285a14
commit
c15d9bb659
1 changed files with 7 additions and 6 deletions
13
Jenkinsfile
vendored
13
Jenkinsfile
vendored
|
|
@ -1,21 +1,22 @@
|
|||
#!groovy
|
||||
#!groovy
|
||||
// Jenkinsfile (Pipeline Script)
|
||||
node {
|
||||
// Configure environment
|
||||
env.REPO_URL = "repo.koc.se/zutil-java.git" //scm.getUserRemoteConfigs()[0].getUrl()
|
||||
env.BUILD_NAME = "BUILD-" + env.BUILD_ID
|
||||
|
||||
stage('Checkout') {
|
||||
git url: "https://" + env.REPO_URL
|
||||
}
|
||||
|
||||
checkout scm
|
||||
|
||||
withMaven(JDK: "JDK8") {
|
||||
withMaven(jdk: "jdk8", maven: "m3.5", mavenLocalRepo: ".repository") {
|
||||
|
||||
stage('Build') {
|
||||
sh 'mvn clean compile'
|
||||
}
|
||||
|
||||
stage('Test') {
|
||||
sh 'mvn surefire:test failsafe:integration-test'
|
||||
sh 'mvn test'
|
||||
}
|
||||
|
||||
stage('Package') {
|
||||
|
|
@ -23,7 +24,7 @@ node {
|
|||
|
||||
// Tag artifact
|
||||
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'f8e5f6c6-4adb-4ab2-bb5d-1c8535dff491',
|
||||
usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD']]) {
|
||||
usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD']]) {
|
||||
sh "git tag ${env.BUILD_NAME}"
|
||||
sh "git push 'https://${USERNAME}:${PASSWORD}@${env.REPO_URL}' ${env.BUILD_NAME}"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue