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

Jenkinsfile Changelist number doesn't get updated when using pipeline Script from SCM.

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • p4-plugin
    • None
    • Jenkins 2.22

      Jekinsfile Changelist number doesn't get updated when using pipeline Script from SCM.

      Perforce Software Polling Log

      Started on 21.09.2016 08:47:00
      P4: Polling on: master with:file-master-8.40_JenkinsFile
      ... p4 client -o file-master-8.40_JenkinsFile +
      ... p4 info +

      P4 Task: establishing connection.
      ... server: wessslx4:1666
      ... node: WESSSSW
      P4: Polling with range: 50845,now
      ... p4 changes -m100 //file-master-8.40_JenkinsFile/...@50845,now +
      P4: Polling on: master with:master-8.40_JenkinsFile
      ... p4 client -o master-8.40_JenkinsFile +
      ... p4 info +

      P4 Task: establishing connection.
      ... server: wessslx4:1666
      ... node: WESSSSW
      P4: Polling with range: 50845,now
      ... p4 changes -m100 //master-8.40_JenkinsFile/...@50845,now +
      ... p4 change -o 50871 +
      ... p4 describe -s 50871 +
      ... found change: 50871
      next change: 50871
      Done. Took 0,29 Sekunden
      Changes found

          [JENKINS-38401] Jenkinsfile Changelist number doesn't get updated when using pipeline Script from SCM.

          Jason Davis added a comment -

          Also running into this - the changes list for the build is never reset to only include the changes in that build, so it continually grows - making the list impractical for users to follow. Ideally - show only the Perforce changes in the build, and if there are no changes in the build, show "No Changes" rather than using the successful changes list from the previous build.

          Another problem side effect, when using the JIRA issue updater plugin to update JIRA tickets, the plugin is repeatedly marking JIRA issues, it looks like because the changes list is not being reset per build. So every build - even though there were no Perforce changes in that build - is marking the same JIRA issues in that list. I've had to avoid using my pipeline job, to avoid frustrating and confusing users.

          Jason Davis added a comment - Also running into this - the changes list for the build is never reset to only include the changes in that build, so it continually grows - making the list impractical for users to follow. Ideally - show only the Perforce changes in the build, and if there are no changes in the build, show "No Changes" rather than using the successful changes list from the previous build. Another problem side effect, when using the JIRA issue updater plugin to update JIRA tickets, the plugin is repeatedly marking JIRA issues, it looks like because the changes list is not being reset per build. So every build - even though there were no Perforce changes in that build - is marking the same JIRA issues in that list. I've had to avoid using my pipeline job, to avoid frustrating and confusing users.

          Code changed in jenkins
          User: Paul Allen
          Path:
          src/main/java/org/jenkinsci/plugins/p4/PerforceScm.java
          src/main/java/org/jenkinsci/plugins/p4/build/P4EnvironmentContributor.java
          src/main/java/org/jenkinsci/plugins/p4/credentials/P4BaseCredentials.java
          src/main/java/org/jenkinsci/plugins/p4/tagging/TagAction.java
          src/main/java/org/jenkinsci/plugins/p4/tasks/AbstractTask.java
          src/test/java/org/jenkinsci/plugins/p4/client/JenkinsfileTest.java
          http://jenkins-ci.org/commit/p4-plugin/ad88e9695891a28332f5e1282698aff18a18f9b7
          Log:
          Multi client support in Pipeline.

          If two or more `p4sync` operations are called in one Pipeline script,
          they MUST have different client names. During a build, multiple
          entries are added to the build history; on subsequent builds they are
          used in the three following situations:

          • Polling: largest change number across all the checkouts is used.
          • Change Summary: last change with the same client name is used.
          • Environment: last change recorded (regardless of client).

          Added two test cases to cover basic multi sync build/poll situations.

          JENKINS-38401
          JENKINS-37462
          JENKINS-39652

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Paul Allen Path: src/main/java/org/jenkinsci/plugins/p4/PerforceScm.java src/main/java/org/jenkinsci/plugins/p4/build/P4EnvironmentContributor.java src/main/java/org/jenkinsci/plugins/p4/credentials/P4BaseCredentials.java src/main/java/org/jenkinsci/plugins/p4/tagging/TagAction.java src/main/java/org/jenkinsci/plugins/p4/tasks/AbstractTask.java src/test/java/org/jenkinsci/plugins/p4/client/JenkinsfileTest.java http://jenkins-ci.org/commit/p4-plugin/ad88e9695891a28332f5e1282698aff18a18f9b7 Log: Multi client support in Pipeline. If two or more `p4sync` operations are called in one Pipeline script, they MUST have different client names. During a build, multiple entries are added to the build history; on subsequent builds they are used in the three following situations: Polling: largest change number across all the checkouts is used. Change Summary: last change with the same client name is used. Environment: last change recorded (regardless of client). Added two test cases to cover basic multi sync build/poll situations. JENKINS-38401 JENKINS-37462 JENKINS-39652

          Code changed in jenkins
          User: Paul Allen
          Path:
          src/main/java/org/jenkinsci/plugins/p4/PerforceScm.java
          src/main/java/org/jenkinsci/plugins/p4/tagging/TagAction.java
          src/main/java/org/jenkinsci/plugins/p4/tasks/AbstractTask.java
          src/test/java/org/jenkinsci/plugins/p4/client/JenkinsfileTest.java
          http://jenkins-ci.org/commit/p4-plugin/fb5235393d8b2a1e44271429876b4910defe2463
          Log:
          Polling fix for Multi client support in Pipeline.

          Jenkins polls for each SCM checkout, so must poll each workplace and
          therefore need to lookup last build information for each sync.
          Polling now uses same lookup as Change Summary.

          Added extra test cases multi sync poll and poll again.

          JENKINS-38401
          JENKINS-37462
          JENKINS-39652

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Paul Allen Path: src/main/java/org/jenkinsci/plugins/p4/PerforceScm.java src/main/java/org/jenkinsci/plugins/p4/tagging/TagAction.java src/main/java/org/jenkinsci/plugins/p4/tasks/AbstractTask.java src/test/java/org/jenkinsci/plugins/p4/client/JenkinsfileTest.java http://jenkins-ci.org/commit/p4-plugin/fb5235393d8b2a1e44271429876b4910defe2463 Log: Polling fix for Multi client support in Pipeline. Jenkins polls for each SCM checkout, so must poll each workplace and therefore need to lookup last build information for each sync. Polling now uses same lookup as Change Summary. Added extra test cases multi sync poll and poll again. JENKINS-38401 JENKINS-37462 JENKINS-39652

          Paul Allen added a comment -

          Ready for release

          Paul Allen added a comment - Ready for release

          Paul Allen added a comment -

          Released in 1.4.11

          Paul Allen added a comment - Released in 1.4.11

            p4karl Karl Wirth
            pvia p v
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: