3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-12-25 15:50:19 +01:00
Velocity/Jenkinsfile

39 Zeilen
1.1 KiB
Plaintext

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