Artifact Manager on S3 does not delete artifacts from s3 when job is deleted

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      Jenkins artifacts are not deleted from s3 bucket when a pipeline job get deleted or a branch get deleted in a multi branch pipeline.

       

      How to reproduce

      • Use any git repo to create a jenkins multi branch pipeline named produce_bug using the Jenkinsfile below.
      • Create a branch named testing
      • Build the branch testing twice
      • Assuming the build numbers are #1 and #2, artifacts will be uploaded to s3 to produce_bug/testing/1/ and produce_bug/testing/2/ folders

      First test case: 

      • delete build #1 using the jenkins button Delete build #1 
        • Directory produce_bug/testing/1/ is being deleted from s3
        • Works as expected 

      Second test case: 

      • Delete the branch testing
        • The job for the branch testing is being deleted from s3
        • The directory produce_bug/testing/ is not being deleted from s3
        • Does not work as expected! produce_bug/testing/ should be deleted from s3

      Third test case: 

      • Delete the multi branch pipeline produce_bug
        • The directory produce_bug ** is not being deleted from s3
        • Does not work as expected! produce_bug/ should be deleted

       

       

      // Jenkinsfile
      pipeline {
          agent any
          stages {
              stage("demo") {
                  steps {
                      writeFile file: 'f', text: 'some content here'
                      archiveArtifacts 'f'
                  }
              }
          }
      } 

       

       

            Assignee:
            Alexey
            Reporter:
            walid boussafa
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: