Remove artifacts from S3 for deleted pipelines#349
Conversation
|
The PR check build is failed, but it looks like it happened not because of my changes |
|
Please review the PR someone. |
alecharp
left a comment
There was a problem hiding this comment.
From a code point of view, this looks ok.
I haven't tested the code and don't have the infra to do so.
9b3dc91 to
3fd6801
Compare
|
Please, don't force push on pull request where someone started to review the content. |
1 similar comment
|
Please, don't force push on pull request where someone started to review the content. |
Ok. Won't do it in the future. |
|
Hi @alecharp. Since the PR was approved may you merge it to trigger a new release? |
|
Hi @rsandell or maybe you could merge the PR to trigger a build of a new release? |
|
@rsandell it looks like the build has been failed not because of the changes in that PR and the build's logs are not available anymore to get an exact answer. Maybe the problem was the same like here - https://ci.jenkins.io/job/Plugins/job/s3-plugin/view/change-requests/job/PR-349/1/ May I ask you try merging it again? |
Currently, the
s3-pluginplugin deletes the artifacts from S3 only if the corresponding build has been deleted. However, if a job (pipeline) is deleted, the artifacts that were uploaded to S3 by its builds will remain there indefinitely (unless they are manually deleted from S3).For example, in our environment we actively use the plugin with multi-branch pipelines - for every PR a pipeline is created automatically. When the PR is closed, the corresponding pipeline is deleted automatically, but the artifacts are still kept on S3. As a result, we accumulate a lot of unnecessary data and we need to clean them manually.
This PR adds a new option to the S3 profile -
deleteArtifactsRecursively. When enabled (by default it'sfalse), the plugin deletes the artifacts recursively if a pipeline (or a folder / organization folder) is deleted.