Some model objects which are written at top level to their own XML file. The most important examples are AbstractItem, Run, and User.

      Sometimes various classes defined in Jenkins which are intended to be serialized via XStream will mistakenly declare a non-transient field referring back to the model object. If the class happens to be an action, property, etc. which is contained in that same model object, this will usually be harmless, as XStream will create a reference—though it will occasionally blow up in your face when using lazy loading of builds, since there are conditions under which a fresh copy of the model object will be written, which will typically be in some inconsistent state after deserialization since no onLoad method has been called on it. If the class is contained in something else, you will definitely get duplicated data, which can be rather bad.

      Jenkins should if possible block you from accidentally storing a model object inside something else.

          [JENKINS-45892] Forbid nested references to model objects

          Code changed in jenkins
          User: Jesse Glick
          Path:
          src/main/java/hudson/maven/MavenProbeAction.java
          http://jenkins-ci.org/commit/maven-plugin/0c45df3b96a41e3c959f9191c33c3db257ade8e2
          Log:
          Eliminate JENKINS-45892 warning.
          MavenProbeAction was saving a copy of the project (or, as of 2.74, just a reference) in build.xml.
          This was silly because MavenProbeAction itself is transient—it is deleted when the build completes!

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/hudson/maven/MavenProbeAction.java http://jenkins-ci.org/commit/maven-plugin/0c45df3b96a41e3c959f9191c33c3db257ade8e2 Log: Eliminate JENKINS-45892 warning. MavenProbeAction was saving a copy of the project (or, as of 2.74, just a reference) in build.xml. This was silly because MavenProbeAction itself is transient—it is deleted when the build completes!

          Emil Wypych added a comment - - edited

          I've just created a new issue - JENKINS-49368 - where I found the plugin causing this issue. It's the Last Changes Plugin. The issue is linked to this task.

          Emil Wypych added a comment - - edited I've just created a new issue - JENKINS-49368 - where I found the plugin causing this issue. It's the Last Changes Plugin. The issue is linked to this task.

          Ulli Hafner added a comment - - edited

          The exception message should be improved, currently (2.84.4) it is not possible to find the problematic action by looking at the stacktrace. One needs to look into build.xml to find it:

              <org.jenkinsci.plugins.pitmutation.PitBuildAction plugin="pitmutation@1.0-16">
                <owner__ class="flow-build" reference="../../.."/>
                <reports__/>
              </org.jenkinsci.plugins.pitmutation.PitBuildAction>
          
          
          WARNING: JENKINS-45892: reference to Model #2 being saved from unexpected /Users/hafner/Development/jenkins/jobs/Model/builds/4/build.xml
          java.lang.IllegalStateException
          	at hudson.XmlFile.replaceIfNotAtTopLevel(XmlFile.java:210)
          	at hudson.model.Run.writeReplace(Run.java:1929)
          	at sun.reflect.GeneratedMethodAccessor286.invoke(Unknown Source)
          	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          	at java.lang.reflect.Method.invoke(Method.java:498)
          	at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callWriteReplace(SerializationMethodInvoker.java:89)
          	at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:141)
          	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
          	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
          	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
          	at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
          	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)
          	at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)
          	at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
          	at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)
          	at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)
          	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
          	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
          	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
          	at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
          	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)
          	at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)
          	at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
          	at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)
          	at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)
          	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
          	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
          	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)
          	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:88)
          	at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:64)
          	at com.thoughtworks.xstream.converters.collections.CollectionConverter.marshal(CollectionConverter.java:74)
          	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
          	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
          	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84)
          	at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265)
          	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252)
          	at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224)
          	at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138)
          	at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209)
          	at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150)
          	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
          	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
          	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)
          	at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:82)
          	at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37)
          	at com.thoughtworks.xstream.XStream.marshal(XStream.java:1026)
          	at com.thoughtworks.xstream.XStream.marshal(XStream.java:1015)
          	at com.thoughtworks.xstream.XStream.toXML(XStream.java:988)
          	at hudson.XmlFile.write(XmlFile.java:181)
          	at org.jenkinsci.plugins.workflow.support.PipelineIOUtils.writeByXStream(PipelineIOUtils.java:30)
          	at org.jenkinsci.plugins.workflow.job.WorkflowRun.save(WorkflowRun.java:1070)
          	at org.jenkinsci.plugins.workflow.job.WorkflowRun.copyLogs(WorkflowRun.java:544)
          	at org.jenkinsci.plugins.workflow.job.WorkflowRun.access$600(WorkflowRun.java:143)
          	at org.jenkinsci.plugins.workflow.job.WorkflowRun$3.run(WorkflowRun.java:368)
          	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
          	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
          	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
          	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
          	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
          	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
          	at java.lang.Thread.run(Thread.java:748)
          
          Mar 10, 2018 2:47:57 PM hudson.XmlFile replaceIfNotAtTopLevel
          

          Ulli Hafner added a comment - - edited The exception message should be improved, currently (2.84.4) it is not possible to find the problematic action by looking at the stacktrace. One needs to look into build.xml to find it: <org.jenkinsci.plugins.pitmutation.PitBuildAction plugin="pitmutation@1.0-16"> <owner__ class="flow-build" reference="../../.."/> <reports__/> </org.jenkinsci.plugins.pitmutation.PitBuildAction> WARNING: JENKINS-45892: reference to Model #2 being saved from unexpected /Users/hafner/Development/jenkins/jobs/Model/builds/4/build.xml java.lang.IllegalStateException at hudson.XmlFile.replaceIfNotAtTopLevel(XmlFile.java:210) at hudson.model.Run.writeReplace(Run.java:1929) at sun.reflect.GeneratedMethodAccessor286.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callWriteReplace(SerializationMethodInvoker.java:89) at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:141) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84) at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265) at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252) at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224) at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138) at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209) at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84) at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265) at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252) at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224) at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138) at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209) at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:88) at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:64) at com.thoughtworks.xstream.converters.collections.CollectionConverter.marshal(CollectionConverter.java:74) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:84) at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:265) at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:252) at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:224) at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:138) at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:209) at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:150) at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58) at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43) at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:82) at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37) at com.thoughtworks.xstream.XStream.marshal(XStream.java:1026) at com.thoughtworks.xstream.XStream.marshal(XStream.java:1015) at com.thoughtworks.xstream.XStream.toXML(XStream.java:988) at hudson.XmlFile.write(XmlFile.java:181) at org.jenkinsci.plugins.workflow.support.PipelineIOUtils.writeByXStream(PipelineIOUtils.java:30) at org.jenkinsci.plugins.workflow.job.WorkflowRun.save(WorkflowRun.java:1070) at org.jenkinsci.plugins.workflow.job.WorkflowRun.copyLogs(WorkflowRun.java:544) at org.jenkinsci.plugins.workflow.job.WorkflowRun.access$600(WorkflowRun.java:143) at org.jenkinsci.plugins.workflow.job.WorkflowRun$3.run(WorkflowRun.java:368) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Mar 10, 2018 2:47:57 PM hudson.XmlFile replaceIfNotAtTopLevel

          Hi guys, I'm trying to solve this issue on last changes plugin (JENKINS-49368) but I have no clues.  What should I look into build.xml?

          Below is a build.xml sample and here is the build action code and here is a model class used on the Build Action. If I got it right we shouldn't have 'LastChanges' as a property on LastChangesBuildAction. Any help is appreciated.

           

           

          <com.github.jenkins.lastchanges.LastChangesBuildAction plugin="last-changes@2.7-SNAPSHOT">
                <build class="build" reference="../../.."/>
                <buildChanges>
                  <currentRevision>
                    <commitId>08381f99f1847c56e5e469090c6adb8600f4d66e</commitId>
                    <commitMessage>update docker container
          </commitMessage>
                    <committerName>rmpestano</committerName>
                    <committerEmail>rmpestano@gmail.com</committerEmail>
                    <commitDate>11/03/2018 00:22:05 GMT-03:00</commitDate>
                  </currentRevision>
                  <previousRevision>
                    <commitId>dd255d59a85377ea2651c4570072277cd6dd069a</commitId>
                    <commitMessage>[maven-release-plugin] prepare for next development iteration
          </commitMessage>
                    <committerName>rmpestano</committerName>
                    <committerEmail>rmpestano@gmail.com</committerEmail>
                    <commitDate>10/03/2018 23:21:04 GMT-03:00</commitDate>
                  </previousRevision>
                  <diff>diff --git a/docker/Dockerfile b/docker/Dockerfile
          index e5ce847..9fe9f66 100644
          --- a/docker/Dockerfile
          +++ b/docker/Dockerfile
          @@ -1,4 +1,4 @@
          -FROM jenkins:2.73.1
          -COPY plugins.txt /usr/share/jenkins/plugins.txt
          +FROM jenkins/jenkins:2.73.1
           ENV JAVA_OPTS=&quot;-Djenkins.install.runSetupWizard=false -Dhudson.model.DirectoryBrowserSupport.CSP=\&quot;\&quot;&quot;
          -RUN /usr/local/bin/plugins.sh /usr/share/jenkins/plugins.txt
          \ No newline at end of file
          +COPY plugins.txt /usr/share/jenkins/ref/plugins.txt
          +RUN /usr/local/bin/install-plugins.sh &lt; /usr/share/jenkins/ref/plugins.txt
          \ No newline at end of file
          diff --git a/docker/plugins.txt b/docker/plugins.txt
          index ddd6975..4452c81 100644
          --- a/docker/plugins.txt
          +++ b/docker/plugins.txt
          @@ -47,4 +47,3 @@
           workflow-step-api:2.10
           workflow-support:2.14
           cucumber-living-documentation:2.1
          -
          </diff>
                  <commits>
                    <com.github.jenkins.lastchanges.model.CommitChanges>
                      <commitInfo reference="../../../currentRevision"/>
                      <changes>diff --git a/docker/Dockerfile b/docker/Dockerfile
          index e5ce847..9fe9f66 100644
          --- a/docker/Dockerfile
          +++ b/docker/Dockerfile
          @@ -1,4 +1,4 @@
          -FROM jenkins:2.73.1
          -COPY plugins.txt /usr/share/jenkins/plugins.txt
          +FROM jenkins/jenkins:2.73.1
           ENV JAVA_OPTS=&quot;-Djenkins.install.runSetupWizard=false -Dhudson.model.DirectoryBrowserSupport.CSP=\&quot;\&quot;&quot;
          -RUN /usr/local/bin/plugins.sh /usr/share/jenkins/plugins.txt
          \ No newline at end of file
          +COPY plugins.txt /usr/share/jenkins/ref/plugins.txt
          +RUN /usr/local/bin/install-plugins.sh &lt; /usr/share/jenkins/ref/plugins.txt
          \ No newline at end of file
          diff --git a/docker/plugins.txt b/docker/plugins.txt
          index ddd6975..4452c81 100644
          --- a/docker/plugins.txt
          +++ b/docker/plugins.txt
          @@ -47,4 +47,3 @@
           workflow-step-api:2.10
           workflow-support:2.14
           cucumber-living-documentation:2.1
          -
          </changes>
                    </com.github.jenkins.lastchanges.model.CommitChanges>
                  </commits>
                </buildChanges>
                <config>
                  <format>LINE</format>
                  <matching>NONE</matching>
                  <matchWordsThreshold>0.25</matchWordsThreshold>
                  <matchingMaxComparisons>1000.0</matchingMaxComparisons>
                  <showFiles>true</showFiles>
                  <synchronisedScroll>true</synchronisedScroll>
                  <since>PREVIOUS_REVISION</since>
                  <specificRevision></specificRevision>
                </config>
                <projectActions>
                  <com.github.jenkins.lastchanges.LastChangesProjectAction>
                    <job class="hudson.model.FreeStyleProject" resolves-to="hudson.model.AbstractItem$Replacer">
                      <fullName>test2</fullName>
                    </job>
                  </com.github.jenkins.lastchanges.LastChangesProjectAction>
                </projectActions>
              </com.github.jenkins.lastchanges.LastChangesBuildAction>

           

           

           

          Rafael Pestano added a comment - Hi guys, I'm trying to solve this issue on last changes plugin ( JENKINS-49368 ) but I have no clues.  What should I look into build.xml? Below is a build.xml sample and here is the build action code and here is a model class used on the Build Action. If I got it right we shouldn't have 'LastChanges' as a property on LastChangesBuildAction. Any help is appreciated.     <com.github.jenkins.lastchanges.LastChangesBuildAction plugin="last-changes@2.7-SNAPSHOT"> <build class="build" reference="../../.."/> <buildChanges> <currentRevision> <commitId>08381f99f1847c56e5e469090c6adb8600f4d66e</commitId> <commitMessage>update docker container </commitMessage> <committerName>rmpestano</committerName> <committerEmail>rmpestano@gmail.com</committerEmail> <commitDate>11/03/2018 00:22:05 GMT-03:00</commitDate> </currentRevision> <previousRevision> <commitId>dd255d59a85377ea2651c4570072277cd6dd069a</commitId> <commitMessage>[maven-release-plugin] prepare for next development iteration </commitMessage> <committerName>rmpestano</committerName> <committerEmail>rmpestano@gmail.com</committerEmail> <commitDate>10/03/2018 23:21:04 GMT-03:00</commitDate> </previousRevision> <diff>diff --git a/docker/Dockerfile b/docker/Dockerfile index e5ce847..9fe9f66 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM jenkins:2.73.1 -COPY plugins.txt /usr/share/jenkins/plugins.txt +FROM jenkins/jenkins:2.73.1 ENV JAVA_OPTS=&quot;-Djenkins.install.runSetupWizard=false -Dhudson.model.DirectoryBrowserSupport.CSP=\&quot;\&quot;&quot; -RUN /usr/local/bin/plugins.sh /usr/share/jenkins/plugins.txt \ No newline at end of file +COPY plugins.txt /usr/share/jenkins/ref/plugins.txt +RUN /usr/local/bin/install-plugins.sh &lt; /usr/share/jenkins/ref/plugins.txt \ No newline at end of file diff --git a/docker/plugins.txt b/docker/plugins.txt index ddd6975..4452c81 100644 --- a/docker/plugins.txt +++ b/docker/plugins.txt @@ -47,4 +47,3 @@ workflow-step-api:2.10 workflow-support:2.14 cucumber-living-documentation:2.1 - </diff> <commits> <com.github.jenkins.lastchanges.model.CommitChanges> <commitInfo reference="../../../currentRevision"/> <changes>diff --git a/docker/Dockerfile b/docker/Dockerfile index e5ce847..9fe9f66 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM jenkins:2.73.1 -COPY plugins.txt /usr/share/jenkins/plugins.txt +FROM jenkins/jenkins:2.73.1 ENV JAVA_OPTS=&quot;-Djenkins.install.runSetupWizard=false -Dhudson.model.DirectoryBrowserSupport.CSP=\&quot;\&quot;&quot; -RUN /usr/local/bin/plugins.sh /usr/share/jenkins/plugins.txt \ No newline at end of file +COPY plugins.txt /usr/share/jenkins/ref/plugins.txt +RUN /usr/local/bin/install-plugins.sh &lt; /usr/share/jenkins/ref/plugins.txt \ No newline at end of file diff --git a/docker/plugins.txt b/docker/plugins.txt index ddd6975..4452c81 100644 --- a/docker/plugins.txt +++ b/docker/plugins.txt @@ -47,4 +47,3 @@ workflow-step-api:2.10 workflow-support:2.14 cucumber-living-documentation:2.1 - </changes> </com.github.jenkins.lastchanges.model.CommitChanges> </commits> </buildChanges> <config> <format>LINE</format> <matching>NONE</matching> <matchWordsThreshold>0.25</matchWordsThreshold> <matchingMaxComparisons>1000.0</matchingMaxComparisons> <showFiles>true</showFiles> <synchronisedScroll>true</synchronisedScroll> <since>PREVIOUS_REVISION</since> <specificRevision></specificRevision> </config> <projectActions> <com.github.jenkins.lastchanges.LastChangesProjectAction> <job class="hudson.model.FreeStyleProject" resolves-to="hudson.model.AbstractItem$Replacer"> <fullName>test2</fullName> </job> </com.github.jenkins.lastchanges.LastChangesProjectAction> </projectActions> </com.github.jenkins.lastchanges.LastChangesBuildAction>      

          Ulli Hafner added a comment - - edited

          You need to make the field build transient and fill it right after Jenkins loaded the build. Example: ResultAction

          Ulli Hafner added a comment - - edited You need to make the field build transient and fill it right after Jenkins loaded the build. Example: ResultAction

          Code changed in jenkins
          User: rmpestano
          Path:
          pom.xml
          src/main/java/com/github/jenkins/lastchanges/LastChangesBuildAction.java
          http://jenkins-ci.org/commit/last-changes-plugin/ebe11aeea5e07641f89fbb0de8ce5796a17e700a
          Log:
          refs JENKINS-45892

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: rmpestano Path: pom.xml src/main/java/com/github/jenkins/lastchanges/LastChangesBuildAction.java http://jenkins-ci.org/commit/last-changes-plugin/ebe11aeea5e07641f89fbb0de8ce5796a17e700a Log: refs JENKINS-45892

          Hi drulli, thanks for your reply. I'm still facing the same issue, any other advice?

          Here is build.xml:

          <com.github.jenkins.lastchanges.LastChangesBuildAction plugin="last-changes@2.7-SNAPSHOT">
                <buildChanges>
                  <currentRevision>
                    <commitId>08381f99f1847c56e5e469090c6adb8600f4d66e</commitId>
                    <commitMessage>update docker container
          </commitMessage>
                    <committerName>rmpestano</committerName>
                    <committerEmail>rmpestano@gmail.com</committerEmail>
                    <commitDate>11/03/2018 00:22:05 GMT-03:00</commitDate>
                  </currentRevision>
                  <previousRevision>
                    <commitId>dd255d59a85377ea2651c4570072277cd6dd069a</commitId>
                    <commitMessage>[maven-release-plugin] prepare for next development iteration
          </commitMessage>
                    <committerName>rmpestano</committerName>
                    <committerEmail>rmpestano@gmail.com</committerEmail>
                    <commitDate>10/03/2018 23:21:04 GMT-03:00</commitDate>
                  </previousRevision>
                  <diff>diff --git a/docker/Dockerfile b/docker/Dockerfile
          index e5ce847..9fe9f66 100644
          --- a/docker/Dockerfile
          +++ b/docker/Dockerfile
          @@ -1,4 +1,4 @@
          -FROM jenkins:2.73.1
          -COPY plugins.txt /usr/share/jenkins/plugins.txt
          +FROM jenkins/jenkins:2.73.1
           ENV JAVA_OPTS=&quot;-Djenkins.install.runSetupWizard=false -Dhudson.model.DirectoryBrowserSupport.CSP=\&quot;\&quot;&quot;
          -RUN /usr/local/bin/plugins.sh /usr/share/jenkins/plugins.txt
          \ No newline at end of file
          +COPY plugins.txt /usr/share/jenkins/ref/plugins.txt
          +RUN /usr/local/bin/install-plugins.sh &lt; /usr/share/jenkins/ref/plugins.txt
          \ No newline at end of file
          diff --git a/docker/plugins.txt b/docker/plugins.txt
          index ddd6975..4452c81 100644
          --- a/docker/plugins.txt
          +++ b/docker/plugins.txt
          @@ -47,4 +47,3 @@
           workflow-step-api:2.10
           workflow-support:2.14
           cucumber-living-documentation:2.1
          -
          </diff>
                  <commits>
                    <com.github.jenkins.lastchanges.model.CommitChanges>
                      <commitInfo reference="../../../currentRevision"/>
                      <changes>diff --git a/docker/Dockerfile b/docker/Dockerfile
          index e5ce847..9fe9f66 100644
          --- a/docker/Dockerfile
          +++ b/docker/Dockerfile
          @@ -1,4 +1,4 @@
          -FROM jenkins:2.73.1
          -COPY plugins.txt /usr/share/jenkins/plugins.txt
          +FROM jenkins/jenkins:2.73.1
           ENV JAVA_OPTS=&quot;-Djenkins.install.runSetupWizard=false -Dhudson.model.DirectoryBrowserSupport.CSP=\&quot;\&quot;&quot;
          -RUN /usr/local/bin/plugins.sh /usr/share/jenkins/plugins.txt
          \ No newline at end of file
          +COPY plugins.txt /usr/share/jenkins/ref/plugins.txt
          +RUN /usr/local/bin/install-plugins.sh &lt; /usr/share/jenkins/ref/plugins.txt
          \ No newline at end of file
          diff --git a/docker/plugins.txt b/docker/plugins.txt
          index ddd6975..4452c81 100644
          --- a/docker/plugins.txt
          +++ b/docker/plugins.txt
          @@ -47,4 +47,3 @@
           workflow-step-api:2.10
           workflow-support:2.14
           cucumber-living-documentation:2.1
          -
          </changes>
                    </com.github.jenkins.lastchanges.model.CommitChanges>
                  </commits>
                </buildChanges>
                <config>
                  <format>LINE</format>
                  <matching>NONE</matching>
                  <matchWordsThreshold>0.25</matchWordsThreshold>
                  <matchingMaxComparisons>1000.0</matchingMaxComparisons>
                  <showFiles>true</showFiles>
                  <synchronisedScroll>true</synchronisedScroll>
                  <since>PREVIOUS_REVISION</since>
                  <specificRevision></specificRevision>
                </config>
                <projectActions>
                  <com.github.jenkins.lastchanges.LastChangesProjectAction>
                    <job class="hudson.model.FreeStyleProject" resolves-to="hudson.model.AbstractItem$Replacer">
                      <fullName>test3</fullName>
                    </job>
                  </com.github.jenkins.lastchanges.LastChangesProjectAction>
                </projectActions>
              </com.github.jenkins.lastchanges.LastChangesBuildAction>
          

          Rafael Pestano added a comment - Hi drulli , thanks for your reply. I'm still facing the same issue, any other advice? Here is build.xml: <com.github.jenkins.lastchanges.LastChangesBuildAction plugin="last-changes@2.7-SNAPSHOT"> <buildChanges> <currentRevision> <commitId>08381f99f1847c56e5e469090c6adb8600f4d66e</commitId> <commitMessage>update docker container </commitMessage> <committerName>rmpestano</committerName> <committerEmail>rmpestano@gmail.com</committerEmail> <commitDate>11/03/2018 00:22:05 GMT-03:00</commitDate> </currentRevision> <previousRevision> <commitId>dd255d59a85377ea2651c4570072277cd6dd069a</commitId> <commitMessage>[maven-release-plugin] prepare for next development iteration </commitMessage> <committerName>rmpestano</committerName> <committerEmail>rmpestano@gmail.com</committerEmail> <commitDate>10/03/2018 23:21:04 GMT-03:00</commitDate> </previousRevision> <diff>diff --git a/docker/Dockerfile b/docker/Dockerfile index e5ce847..9fe9f66 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM jenkins:2.73.1 -COPY plugins.txt /usr/share/jenkins/plugins.txt +FROM jenkins/jenkins:2.73.1 ENV JAVA_OPTS=&quot;-Djenkins.install.runSetupWizard=false -Dhudson.model.DirectoryBrowserSupport.CSP=\&quot;\&quot;&quot; -RUN /usr/local/bin/plugins.sh /usr/share/jenkins/plugins.txt \ No newline at end of file +COPY plugins.txt /usr/share/jenkins/ref/plugins.txt +RUN /usr/local/bin/install-plugins.sh &lt; /usr/share/jenkins/ref/plugins.txt \ No newline at end of file diff --git a/docker/plugins.txt b/docker/plugins.txt index ddd6975..4452c81 100644 --- a/docker/plugins.txt +++ b/docker/plugins.txt @@ -47,4 +47,3 @@ workflow-step-api:2.10 workflow-support:2.14 cucumber-living-documentation:2.1 - </diff> <commits> <com.github.jenkins.lastchanges.model.CommitChanges> <commitInfo reference="../../../currentRevision"/> <changes>diff --git a/docker/Dockerfile b/docker/Dockerfile index e5ce847..9fe9f66 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM jenkins:2.73.1 -COPY plugins.txt /usr/share/jenkins/plugins.txt +FROM jenkins/jenkins:2.73.1 ENV JAVA_OPTS=&quot;-Djenkins.install.runSetupWizard=false -Dhudson.model.DirectoryBrowserSupport.CSP=\&quot;\&quot;&quot; -RUN /usr/local/bin/plugins.sh /usr/share/jenkins/plugins.txt \ No newline at end of file +COPY plugins.txt /usr/share/jenkins/ref/plugins.txt +RUN /usr/local/bin/install-plugins.sh &lt; /usr/share/jenkins/ref/plugins.txt \ No newline at end of file diff --git a/docker/plugins.txt b/docker/plugins.txt index ddd6975..4452c81 100644 --- a/docker/plugins.txt +++ b/docker/plugins.txt @@ -47,4 +47,3 @@ workflow-step-api:2.10 workflow-support:2.14 cucumber-living-documentation:2.1 - </changes> </com.github.jenkins.lastchanges.model.CommitChanges> </commits> </buildChanges> <config> <format>LINE</format> <matching>NONE</matching> <matchWordsThreshold>0.25</matchWordsThreshold> <matchingMaxComparisons>1000.0</matchingMaxComparisons> <showFiles>true</showFiles> <synchronisedScroll>true</synchronisedScroll> <since>PREVIOUS_REVISION</since> <specificRevision></specificRevision> </config> <projectActions> <com.github.jenkins.lastchanges.LastChangesProjectAction> <job class="hudson.model.FreeStyleProject" resolves-to="hudson.model.AbstractItem$Replacer"> <fullName>test3</fullName> </job> </com.github.jenkins.lastchanges.LastChangesProjectAction> </projectActions> </com.github.jenkins.lastchanges.LastChangesBuildAction>

          Oleg Nenashev added a comment -

          rmpestano responded in JENKINS-49368

          Oleg Nenashev added a comment - rmpestano responded in JENKINS-49368

          Code changed in jenkins
          User: rmpestano
          Path:
          src/main/java/com/github/jenkins/lastchanges/LastChangesProjectAction.java
          http://jenkins-ci.org/commit/last-changes-plugin/0cb6083a31b207099c5400e4f4a93bee8510f3a5
          Log:
          refs JENKINS-45892

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: rmpestano Path: src/main/java/com/github/jenkins/lastchanges/LastChangesProjectAction.java http://jenkins-ci.org/commit/last-changes-plugin/0cb6083a31b207099c5400e4f4a93bee8510f3a5 Log: refs JENKINS-45892

          Code changed in jenkins
          User: Yeh Fang
          Path:
          src/main/java/hudson/plugins/sauce_ondemand/BrowserAxis.java
          src/main/java/hudson/plugins/sauce_ondemand/SauceOnDemandProjectAction.java
          http://jenkins-ci.org/commit/sauce-ondemand-plugin/970a4049c927cd22618a2d0d82ff20d13dc25043
          Log:
          fix for JENKINS-45892

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Yeh Fang Path: src/main/java/hudson/plugins/sauce_ondemand/BrowserAxis.java src/main/java/hudson/plugins/sauce_ondemand/SauceOnDemandProjectAction.java http://jenkins-ci.org/commit/sauce-ondemand-plugin/970a4049c927cd22618a2d0d82ff20d13dc25043 Log: fix for JENKINS-45892

            jglick Jesse Glick
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            23 Start watching this issue

              Created:
              Updated:
              Resolved: