-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jenkinsfile
22 lines (16 loc) · 943 Bytes
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
node {
try {
def mvnHome = tool 'M3'
env.JAVA_HOME="${tool 'jdk-oracle-8'}"
env.PATH="${env.JAVA_HOME}/bin:${mvnHome}/bin:${env.PATH}"
stage 'Clone'
checkout scm
def gitTag = sh(returnStdout: true, script: "git rev-parse --short HEAD").trim()
stage 'Deploy'
// warning don't change the version number without also changing the server version of the cron script
sh "mvn -s ${env.HOME}/usethesource-maven-settings.xml deploy:deploy-file -DgroupId=org.rascalmpl -DartifactId=update-site-script -Dversion=1.0.0-SNAPSHOT -Dclassifier=${gitTag} -DgeneratePom=false -Dpackaging=sh -DrepositoryId=usethesource-snapshots -Durl=http://nexus.usethesource.io/content/repositories/snapshots/ -Dfile=refresh-nexus-data"
} catch(e) {
slackSend (color: '#d9534f', message: "FAILED: <${env.BUILD_URL}|${env.JOB_NAME} [${env.BUILD_NUMBER}]>")
throw e
}
}