diff --git a/Jenkinsfile b/Jenkinsfile index f878ab3..cd330e1 100755 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,15 +1,14 @@ #!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 +withMaven(jdk: "jdk8", maven: "m3.5", mavenLocalRepo: ".repository", mavenSettingsConfig: "639c4560-87b7-4502-bb3d-2c44845cd2b5") { + 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 - } - - withMaven(jdk: "jdk8", maven: "m3.5", mavenLocalRepo: ".repository", mavenSettingsConfig: "639c4560-87b7-4502-bb3d-2c44845cd2b5") { + stage('Checkout') { + git url: "https://" + env.REPO_URL + } stage('Build') { sh 'mvn clean compile' @@ -34,4 +33,13 @@ node { sh 'mvn -DskipStatic -DskipTests deploy' } } -} + + stage('Release') { + timeout(time: 1, unit: 'HOURS') { + input message: 'Deploy?', submitter: 'ziver' + node { + sh 'mvn --batch-mode -DskipStatic -DskipTests release:prepare release:perform' + } + } + } +} \ No newline at end of file diff --git a/pom.xml b/pom.xml index c229b62..640a069 100755 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ scm:git:https://github.com/Ziver/zutil.git - scm:git:https://github.com/Ziver/zutil.git + scm:git:https://repo.koc.se/zutil-java.git https://github.com/Ziver/zutil @@ -111,6 +111,8 @@ ${java.version} + + org.apache.maven.plugins maven-source-plugin @@ -124,8 +126,6 @@ - - org.apache.maven.plugins maven-javadoc-plugin @@ -167,6 +167,10 @@ true + + maven-release-plugin + 2.5.3 +