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

External artifacts are not deleted when the build is deleted

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      When you delete a build from the UI the Artifacts are not deleted from S3. The rotation of the build works, after digging a little, I found that when you deleted a build from the UI the method called is hudson.model.Run.delete this method does not call jenkins.model.delete(), it calls all the onDeleted method from the RunListener registered, thus I suppose that we have to implement a RunListener that implements the onDeleted method.

        Attachments

          Activity

          Hide
          ifernandezcalvo Ivan Fernandez Calvo added a comment -

          I have setted the parameters to enable the delete feature `-Dio.jenkins.plugins.artifact_manager_s3.S3BlobStoreConfig.deleteArtifacts=true -Dio.jenkins.plugins.artifact_manager_s3.S3BlobStoreConfig.deleteStashes=true`

          Show
          ifernandezcalvo Ivan Fernandez Calvo added a comment - I have setted the parameters to enable the delete feature `-Dio.jenkins.plugins.artifact_manager_s3.S3BlobStoreConfig.deleteArtifacts=true -Dio.jenkins.plugins.artifact_manager_s3.S3BlobStoreConfig.deleteStashes=true`
          Hide
          jglick Jesse Glick added a comment -

          The suggested fix is incorrect—this looks like a bug in core.

          Show
          jglick Jesse Glick added a comment - The suggested fix is incorrect—this looks like a bug in core.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Jesse Glick
          Path:
          core/src/main/java/hudson/model/Run.java
          test/src/test/java/hudson/model/RunTest.java
          http://jenkins-ci.org/commit/jenkins/9b0a0e71b8a6b92227e6af80ec7202aa0bf44b5b
          Log:
          JENKINS-51819 When using a custom ArtifactManager, Run.delete must call ArtifactManager.delete.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/java/hudson/model/Run.java test/src/test/java/hudson/model/RunTest.java http://jenkins-ci.org/commit/jenkins/9b0a0e71b8a6b92227e6af80ec7202aa0bf44b5b Log: JENKINS-51819 When using a custom ArtifactManager, Run.delete must call ArtifactManager.delete.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          core/src/main/java/hudson/model/Run.java
          test/src/test/java/hudson/model/RunTest.java
          http://jenkins-ci.org/commit/jenkins/ee384ba34c4f886b0585e64231e5e713e3893d6f
          Log:
          Merge pull request #3484 from jglick/Run.deleteArtifacts-JENKINS-51819

          JENKINS-51819 When using a custom ArtifactManager, Run.delete must call ArtifactManager.delete

          Compare: https://github.com/jenkinsci/jenkins/compare/01b1f1ddbcad...ee384ba34c4f
          *NOTE:* This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

          Functionality will be removed from GitHub.com on January 31st, 2019.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: core/src/main/java/hudson/model/Run.java test/src/test/java/hudson/model/RunTest.java http://jenkins-ci.org/commit/jenkins/ee384ba34c4f886b0585e64231e5e713e3893d6f Log: Merge pull request #3484 from jglick/Run.deleteArtifacts- JENKINS-51819 JENKINS-51819 When using a custom ArtifactManager, Run.delete must call ArtifactManager.delete Compare: https://github.com/jenkinsci/jenkins/compare/01b1f1ddbcad...ee384ba34c4f * NOTE: * This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/ Functionality will be removed from GitHub.com on January 31st, 2019.
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          Fixed in Jenkins 2.127

          Show
          oleg_nenashev Oleg Nenashev added a comment - Fixed in Jenkins 2.127

            People

            • Assignee:
              jglick Jesse Glick
              Reporter:
              ifernandezcalvo Ivan Fernandez Calvo
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: