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

22 views
Skip to first unread message

daniel.hoerner@vyaire.com (JIRA)

unread,
Mar 27, 2019, 6:13:01 AM3/27/19
to jenkinsc...@googlegroups.com
Daniel Hoerner created an issue
 
Jenkins / Bug JENKINS-56775
Parameters are not replaced in the "Stream Codeline" field
Issue Type: Bug Bug
Assignee: Unassigned
Attachments: 2019-03-27 11_08_09-Sentry CIS Authentication Service Patch30036 Config [Jenkins].png, 2019-03-27 11_08_33-Sentry CIS Authentication Service Patch30036 Config [Jenkins]2.png
Components: p4-plugin
Created: 2019-03-27 10:12
Environment: Jenkins ver. 2.169
Priority: Major Major
Reporter: Daniel Hoerner

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
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

kwirth@perforce.com (JIRA)

unread,
Mar 27, 2019, 7:09:01 AM3/27/19
to jenkinsc...@googlegroups.com
Karl Wirth commented on Bug JENKINS-56775
 
Re: Parameters are not replaced in the "Stream Codeline" field

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

kwirth@perforce.com (JIRA)

unread,
Mar 27, 2019, 7:09:02 AM3/27/19
to jenkinsc...@googlegroups.com

kwirth@perforce.com (JIRA)

unread,
Mar 27, 2019, 7:10:02 AM3/27/19
to jenkinsc...@googlegroups.com

kwirth@perforce.com (JIRA)

unread,
Mar 27, 2019, 7:35:02 AM3/27/19
to jenkinsc...@googlegroups.com
Karl Wirth assigned an issue to Unassigned
Change By: Karl Wirth
Assignee: Karl Wirth

kwirth@perforce.com (JIRA)

unread,
Mar 27, 2019, 7:35:02 AM3/27/19
to jenkinsc...@googlegroups.com

Hi Daniel Hoerner - 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

kwirth@perforce.com (JIRA)

unread,
Mar 27, 2019, 7:35:02 AM3/27/19
to jenkinsc...@googlegroups.com

kwirth@perforce.com (JIRA)

unread,
Mar 27, 2019, 7:35:03 AM3/27/19
to jenkinsc...@googlegroups.com

kwirth@perforce.com (JIRA)

unread,
May 20, 2019, 4:58:02 AM5/20/19
to jenkinsc...@googlegroups.com
 
Re: Parameters are not replaced in the "Stream Codeline" field

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

pallen@perforce.com (JIRA)

unread,
May 24, 2019, 11:53:03 AM5/24/19
to jenkinsc...@googlegroups.com

pallen@perforce.com (JIRA)

unread,
May 24, 2019, 11:53:03 AM5/24/19
to jenkinsc...@googlegroups.com
Paul Allen started work on Bug JENKINS-56775
 
Change By: Paul Allen
Status: Open In Progress

pallen@perforce.com (JIRA)

unread,
May 24, 2019, 11:57:02 AM5/24/19
to jenkinsc...@googlegroups.com

pallen@perforce.com (JIRA)

unread,
May 24, 2019, 11:57:03 AM5/24/19
to jenkinsc...@googlegroups.com

pallen@perforce.com (JIRA)

unread,
May 29, 2019, 10:20:03 AM5/29/19
to jenkinsc...@googlegroups.com
 

Ready for release.

Change By: Paul Allen
Status: In Review Fixed but Unreleased
Resolution: Fixed

pallen@perforce.com (JIRA)

unread,
May 29, 2019, 10:20:03 AM5/29/19
to jenkinsc...@googlegroups.com
 

Release in 1.10.0

Change By: Paul Allen
Status: Fixed but Unreleased Closed

daniel.hoerner@vyaire.com (JIRA)

unread,
Jun 3, 2019, 5:22:03 AM6/3/19
to jenkinsc...@googlegroups.com
Daniel Hoerner commented on Bug JENKINS-56775
 
Re: Parameters are not replaced in the "Stream Codeline" field

Thank you, this feature works now!

There is only a small issue now: In the jenkins log, the variables are not replaces. Example: Obtained Jenkinsfile from p4-Perforce-${P4_DEPOT}/${P4_STREAM}

 

Maybe this can be fixed.

kwirth@perforce.com (JIRA)

unread,
Jun 6, 2019, 6:27:02 AM6/6/19
to jenkinsc...@googlegroups.com

Hi Daniel Hoerner - Thanks for letting us know.  I'll test it here.

kwirth@perforce.com (JIRA)

unread,
Jun 6, 2019, 7:01:02 AM6/6/19
to jenkinsc...@googlegroups.com

Hi Daniel Hoerner - Can you provide a bit of the log where you see the expanded name. On my test system I only see in on the following line:

Obtained Jenkinsfile from p4-JenkinsMasterAdminUser-//streams/${MYSTREAM}

daniel.hoerner@vyaire.com (JIRA)

unread,
Jun 6, 2019, 7:40:02 AM6/6/19
to jenkinsc...@googlegroups.com

Karl Wirth Yes, here it is, this is the very beginning of the console log:

 

Started by user ******
Obtained Jenkinsfile from p4-Perforce-${P4_DEPOT}/${P4_STREAM}
Running in Durability level: MAX_SURVIVABILITY
Loading library BMS-Libraries@2999/10/11:08:04:40

 

Expected:

Started by user ******
Obtained Jenkinsfile from p4-Perforce-MyReplacedDepotName/MyReplacedStream
Running in Durability level: MAX_SURVIVABILITY
Loading library BMS-Libraries@2999/10/11:08:04:40

In your example, I expect to see the replaced value of ${MYSTREAM}

 

kwirth@perforce.com (JIRA)

unread,
Jun 7, 2019, 4:37:02 AM6/7/19
to jenkinsc...@googlegroups.com

Hi Daniel Hoerner - Thanks for the confirmation. I've raised a new job for this and added Paul's and my comments - JENKINS-57906.

Reply all
Reply to author
Forward
0 new messages