From 63ce98cd17dc4c1de6d5b22807627ec16fb940d7 Mon Sep 17 00:00:00 2001 From: JT Date: Wed, 7 Jun 2023 16:11:05 -0700 Subject: [PATCH] don't archive artifacts except for main branch --- Jenkinsfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 7f208420..e063285c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -15,7 +15,7 @@ node("Windows") { bat "dotnet test StabilityMatrix.Tests" } - stage('Build') { + stage('Publish') { bat "dotnet publish -c Release -o out -r win-x64 --self-contained true" } @@ -23,7 +23,9 @@ node("Windows") { version = VersionNumber projectStartDate: '', versionNumberString: '${BUILD_DATE_FORMATTED, "yy"}.${BUILD_WEEK}.${BUILDS_THIS_WEEK}', versionPrefix: '', worstResultForIncrement: 'SUCCESS' } - stage ('Archive Artifacts') { - archiveArtifacts artifacts: 'out/**/*.*', followSymlinks: false + if (env.BRANCH_NAME == "main") { + stage ('Archive Artifacts') { + archiveArtifacts artifacts: 'out/**/*.*', followSymlinks: false + } } }