forked from Riverside-Software/rules-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
26 lines (23 loc) · 1013 Bytes
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
pipeline {
options {
buildDiscarder(logRotator(numToKeepStr:'10'))
timeout(time: 15, unit: 'MINUTES')
skipDefaultCheckout()
}
stages {
stage ('Build OpenEdge rules') {
steps {
checkout([$class: 'GitSCM', branches: scm.branches, extensions: scm.extensions + [[$class: 'CleanCheckout']], userRemoteConfigs: scm.userRemoteConfigs])
script {
withEnv(["MVN_HOME=${tool name: 'Maven 3', type: 'hudson.tasks.Maven$MavenInstallation'}", "JAVA_HOME=${tool name: 'Corretto 11', type: 'jdk'}"]) {
sh "git rev-parse --short HEAD > current-commit"
def currCommit = readFile('current-commit').replace("\n", "").replace("\r", "")
sh "mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent install -Dmaven.test.failure.ignore=true -Dgit.commit=${currCommit}"
}
}
archiveArtifacts artifacts: 'target/*.jar'
step([$class: 'Publisher', reportFilenamePattern: '**/testng-results.xml'])
}
}
}
}