Hello
It is impossible to add streams with exact names to multibranch pipeline.
Steps to reproduce
Perforce has six streams:
- //k02/foo
- //k02/foo-01
- //k02/foo-02
- //k02/bar
- //k02/bar-01
- //k02/bar-02
Task: create multibranch pipeline for //k02/foo and //k02/bar streams only.
If we set "Include streams" value in Branch Sources to:
//k02/foo //k02/bar
P4Plugin will add all six streams to created job.
Scan Multibranch Pipeline Log
p4 streams //k02/foo* //k02/bar*
Cause
P4Plugin adds * to the end of each stream's name if it is not ended by ... or *.
ConnectionHelper.java:
public List<IStreamSummary> getStreams(List<String> paths) throws Exception { ListIterator<String> list = paths.listIterator(); while (list.hasNext()) { String i = list.next(); if (!i.contains("...") && !i.contains("*")) { list.set(i + "*"); } }
PR
Please don't add * to the end of stream paths automatically.
It will give the possibility to add only specified streams.
Users can add * to stream names manually or use supported //depot/stream/... syntax.
I have created a pull request with a possible fix of this problem:
https://github.com/jenkinsci/p4-plugin/pull/93
Please fix this bug.
Thank you
[JENKINS-56290] Impossible to Add Streams with Exact Names to Multibranch Pipeline
Description |
Original:
Hello It is impossible to add streams with exact names to multibranch pipeline. Example: Perforce has six streams: * //k02/foo * //k02/foo-01 * //k02/foo-02 * //k02/bar * //k02/bar-01 * //k02/bar-02 Task: create multibranch pipeline for //k02/foo and //k02/bar streams only. If we set "Include streams" value in Branch Sources to: {code:java} //k02/foo //k02/bar {code} P4Plugin will add all six streams to created job. *Scan Multibranch Pipeline Log* {code:java} p4 streams //k02/foo* //k02/bar* {code} *Cause:* P4Plugin adds * to the end of each stream's name if it is not ended by ... or *. ConnectionHelper.java: {code:java} public List<IStreamSummary> getStreams(List<String> paths) throws Exception { ListIterator<String> list = paths.listIterator(); while (list.hasNext()) { String i = list.next(); if (!i.contains("...") && !i.contains("*")) { list.set(i + "*"); } } {code} Please don't add * to the end of stream paths automatically. It will give the possibility to add only specified streams. Users can add * to stream names manually or use supported //depot/stream/... syntax. Thank you |
New:
Hello It is impossible to add streams with exact names to multibranch pipeline. Example: Perforce has six streams: * //k02/foo * //k02/foo-01 * //k02/foo-02 * //k02/bar * //k02/bar-01 * //k02/bar-02 Task: create multibranch pipeline for //k02/foo and //k02/bar streams only. If we set "Include streams" value in Branch Sources to: {code:java} //k02/foo //k02/bar {code} P4Plugin will add all six streams to created job. *Scan Multibranch Pipeline Log* {code:java} p4 streams //k02/foo* //k02/bar* {code} *Cause:* P4Plugin adds * to the end of each stream's name if it is not ended by ... or *. *ConnectionHelper.java:* {code:java} public List<IStreamSummary> getStreams(List<String> paths) throws Exception { ListIterator<String> list = paths.listIterator(); while (list.hasNext()) { String i = list.next(); if (!i.contains("...") && !i.contains("*")) { list.set(i + "*"); } } {code} Please don't add * to the end of stream paths automatically. It will give the possibility to add only specified streams. Users can add * to stream names manually or use supported //depot/stream/... syntax. Thank you |
Labels | New: P4_B |
Description |
Original:
Hello It is impossible to add streams with exact names to multibranch pipeline. Example: Perforce has six streams: * //k02/foo * //k02/foo-01 * //k02/foo-02 * //k02/bar * //k02/bar-01 * //k02/bar-02 Task: create multibranch pipeline for //k02/foo and //k02/bar streams only. If we set "Include streams" value in Branch Sources to: {code:java} //k02/foo //k02/bar {code} P4Plugin will add all six streams to created job. *Scan Multibranch Pipeline Log* {code:java} p4 streams //k02/foo* //k02/bar* {code} *Cause:* P4Plugin adds * to the end of each stream's name if it is not ended by ... or *. *ConnectionHelper.java:* {code:java} public List<IStreamSummary> getStreams(List<String> paths) throws Exception { ListIterator<String> list = paths.listIterator(); while (list.hasNext()) { String i = list.next(); if (!i.contains("...") && !i.contains("*")) { list.set(i + "*"); } } {code} Please don't add * to the end of stream paths automatically. It will give the possibility to add only specified streams. Users can add * to stream names manually or use supported //depot/stream/... syntax. Thank you |
New:
Hello It is impossible to add streams with exact names to multibranch pipeline. h2. Steps to reproduce Perforce has six streams: * //k02/foo * //k02/foo-01 * //k02/foo-02 * //k02/bar * //k02/bar-01 * //k02/bar-02 Task: create multibranch pipeline for //k02/foo and //k02/bar streams only. If we set "Include streams" value in Branch Sources to: {code:java} //k02/foo //k02/bar {code} P4Plugin will add all six streams to created job. *Scan Multibranch Pipeline Log* {code:java} p4 streams //k02/foo* //k02/bar* {code} h2. *Cause* P4Plugin adds * to the end of each stream's name if it is not ended by ... or *. *ConnectionHelper.java:* {code:java} public List<IStreamSummary> getStreams(List<String> paths) throws Exception { ListIterator<String> list = paths.listIterator(); while (list.hasNext()) { String i = list.next(); if (!i.contains("...") && !i.contains("*")) { list.set(i + "*"); } } {code} Please don't add * to the end of stream paths automatically. It will give the possibility to add only specified streams. Users can add * to stream names manually or use supported //depot/stream/... syntax. h2. PR Thank you |
Description |
Original:
Hello It is impossible to add streams with exact names to multibranch pipeline. h2. Steps to reproduce Perforce has six streams: * //k02/foo * //k02/foo-01 * //k02/foo-02 * //k02/bar * //k02/bar-01 * //k02/bar-02 Task: create multibranch pipeline for //k02/foo and //k02/bar streams only. If we set "Include streams" value in Branch Sources to: {code:java} //k02/foo //k02/bar {code} P4Plugin will add all six streams to created job. *Scan Multibranch Pipeline Log* {code:java} p4 streams //k02/foo* //k02/bar* {code} h2. *Cause* P4Plugin adds * to the end of each stream's name if it is not ended by ... or *. *ConnectionHelper.java:* {code:java} public List<IStreamSummary> getStreams(List<String> paths) throws Exception { ListIterator<String> list = paths.listIterator(); while (list.hasNext()) { String i = list.next(); if (!i.contains("...") && !i.contains("*")) { list.set(i + "*"); } } {code} Please don't add * to the end of stream paths automatically. It will give the possibility to add only specified streams. Users can add * to stream names manually or use supported //depot/stream/... syntax. h2. PR Thank you |
New:
Hello It is impossible to add streams with exact names to multibranch pipeline. h2. Steps to reproduce Perforce has six streams: * //k02/foo * //k02/foo-01 * //k02/foo-02 * //k02/bar * //k02/bar-01 * //k02/bar-02 Task: create multibranch pipeline for //k02/foo and //k02/bar streams only. If we set "Include streams" value in Branch Sources to: {code:java} //k02/foo //k02/bar {code} P4Plugin will add all six streams to created job. *Scan Multibranch Pipeline Log* {code:java} p4 streams //k02/foo* //k02/bar* {code} h2. *Cause* P4Plugin adds * to the end of each stream's name if it is not ended by ... or *. *ConnectionHelper.java:* {code:java} public List<IStreamSummary> getStreams(List<String> paths) throws Exception { ListIterator<String> list = paths.listIterator(); while (list.hasNext()) { String i = list.next(); if (!i.contains("...") && !i.contains("*")) { list.set(i + "*"); } } {code} Please don't add * to the end of stream paths automatically. It will give the possibility to add only specified streams. Users can add * to stream names manually or use supported //depot/stream/... syntax. h2. PR h2. Thank you |
Description |
Original:
Hello It is impossible to add streams with exact names to multibranch pipeline. h2. Steps to reproduce Perforce has six streams: * //k02/foo * //k02/foo-01 * //k02/foo-02 * //k02/bar * //k02/bar-01 * //k02/bar-02 Task: create multibranch pipeline for //k02/foo and //k02/bar streams only. If we set "Include streams" value in Branch Sources to: {code:java} //k02/foo //k02/bar {code} P4Plugin will add all six streams to created job. *Scan Multibranch Pipeline Log* {code:java} p4 streams //k02/foo* //k02/bar* {code} h2. *Cause* P4Plugin adds * to the end of each stream's name if it is not ended by ... or *. *ConnectionHelper.java:* {code:java} public List<IStreamSummary> getStreams(List<String> paths) throws Exception { ListIterator<String> list = paths.listIterator(); while (list.hasNext()) { String i = list.next(); if (!i.contains("...") && !i.contains("*")) { list.set(i + "*"); } } {code} Please don't add * to the end of stream paths automatically. It will give the possibility to add only specified streams. Users can add * to stream names manually or use supported //depot/stream/... syntax. h2. PR h2. Thank you |
New:
Hello It is impossible to add streams with exact names to multibranch pipeline. h2. Steps to reproduce Perforce has six streams: * //k02/foo * //k02/foo-01 * //k02/foo-02 * //k02/bar * //k02/bar-01 * //k02/bar-02 Task: create multibranch pipeline for //k02/foo and //k02/bar streams only. If we set "Include streams" value in Branch Sources to: {code:java} //k02/foo //k02/bar {code} P4Plugin will add all six streams to created job. *Scan Multibranch Pipeline Log* {code:java} p4 streams //k02/foo* //k02/bar* {code} h2. *Cause* P4Plugin adds * to the end of each stream's name if it is not ended by ... or *. *ConnectionHelper.java:* {code:java} public List<IStreamSummary> getStreams(List<String> paths) throws Exception { ListIterator<String> list = paths.listIterator(); while (list.hasNext()) { String i = list.next(); if (!i.contains("...") && !i.contains("*")) { list.set(i + "*"); } } {code} Please don't add * to the end of stream paths automatically. It will give the possibility to add only specified streams. Users can add * to stream names manually or use supported //depot/stream/... syntax. h2. PR [https://github.com/jenkinsci/p4-plugin/pull/93] Thank you |
Description |
Original:
Hello It is impossible to add streams with exact names to multibranch pipeline. h2. Steps to reproduce Perforce has six streams: * //k02/foo * //k02/foo-01 * //k02/foo-02 * //k02/bar * //k02/bar-01 * //k02/bar-02 Task: create multibranch pipeline for //k02/foo and //k02/bar streams only. If we set "Include streams" value in Branch Sources to: {code:java} //k02/foo //k02/bar {code} P4Plugin will add all six streams to created job. *Scan Multibranch Pipeline Log* {code:java} p4 streams //k02/foo* //k02/bar* {code} h2. *Cause* P4Plugin adds * to the end of each stream's name if it is not ended by ... or *. *ConnectionHelper.java:* {code:java} public List<IStreamSummary> getStreams(List<String> paths) throws Exception { ListIterator<String> list = paths.listIterator(); while (list.hasNext()) { String i = list.next(); if (!i.contains("...") && !i.contains("*")) { list.set(i + "*"); } } {code} Please don't add * to the end of stream paths automatically. It will give the possibility to add only specified streams. Users can add * to stream names manually or use supported //depot/stream/... syntax. h2. PR [https://github.com/jenkinsci/p4-plugin/pull/93] Thank you |
New:
Hello It is impossible to add streams with exact names to multibranch pipeline. h2. Steps to reproduce Perforce has six streams: * //k02/foo * //k02/foo-01 * //k02/foo-02 * //k02/bar * //k02/bar-01 * //k02/bar-02 Task: create multibranch pipeline for //k02/foo and //k02/bar streams only. If we set "Include streams" value in Branch Sources to: {code:java} //k02/foo //k02/bar {code} P4Plugin will add all six streams to created job. *Scan Multibranch Pipeline Log* {code:java} p4 streams //k02/foo* //k02/bar* {code} h2. *Cause* P4Plugin adds * to the end of each stream's name if it is not ended by ... or *. *ConnectionHelper.java:* {code:java} public List<IStreamSummary> getStreams(List<String> paths) throws Exception { ListIterator<String> list = paths.listIterator(); while (list.hasNext()) { String i = list.next(); if (!i.contains("...") && !i.contains("*")) { list.set(i + "*"); } } {code} h2. PR Please don't add * to the end of stream paths automatically. It will give the possibility to add only specified streams. Users can add * to stream names manually or use supported //depot/stream/... syntax. I have created a pull request with a possible fix of this problem: [https://github.com/jenkinsci/p4-plugin/pull/93] Please fix this bug. Thank you |
Comment |
[ I have created a pull request with a possible fix of this problem: https://github.com/jenkinsci/p4-plugin/pull/93 ] |
Priority | Original: Blocker [ 1 ] | New: Major [ 3 ] |
lystor Thanks for highlighting this.
Confirm that this is the behavior and that exclusionary mapping do not work when streams are involved. For example the following will not work as a workaround:
Passing to developers.