Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit a246d2e

Browse files
authored
Merge pull request #68 from mat007/no-artifacts-on-pr-branch
Prevent artifacts to be archived for pull requests
2 parents 637b4ae + 5438e5e commit a246d2e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Jenkinsfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ pipeline {
2929
dir('stash') {
3030
stash name: 'e2e'
3131
}
32-
archiveArtifacts '*.tar.gz'
32+
if(!(env.BRANCH_NAME ==~ "PR-\\d+")) {
33+
archiveArtifacts '*.tar.gz'
34+
}
3335
} finally {
3436
def clean_images = /docker image ls --format "{{.ID}}\t{{.Tag}}" | grep $(git describe --always --dirty) | awk '{print $1}' | xargs docker image rm/
3537
sh clean_images

0 commit comments

Comments
 (0)