Terms of Service | Privacy Policy | Cookie Policy

Commit 31c66f89 authored by Uwe Plonus's avatar Uwe Plonus

Updated Jenkinsfile and pom.xml for new structure

parent 943798a2
@Library('jenkins@java-8') _
pipeline {
agent any
stages {
......@@ -8,12 +10,7 @@ pipeline {
}
stage('Build') {
steps {
withMaven(jdk: 'Current JDK 8',
maven: 'Current Maven 3',
mavenLocalRepo: '${JENKINS_HOME}/maven-repositories/${EXECUTOR_NUMBER}/',
globalMavenSettingsConfig: '9a4daf6d-06dd-434a-83cc-9ba9bd2326fc') {
sh "mvn clean install"
}
buildStep()
}
}
stage('Document and Deploy') {
......@@ -25,29 +22,8 @@ pipeline {
parallel {
stage('Deploy') {
steps {
withMaven(jdk: 'Current JDK 8',
maven: 'Current Maven 3',
mavenLocalRepo: '${JENKINS_HOME}/maven-repositories/${EXECUTOR_NUMBER}/',
globalMavenSettingsConfig: '03c863c2-c19c-4ed5-bc3a-7650b8f73ecf') {
sh "mvn deploy"
}
}
}
stage('Create Site') {
steps {
withMaven(jdk: 'Current JDK 8',
maven: 'Current Maven 3',
mavenLocalRepo: '${JENKINS_HOME}/maven-repositories/${EXECUTOR_NUMBER}/',
globalMavenSettingsConfig: '03c863c2-c19c-4ed5-bc3a-7650b8f73ecf') {
sh "mvn -Dscmpublish.skipCheckin=true post-site scm-publish:publish-scm"
}
withCredentials([string(credentialsId: "f9c0bd13-de91-4d90-a292-8fd2d05c26b0", variable: 'GH_TOKEN')]) {
sh """
cd target/scmpublish-checkout
git commit -a -m 'Automatic created documentation' || echo 'Nothing to commit.'
git push -fq https://${GH_TOKEN}@github.com/sw4j-org/quality-profile.git gh-pages:gh-pages
"""
}
doDeploy()
publishSite()
}
}
}
......
......@@ -86,6 +86,11 @@
<artifactId>maven-gpg-plugin</artifactId>
<version>${gpg-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>${project-info-reports-plugin-version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-scm-publish-plugin</artifactId>
......@@ -105,7 +110,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>${project-info-reports-plugin-version}</version>
<configuration>
<dependencyLocationsEnabled>false</dependencyLocationsEnabled>
<dependencyDetailsEnabled>false</dependencyDetailsEnabled>
......@@ -200,7 +204,7 @@
</snapshotRepository>
<site>
<id>github</id>
<url>scm:git:https://github.com/sw4j-org/quality-profile.git</url>
<url>scm:git:git@github.com:sw4j-org/quality-profile.git</url>
</site>
</distributionManagement>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment