Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-70252

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • Jenkins 2.361.3 LTS

      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'
                  }
              }
          }
      } 

       

       

            alkosenko Alexey
            boussaffawalid walid boussafa
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: