-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jenkinsfile
30 lines (27 loc) · 1 KB
/
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
27
28
29
30
// Syntax check with this command line
// curl -k -X POST -F "jenkinsfile=<Jenkinsfile" https://ci.rssw.eu/pipeline-model-converter/validate
pipeline {
agent none
options {
disableConcurrentBuilds()
buildDiscarder(logRotator(numToKeepStr: '10'))
timeout(time: 30, unit: 'MINUTES')
skipDefaultCheckout()
}
stages {
stage('Maven Central') {
agent { label 'Linux-Office03' }
steps {
checkout([$class: 'GitSCM', branches: scm.branches, extensions: scm.extensions + [[$class: 'CleanCheckout']], userRemoteConfigs: scm.userRemoteConfigs])
script {
def jdk = tool name: 'JDK17', type: 'jdk'
def mvn = tool name: 'Maven 3', type: 'maven'
withEnv(["JAVA_HOME=${jdk}"]) {
sh "${mvn}/bin/mvn -P release clean package verify deploy -Dgit.commit=\$(git rev-parse --short HEAD)"
mail body: "---", to: "[email protected]", subject: "GroovyPCT - Release artifact on Sonatype"
}
}
}
}
}
}