[JIRA] (JENKINS-51432) Add multibranch support for task streams

2 views
Skip to first unread message

dthomash@live.com (JIRA)

unread,
May 18, 2018, 4:37:02 PM5/18/18
to jenkinsc...@googlegroups.com
Dylan H created an issue
 
Jenkins / Bug JENKINS-51432
Add multibranch support for task streams
Issue Type: Bug Bug
Assignee: Unassigned
Components: p4-plugin
Created: 2018-05-18 20:36
Labels: p4-plugin multibranch
Priority: Minor Minor
Reporter: Dylan H

Currently when using the 'Helix Streams' option in a multibranch build the p4-plugin will run the following command to check for the existence of a Jenkinsfile:

p4 files -e <path to stream><path to Jenkinsfile>

However, when this command is run against a task stream where the Jenkinsfile has not been changed the command states 'no such file(s)'. The p4-plugin will then skip creating a build for the task branch.

The expected behavior is that if the Jenkinsfile has not been changed in the task stream, but the Jenkinsfile has been mapped from the parent stream that the task stream would not be skipped.

 

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

wbasu@perforce.com (JIRA)

unread,
Jun 21, 2018, 9:49:02 AM6/21/18
to jenkinsc...@googlegroups.com
W Basu updated an issue
Change By: W Basu
Labels: multibranch p4-plugin P4_SUPPORT

daniel@resolutiongames.com (JIRA)

unread,
Jul 18, 2018, 4:08:01 AM7/18/18
to jenkinsc...@googlegroups.com
Daniel Hagström commented on Bug JENKINS-51432
 
Re: Add multibranch support for task streams

In my head it makes more sense if the p4-plugin would instead of using depot paths for Jenkinsfile(s), it could use the resulting client view to detect if there's a Jenkinsfile there.
This would allow task streams to work, as well as generalized Jenkinsfiles imported from other paths etc.

I'm probably not saying checking if `p4 sync -n -f <client root>/Jenkinsfile` != "Jenkinsfile - no such fil(s)." is the way forward, but that type of functionality seems to be more sensible than depot paths to me.

This message was sent by Atlassian JIRA (v7.10.1#710002-sha1:6efc396)

kwirth@perforce.com (JIRA)

unread,
Jul 19, 2018, 5:17:02 AM7/19/18
to jenkinsc...@googlegroups.com

Reproduced:

No changes detected: task1 (still at 1478)
... p4 files -e //streams/task3/Jenkinsfile +      ‘Jenkinsfile’ not found

 This causes the branch to disappear from the multibranch.

 

The problem is context. Task streams clients are linked to the stream itself. A 'classic' client that can look at any branch will not find the file and a client attached to any other stream will not find the file. In p4-jenkins case it does not use a client but that is not the cause.

 

2018/07/19 09:01:08 pid 13694 jenkins@_____CLIENT_UNSET_____ 1.2.3.4 [jenkins.p4-plugin/1.8.10/Linux] 'user-files -e //streams/task3/Jenkinsfile'

This is a known limitation in the way streams are implemented in P4D. However it's also partly by design because task streams were intended to be private for the individual user and were never intended to be used in build systems.

 

Two possible ways forward:

(1) A change to the P4D server (unlikely).

(2) Rewrite of multibranch to create individual clients for every stream identified by 'p4 streams'.

 

 

kwirth@perforce.com (JIRA)

unread,
Jul 19, 2018, 5:19:02 AM7/19/18
to jenkinsc...@googlegroups.com
Karl Wirth updated an issue
 
Change By: Karl Wirth
Labels: P4_SUPPORT P4_VERIFY

wbasu@perforce.com (JIRA)

unread,
Jul 26, 2018, 10:11:01 AM7/26/18
to jenkinsc...@googlegroups.com
W Basu updated an issue
Change By: W Basu
Attachment: image.png

wbasu@perforce.com (JIRA)

unread,
Jul 26, 2018, 10:16:01 AM7/26/18
to jenkinsc...@googlegroups.com
W Basu updated Bug JENKINS-51432
 

Hi Daniel Hagström, the task streams, as it designed now, will not support this use case on Jenkins, so we are going to punt it here. However, Karl Wirth, please raise this with P4D team.

Change By: W Basu
Status: Open Fixed but Unreleased
Assignee: W Basu
Resolution: Won't Fix

pallen@perforce.com (JIRA)

unread,
Jan 17, 2019, 10:10:03 AM1/17/19
to jenkinsc...@googlegroups.com
Paul Allen closed an issue as Won't Fix
Change By: Paul Allen
Status: Reopened Closed
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

pallen@perforce.com (JIRA)

unread,
Jan 17, 2019, 10:10:03 AM1/17/19
to jenkinsc...@googlegroups.com
Change By: Paul Allen
Status: Fixed but Unreleased Reopened

j.f.brown@sbcglobal.net (JIRA)

unread,
Nov 5, 2019, 1:12:03 PM11/5/19
to jenkinsc...@googlegroups.com
Joel Brown commented on Bug JENKINS-51432
 
Re: Add multibranch support for task streams

I don't see the workaround mentioned here, so:  submit a new revision of the jenkinsfile to the task stream (no changes needed). 

This will "promote" the revision to public storage from the task's stream private storage.  Your task stream should then be detected.

This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages