From 88d9979e8b5ddabb1940f0495d0f533c06505a93 Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Mon, 15 Oct 2018 21:36:31 -0400 Subject: [PATCH] Make sure to not archive PR JAR artifacts. --- Jenkinsfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 19ae32e52..7db984aed 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -2,6 +2,8 @@ pipeline { agent none stages { stage('Build') { + GIT_BRANCH = sh(returnStdout: true, script: 'git rev-parse --abbrev-ref HEAD').trim() + agent { docker { image 'velocitypowered/openjdk8-plus-git:slim' @@ -10,7 +12,9 @@ pipeline { } steps { sh './gradlew build --no-daemon' - archiveArtifacts 'proxy/build/libs/*-all.jar,api/build/libs/*-all.jar' + if (GIT_BRANCH == "master") { + archiveArtifacts 'proxy/build/libs/*-all.jar,api/build/libs/*-all.jar' + } } } stage('Deploy') {