Skip to content
Permalink
Browse files
[JENKINS-51523] Delegate artifact lifecycle management to S3
Do not delete any artifacts from Jenkins

Unless a system property is set
  • Loading branch information
carlossg committed May 24, 2018
1 parent dac6602 commit 735de3015e4fe32710d8aad5f150608c0073d58a
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/main/java/io/jenkins/plugins/artifact_manager_jclouds/JCloudsArtifactManager.java
@@ -75,6 +75,8 @@ public final class JCloudsArtifactManager extends ArtifactManager implements Sta

private static final Logger LOGGER = Logger.getLogger(JCloudsArtifactManager.class.getName());

private static boolean DELETE_BLOBS = Boolean.getBoolean(JCloudsArtifactManager.class.getName() + ".deleteBlobs");

private final BlobStoreProvider provider;

private transient String key; // e.g. myorg/myrepo/master/123
@@ -129,7 +131,7 @@ public void archive(FilePath workspace, Launcher launcher, BuildListener listene

@Override
public boolean delete() throws IOException, InterruptedException {
return delete(provider, getContext().getBlobStore(), getBlobPath(""));
return DELETE_BLOBS ? delete(provider, getContext().getBlobStore(), getBlobPath("")) : false;
}

/**

0 comments on commit 735de30

Please sign in to comment.