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

Parameters are not replaced in the "Stream Codeline" field

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • p4-plugin
    • Jenkins ver. 2.169

      I can not use variables in Stream Codeline for Pipeline projects. The variable is not replaced with it's correct value.

       

      hudson.AbortException: Error in client specification.
      Error detected at line 18.
      Stream '//User/' is not the correct format of '//depotname/string'	at org.jenkinsci.plugins.p4.client.ClientHelper.clientLogin(ClientHelper.java:167)
      	at org.jenkinsci.plugins.p4.client.TempClientHelper.<init>(TempClientHelper.java:40)
      	at org.jenkinsci.plugins.p4.scm.P4SCMFileSystem.<init>(P4SCMFileSystem.java:26)
      	at org.jenkinsci.plugins.p4.scm.P4SCMFileSystem$BuilderImpl.build(P4SCMFileSystem.java:77)
      Caused: java.io.IOException
      	at org.jenkinsci.plugins.p4.scm.P4SCMFileSystem$BuilderImpl.build(P4SCMFileSystem.java:79)
      	at jenkins.scm.api.SCMFileSystem.of(SCMFileSystem.java:198)
      	at jenkins.scm.api.SCMFileSystem.of(SCMFileSystem.java:174)
      	at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:108)
      	at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:67)
      	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:293)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:429)
      Finished: FAILURE
      

          [JENKINS-56775] Parameters are not replaced in the "Stream Codeline" field

          Daniel Hoerner created issue -

          Karl Wirth added a comment -

          Hi dhoerner - Thanks for highlighting this. I'll investigate and get back to you.

          Karl Wirth added a comment - Hi dhoerner - Thanks for highlighting this. I'll investigate and get back to you.
          Karl Wirth made changes -
          Assignee New: Karl Wirth [ p4karl ]
          Karl Wirth made changes -
          Labels New: P4_SUPPORT

          Karl Wirth added a comment -

          Hi dhoerner - Thanks again. I was easily able to reproduce this so will pass to the developers.

           

          A couple of notes (that you may already know)

          • Parameterized builds probably will not work correctly with polling. We rely on known workspace specs to work out what needs to be built.
          • Please include your parameter in the workspace name. For example jenkins-${NODE_NAME}${JOB_NAME}${EXECUTOR_NUMBER}-${PatchNumber}. Again this will help with changelist calculation for the build and the problems of moving workspaces between streams by an automated system.

           

          Reproduction steps:

          1. Create a pipeline job.
          2. Choose 'This project is parameterized'.
          3. Create a 'String' parameter with name 'PatchNumber' and a default value of a known stream (for example 'main' for '//streams/main').
          4. Under 'Pipeline' choose 'Pipeline script from SCM'.
          5. Under Workspace behavior 'Streams'.
          6. Set 'Stream Codeline' to '//streams/${PatchNumber}.
          7. Save.
          8. Choose 'Build with Parameters'.
          9. Error above seen:
          Started by user unknown or anonymous
          hudson.AbortException: Error in client specification.
          Error detected at line 18.
          Stream '//streams/' must begin with '//'.	at org.jenkinsci.plugins.p4.client.ClientHelper.clientLogin(ClientHelper.java:167)
          	at org.jenkinsci.plugins.p4.client.TempClientHelper.<init>(TempClientHelper.java:40)
          	at org.jenkinsci.plugins.p4.scm.P4SCMFileSystem.<init>(P4SCMFileSystem.java:26)
          	at org.jenkinsci.plugins.p4.scm.P4SCMFileSystem$BuilderImpl.build(P4SCMFileSystem.java:77)
          Caused: java.io.IOException
          	at org.jenkinsci.plugins.p4.scm.P4SCMFileSystem$BuilderImpl.build(P4SCMFileSystem.java:79)
          	at jenkins.scm.api.SCMFileSystem.of(SCMFileSystem.java:198)
          	at jenkins.scm.api.SCMFileSystem.of(SCMFileSystem.java:174)
          	at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:108)
          	at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:67)
          	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:303)
          	at hudson.model.ResourceController.execute(ResourceController.java:97)
          	at hudson.model.Executor.run(Executor.java:429)
          Finished: FAILURE
          

          Karl Wirth added a comment - Hi dhoerner - Thanks again. I was easily able to reproduce this so will pass to the developers.   A couple of notes (that you may already know) Parameterized builds probably will not work correctly with polling. We rely on known workspace specs to work out what needs to be built. Please include your parameter in the workspace name. For example jenkins-${NODE_NAME} ${JOB_NAME} ${EXECUTOR_NUMBER}-${PatchNumber}. Again this will help with changelist calculation for the build and the problems of moving workspaces between streams by an automated system.   Reproduction steps: Create a pipeline job. Choose 'This project is parameterized'. Create a 'String' parameter with name 'PatchNumber' and a default value of a known stream (for example 'main' for '//streams/main'). Under 'Pipeline' choose 'Pipeline script from SCM'. Under Workspace behavior 'Streams'. Set 'Stream Codeline' to '//streams/${PatchNumber}. Save. Choose 'Build with Parameters'. Error above seen: Started by user unknown or anonymous hudson.AbortException: Error in client specification. Error detected at line 18. Stream ' //streams/' must begin with '//' . at org.jenkinsci.plugins.p4.client.ClientHelper.clientLogin(ClientHelper.java:167) at org.jenkinsci.plugins.p4.client.TempClientHelper.<init>(TempClientHelper.java:40) at org.jenkinsci.plugins.p4.scm.P4SCMFileSystem.<init>(P4SCMFileSystem.java:26) at org.jenkinsci.plugins.p4.scm.P4SCMFileSystem$BuilderImpl.build(P4SCMFileSystem.java:77) Caused: java.io.IOException at org.jenkinsci.plugins.p4.scm.P4SCMFileSystem$BuilderImpl.build(P4SCMFileSystem.java:79) at jenkins.scm.api.SCMFileSystem.of(SCMFileSystem.java:198) at jenkins.scm.api.SCMFileSystem.of(SCMFileSystem.java:174) at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:108) at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:67) at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:303) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429) Finished: FAILURE
          Karl Wirth made changes -
          Labels Original: P4_SUPPORT New: P4_B
          Karl Wirth made changes -
          Assignee Original: Karl Wirth [ p4karl ]
          Karl Wirth made changes -
          Labels Original: P4_B New: P4_B P4_VERIFY

          Karl Wirth added a comment -

          Note that dhoerner has chased this. Please review in the next prioritization meeting.

          Karl Wirth added a comment - Note that dhoerner has chased this. Please review in the next prioritization meeting.
          Paul Allen made changes -
          Assignee New: Paul Allen [ p4paul ]

            p4paul Paul Allen
            dhoerner Daniel Hoerner
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: