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

ItemListener event not fired when user updates projects configuration using REST API

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • core
    • jenkins LTS ver 1.565.3
      Ubuntu precise

      The jenkins ItemListener does not fire events when user updates project configurations using the REST API. Events do get fired when user makes changes from the UI though.

      Steps to repro:
      I am using the python-jenkins library (https://pypi.python.org/pypi/python-jenkins) to update my jobs which does all operations using the jenkins rest API.

      1. Create a project
      2. Update the project configuration using the REST api. I tried changing the 'concurrentBuild' and 'assignNode' configurations.
      3. check the job configuration in the UI to make sure it has been updated.

      Note - The job configuration does get updated with the change but no events called from ItemListener. I would expect the ItemListener.onUpdated() event to fire.

      This is the XML that was used for updating the job:

      <?xml version="1.0" encoding="utf-8"?>
      <project>
      <actions/>
      <description></description>
      <keepDependencies>false</keepDependencies>
      <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
      <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
      <concurrentBuild>false</concurrentBuild>
      <assignedNode>centos</assignedNode>
      <canRoam>false</canRoam>
      <properties/>
      <scm class="hudson.scm.NullSCM"/>
      <builders>
      <hudson.tasks.Shell>
      <command>echo my test</command>
      </hudson.tasks.Shell>
      </builders>
      <publishers/>
      <buildWrappers/>
      </project>

            Unassigned Unassigned
            zaro Khai Do
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: