Merge branch 'develop'
* develop: codesigning.asc.enc: removed jenkins: checkfor SNAPSHOT when pull request into master Dump environment - try #1 travis: remove deploy jenkins: update jenkinsfile template version: set to 0.7.0-SNAPSHOT
This commit is contained in:
commit
42c029dc82
7 changed files with 29 additions and 28 deletions
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -1,3 +0,0 @@
|
|||
[submodule ".travis-support"]
|
||||
path = .travis-support
|
||||
url = https://github.com/kemitix/kemitix-travis-support.git
|
|
@ -1 +0,0 @@
|
|||
Subproject commit b8593e541ba9a11447fa9559a83e5f99097ca4d2
|
10
.travis.yml
10
.travis.yml
|
@ -5,12 +5,4 @@ cache:
|
|||
directories:
|
||||
- "$HOME/.m2"
|
||||
install: true
|
||||
script: "./mvnw clean install"
|
||||
after_success:
|
||||
- sh .travis-support/coveralls.sh
|
||||
- bash <(curl -s https://codecov.io/bash)
|
||||
deploy:
|
||||
provider: script
|
||||
script: sh .travis-support/deploy.sh
|
||||
on:
|
||||
branch: master
|
||||
script: "./mvnw -B -U clean install"
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
CHANGELOG
|
||||
=========
|
||||
|
||||
0.7.0
|
||||
-----
|
||||
|
||||
*
|
||||
|
||||
0.6.0
|
||||
-----
|
||||
|
||||
|
|
|
@ -1,27 +1,32 @@
|
|||
final String repoName = "mon"
|
||||
final String repoUrl = "git@github.com:kemitix/${repoName}.git"
|
||||
final String mvn = "mvn --batch-mode --update-snapshots"
|
||||
|
||||
pipeline {
|
||||
agent any
|
||||
stages {
|
||||
stage('Prepare') {
|
||||
stage('Environment') {
|
||||
steps {
|
||||
git url: repoUrl, branch: '**', credentialsId: 'github-kemitix'
|
||||
sh 'set'
|
||||
}
|
||||
}
|
||||
stage('no SNAPSHOT in master') {
|
||||
// checks that the pom version is not a snapshot when the current branch is master
|
||||
// TODO: also check for SNAPSHOT when is a pull request with master as the target branch
|
||||
// checks that the pom version is not a snapshot when the current or target branch is master
|
||||
when {
|
||||
expression {
|
||||
(env.GIT_BRANCH == 'master') &&
|
||||
(env.GIT_BRANCH == 'master' || env.CHANGE_TARGET == 'master') &&
|
||||
(readMavenPom(file: 'pom.xml').version).contains("SNAPSHOT") }
|
||||
}
|
||||
steps {
|
||||
error("Build failed because SNAPSHOT version")
|
||||
}
|
||||
}
|
||||
stage('Static Code Analysis') {
|
||||
steps {
|
||||
withMaven(maven: 'maven 3.5.2', jdk: 'JDK 1.8') {
|
||||
sh "${mvn} compile checkstyle:checkstyle pmd:pmd"
|
||||
}
|
||||
pmd canComputeNew: false, defaultEncoding: '', healthy: '', pattern: '', unHealthy: ''
|
||||
}
|
||||
}
|
||||
stage('Build') {
|
||||
parallel {
|
||||
stage('Java 8') {
|
||||
|
@ -34,7 +39,7 @@ pipeline {
|
|||
stage('Java 9') {
|
||||
steps {
|
||||
withMaven(maven: 'maven 3.5.2', jdk: 'JDK 9') {
|
||||
sh 'mvn clean install'
|
||||
sh "${mvn} clean install"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -43,6 +48,14 @@ pipeline {
|
|||
stage('Test Results') {
|
||||
steps {
|
||||
junit '**/target/surefire-reports/*.xml'
|
||||
jacoco exclusionPattern: '**/*{Test|IT|Main|Application|Immutable}.class'
|
||||
withMaven(maven: 'maven 3.5.2', jdk: 'JDK 1.8') {
|
||||
sh "${mvn} com.gavinmogan:codacy-maven-plugin:coverage " +
|
||||
"-DcoverageReportFile=target/site/jacoco/jacoco.xml " +
|
||||
"-DprojectToken=`$JENKINS_HOME/codacy/token` " +
|
||||
"-DapiToken=`$JENKINS_HOME/codacy/apitoken` " +
|
||||
"-Dcommit=`git rev-parse HEAD`"
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Archiving') {
|
||||
|
@ -50,15 +63,10 @@ pipeline {
|
|||
archiveArtifacts '**/target/*.jar'
|
||||
}
|
||||
}
|
||||
stage('Coverage') {
|
||||
steps {
|
||||
jacoco(execPattern: '**/target/jacoco.exec')
|
||||
}
|
||||
}
|
||||
stage('Deploy') {
|
||||
when { expression { (env.GIT_BRANCH == 'master') } }
|
||||
steps {
|
||||
withMaven(maven: 'maven 3.5.2', jdk: 'JDK 9') {
|
||||
withMaven(maven: 'maven 3.5.2', jdk: 'JDK 1.8') {
|
||||
sh "${mvn} deploy --activate-profiles release -DskipTests=true"
|
||||
}
|
||||
}
|
||||
|
|
Binary file not shown.
2
pom.xml
2
pom.xml
|
@ -12,7 +12,7 @@
|
|||
</parent>
|
||||
<groupId>net.kemitix</groupId>
|
||||
<artifactId>mon</artifactId>
|
||||
<version>0.6.0</version>
|
||||
<version>0.7.0-SNAPSHOT</version>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
|
|
Loading…
Reference in a new issue