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

promotion configuration is lost when creating a new job by copy

XMLWordPrintable

    • 936.va_571a_a_b_f8da_5

      When I create a new job by copying from another one, the promotion configuration is not copied anymore.

      Here is the log :

      Sep 27 10:41:47  jenkins[17062]: 2022-09-27 08:41:47.277+0000 [id=12597]#011WARNING#011h.p.promoted_builds.CopyListener#onCopied: Failed to copy/load promotion /var/lib/jenkins/jobs/SourceProject/promotions/GoToPreProd into new job
      Sep 27 10:41:47  jenkins[17062]: java.nio.file.NoSuchFileException: /var/lib/jenkins/jobs/NewProject/promotions/GoToPreProd/config.xml
      Sep 27 10:41:47  jenkins[17062]: #011at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
      Sep 27 10:41:47  jenkins[17062]: #011at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
      Sep 27 10:41:47  jenkins[17062]: #011at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
      Sep 27 10:41:47  jenkins[17062]: #011at java.base/sun.nio.fs.UnixCopyFile.copyFile(UnixCopyFile.java:248)
      Sep 27 10:41:47  jenkins[17062]: #011at java.base/sun.nio.fs.UnixCopyFile.copy(UnixCopyFile.java:603)
      Sep 27 10:41:47  jenkins[17062]: #011at java.base/sun.nio.fs.UnixFileSystemProvider.copy(UnixFileSystemProvider.java:258)
      Sep 27 10:41:47  jenkins[17062]: #011at java.base/java.nio.file.Files.copy(Files.java:1295)
      Sep 27 10:41:47  jenkins[17062]: #011at hudson.plugins.promoted_builds.CopyListener.onCopied(CopyListener.java:40)
      Sep 27 10:41:47  jenkins[17062]: #011at hudson.model.listeners.ItemListener.lambda$fireOnCopied$0(ItemListener.java:176)
      Sep 27 10:41:47  jenkins[17062]: #011at jenkins.util.Listeners.lambda$notify$0(Listeners.java:59)
      Sep 27 10:41:47  jenkins[17062]: #011at jenkins.util.Listeners.notify(Listeners.java:70)
      Sep 27 10:41:47  jenkins[17062]: #011at hudson.model.listeners.ItemListener.fireOnCopied(ItemListener.java:176)
      Sep 27 10:41:47  jenkins[17062]: #011at hudson.model.ItemGroupMixIn.copy(ItemGroupMixIn.java:261)
      Sep 27 10:41:47  jenkins[17062]: #011at hudson.model.ItemGroupMixIn.createTopLevelItem(ItemGroupMixIn.java:185)
      Sep 27 10:41:47  jenkins[17062]: #011at jenkins.model.Jenkins.doCreateItem(Jenkins.java:4175)
      Sep 27 10:41:47  jenkins[17062]: #011at jenkins.model.Jenkins.doCreateItem(Jenkins.java:340)
      Sep 27 10:41:47  jenkins[17062]: #011at hudson.model.ListView.doCreateItem(ListView.java:377)

      I suspect some kind of regression caused by https://github.com/jenkinsci/promoted-builds-plugin/pull/217
      Maybe the behavior of the copy function is not the same regarding intermediate folders that could be missing.

      The copy is working with build 878.v12d3f7937690

            basil Basil Crow
            xpoinsard Xavier Poinsard
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: