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

Changes not shown from pipeline SCM Checkout when also using Jenkinsfile Checkout

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: p4-plugin, pipeline
    • Labels:
      None
    • Environment:
      Jenkins 2.235.1, P4 Plugin 1.10.14, Linux
    • Similar Issues:

      Description

      I am having an issue where P4 changes are not reported.

      I have a different clients for the jenkinsfile checkout step, and for the SCM checkout within the pipeline (below).  I only see changes reported (in the "Changes" page) from the jenkinsfile checkout, and not the checkout within the pipeline.  This occurs even if I use "lightweight checkout" (in which case I see no changes at all).

      If I don't use a jenkinsfile checkout, I can see the proper changes. *UPDATE*  It seems this isn't working either.  It only worked for the very first run, and now it doesn't seem to log changes...

      I have tried forcing the syncID, as well but nothing has worked.

       

      Pipeline Checkout:

      checkout scm: perforce(
      credential: 'p4_ticket',
      populate: syncOnly(
      force: false,
      have: true,
      modtime: false,
      parallel: [enable: true, minbytes: '1024', minfiles: '1', threads: '4'],
      pin: "",
      quiet: false,
      revert: true),
      workspace: staticSpec(
      charset: 'none',
      name: "jenkins_${JOB_BASE_NAME}_${BUILD_NUMBER}",
      pinHost: false),
      ),
      changelog: true,
      poll: true

       

      The Workspace Name format of the Jenkinsfile checkout is:

      jenkins-${JOB_NAME}-scripts

       

        Attachments

          Activity

          Hide
          atwatsoniii Al Watson added a comment -

          I have found the issue.  It seems that the name should be in single quotes.  If I do that, everything works.    I can see changes and the message:  "
          Found last change NNNNNN on syncID clone:<BUIDLNAME>_BUILD_NUMBER

          Show
          atwatsoniii Al Watson added a comment - I have found the issue.  It seems that the name should be in single quotes.  If I do that, everything works.    I can see changes and the message:  " Found last change NNNNNN on syncID clone:<BUIDLNAME>_BUILD_NUMBER
          Hide
          p4paul Paul Allen added a comment -

          Thank you for following up with your solution.

          The Groovy interpreter expands the double quotes early, so the SyncID (used to track changes does not match).  The pipeline snippet generator should use single quotes to avoid this situation.

          I'll close the issue as resolved.

          Kind regards,

          Paul 

          Show
          p4paul Paul Allen added a comment - Thank you for following up with your solution. The Groovy interpreter expands the double quotes early, so the SyncID (used to track changes does not match).  The pipeline snippet generator should use single quotes to avoid this situation. I'll close the issue as resolved. Kind regards, Paul 

            People

            • Assignee:
              p4paul Paul Allen
              Reporter:
              atwatsoniii Al Watson
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: