2018-07-26 13:03:59 +08:00
|
|
|
pipeline {
|
2018-09-22 00:40:34 +08:00
|
|
|
agent none
|
2018-12-08 06:25:04 +08:00
|
|
|
options {
|
|
|
|
disableConcurrentBuilds()
|
|
|
|
}
|
2018-07-26 13:03:59 +08:00
|
|
|
stages {
|
|
|
|
stage('Build') {
|
2018-09-22 00:40:34 +08:00
|
|
|
agent {
|
|
|
|
docker {
|
|
|
|
image 'velocitypowered/openjdk8-plus-git:slim'
|
|
|
|
args '-v gradle-cache:/root/.gradle:rw'
|
|
|
|
}
|
|
|
|
}
|
2018-10-16 09:40:34 +08:00
|
|
|
steps {
|
|
|
|
sh './gradlew build --no-daemon'
|
|
|
|
archiveArtifacts 'proxy/build/libs/*-all.jar,api/build/libs/*-all.jar'
|
2018-07-26 13:03:59 +08:00
|
|
|
}
|
|
|
|
}
|
2018-09-22 00:44:17 +08:00
|
|
|
stage('Deploy') {
|
2018-09-01 04:57:37 +08:00
|
|
|
when {
|
|
|
|
expression {
|
|
|
|
GIT_BRANCH = sh(returnStdout: true, script: 'git rev-parse --abbrev-ref HEAD').trim()
|
2018-09-01 04:59:15 +08:00
|
|
|
return GIT_BRANCH == 'master'
|
2018-09-01 04:57:37 +08:00
|
|
|
}
|
|
|
|
}
|
2018-09-22 00:40:34 +08:00
|
|
|
agent {
|
|
|
|
docker {
|
|
|
|
image 'velocitypowered/openjdk8-plus-git:slim'
|
2018-09-22 00:44:17 +08:00
|
|
|
args '-v gradle-cache:/root/.gradle:rw -v maven-repo:/maven-repo:rw -v javadoc:/javadoc:rw'
|
2018-09-22 00:40:34 +08:00
|
|
|
}
|
|
|
|
}
|
2018-08-22 11:26:41 +08:00
|
|
|
steps {
|
2018-09-22 00:49:02 +08:00
|
|
|
sh 'export MAVEN_DEPLOYMENT=true; ./gradlew publish --no-daemon'
|
2018-08-25 12:44:32 +08:00
|
|
|
sh 'rsync -av --delete ./api/build/docs/javadoc/ /javadoc'
|
2018-08-25 12:42:54 +08:00
|
|
|
}
|
|
|
|
}
|
2018-07-26 13:03:59 +08:00
|
|
|
}
|
|
|
|
}
|