[JIRA] (JENKINS-52861) p4sync's depotSource doesn't handle exclusionary mappings

4 views
Skip to first unread message

jbrown@perforce.com (JIRA)

unread,
Aug 2, 2018, 2:30:02 PM8/2/18
to jenkinsc...@googlegroups.com
Joel Brown created an issue
 
Jenkins / Bug JENKINS-52861
p4sync's depotSource doesn't handle exclusionary mappings
Issue Type: Bug Bug
Assignee: Unassigned
Components: p4-plugin
Created: 2018-08-02 18:29
Priority: Minor Minor
Reporter: Joel Brown

 

See client/ViewMapHelper.getClientView() - there's no check for a leading "-".

Workaround:  use a template workspace.

Repro:   make a p4sync with "Depot Sources" with one good line and one exclusionary path

//depot/cases/...

-//depot/cases/diff2/..

p4sync then has:

source: depotSource('''//depot/cases/...
-//depot/cases/diff2/...''')

Console log errro is:

P4: Unable to setup workspace: com.perforce.p4java.exception.RequestException: Error in client specification.
Error detected at line 17.
Null directory (//) not allowed in '///depot/cases/diff2/...'.
Null directory (//) not allowed in '///depot/cases/diff2/...'.

 

 

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

jbrown@perforce.com (JIRA)

unread,
Aug 2, 2018, 3:02:02 PM8/2/18
to jenkinsc...@googlegroups.com
Joel Brown updated an issue
Change By: Joel Brown
 

See client/ViewMapHelper.getClientView() - there's no check for a leading "-".

Workaround:  use a template workspace.

Repro:   make a p4sync with "Depot Sources" with one good line and one exclusionary path

//depot/cases/...

-//depot/cases/diff2/.. .

p4sync then has:

source: depotSource('''//depot/cases/...
-//depot/cases/diff2/...''')

Console log errro is:

P4: Unable to setup workspace: com.perforce.p4java.exception.RequestException: Error in client specification.
Error detected at line 17.
Null directory (//) not allowed in '///depot/cases/diff2/...'.
Null directory (//) not allowed in '///depot/cases/diff2/...'.

 

 

pallen@perforce.com (JIRA)

unread,
Aug 8, 2018, 11:22:02 AM8/8/18
to jenkinsc...@googlegroups.com
Paul Allen started work on Bug JENKINS-52861
 
Change By: Paul Allen
Status: Open In Progress

pallen@perforce.com (JIRA)

unread,
Aug 8, 2018, 11:23:01 AM8/8/18
to jenkinsc...@googlegroups.com

pallen@perforce.com (JIRA)

unread,
Aug 8, 2018, 11:23:02 AM8/8/18
to jenkinsc...@googlegroups.com
Paul Allen resolved as Fixed
 

Ready for release.
Verified new view mapping code supports DepotSource Excludes.

Change By: Paul Allen
Status: In Progress Resolved
Resolution: Fixed

pallen@perforce.com (JIRA)

unread,
Aug 13, 2018, 6:56:02 AM8/13/18
to jenkinsc...@googlegroups.com
Paul Allen closed an issue as Fixed
 

Released in 1.8.15

Change By: Paul Allen
Status: Resolved Closed

kierzo@kierzo.com (JIRA)

unread,
Aug 12, 2019, 10:48:03 AM8/12/19
to jenkinsc...@googlegroups.com
Kieron Kierzo commented on Bug JENKINS-52861
 
Re: p4sync's depotSource doesn't handle exclusionary mappings

Hey I seem to be having this same issue or one very similar.

Basically I'm looking to use a script that passes in a workspace branch depot path as a parameter to sync a view dynamically and run a build, and keeping the Jenkinsfile in source control.

There seems to be 3 separate issues I've come across with this,.

 

The first one is when trying to sync a Jenkinsfile in SCM I have the depot path as a build parameter string variable which could be one of many for example...

//IES/dev/Features/Branch01

or

//IES/dev/Features/Branch02

 

and so on...

In the Jenkins SCM pipeline config, I have sync to a manual custom view, which is like this...

 

${feature_path}/... //jenkins-${NODE_NAME}${JOB_NAME}${EXECUTOR_NUMBER}/...

However it seems that you cant use a variable string in a workspace mapping view if the variable starts with two forward slashes as per the above strings "//IES..." 

However the variable then does not expand to the string, it just stay as the variable name e.g. tries to sync as literally ${feature_path}/.. and throws an error that its not the right format.

 

I also am not able to minus out starting with a " - " items from a view as per the same error in this ticket e.g. -//DevOps/prebuilt_Fortran/lib_debug/... //jenkins-${NODE_NAME}${JOB_NAME}${EXECUTOR_NUMBER}/prebuilt_Fortran/lib_debug/... 

This issue is not as important as I can just keep the items included, but it will just take longer to sync.

 

I am able to get a bit further if I hard code the "//" in the Jenkinsfile sync step, and set the build parameter variable to not include the // for example...

branch variable being passed in as:

IES/dev/Features/Branch01

 

and in the sync step set up like below...

 

p4sync charset: 'none', credential: 'perforce dev.build', populate: forceClean(have: false, parallel: [enable: false, minbytes: '1024', minfiles: '1', threads: '4'], pin: '', quiet: true), source: depotSource('''//${feature_path}/... //jenkins-${NODE_NAME}${JOB_NAME}${EXECUTOR_NUMBER}/...''')

 

This then throws the following error...

 

ERROR: P4: Unable to initialise CheckoutTask: hudson.AbortException: Error in client specification.
Error detected at line 18.
Null directory (//) not allowed in '//IES/dev/Features/Branch01/... //jenkins-Win10build02-VE-VE_Build_Requester-0/...'.

 

Appreciate the help.

 

Thanks for your time.

 

Cheers Kieron.

 

 

 

This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)
Reply all
Reply to author
Forward
0 new messages