[JIRA] (JENKINS-60251) multibranch streams don't allow lightweight checkout?

12 views
Skip to first unread message

asmith@pipeworks.com (JIRA)

unread,
Nov 22, 2019, 9:46:05 PM11/22/19
to jenkinsc...@googlegroups.com
Adam Smith created an issue
 
Jenkins / Bug JENKINS-60251
multibranch streams don't allow lightweight checkout?
Issue Type: Bug Bug
Assignee: Unassigned
Components: p4-plugin
Created: 2019-11-23 02:45
Priority: Minor Minor
Reporter: Adam Smith

I might have misconfigured my job, given this piece of documentation https://github.com/jenkinsci/p4-plugin/blob/master/docs/MULTI.md

>Lightweight checkout is automatically applied by Jenkins to MultiBranch jobs

However I'm running a multibranch job that is polling //depot/... to find streams. The actual sync for this project should be a very small subset of the matched stream, while the whole stream is many gigabytes worth of data.

I have the following code in the Jenkinsfile

pipeline {
    agent any
    stages {
        stage('Sync') {
            steps {
                checkout perforce(
                    credential: 'credentialname',
                    populate: autoClean(),
                    workspace: manualSpec(
                        charset: 'utf8',
                        name: "jenkins-${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER}",
                        spec: clientSpec(
                            allwrite: true,
                            view: """\
        //depot/${env.BRANCH_NAME}/ServerCode/... //\${P4_CLIENT}/ServerCode/...
        //depot/${env.BRANCH_NAME}/ApplicationCode/SubDir/... //\${P4_CLIENT}/ApplicationCode/SubDir/...
        """,
                            streamName: "//depot/${env.BRANCH_NAME}"
                        )
                    )
                )
            }
        }
    }
}

but my console log shows a full sync of //depot/StreamName/... before this stage runs. Adding "options { skipDefaultCheckout() }" doesn't have any effect.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

kwirth@perforce.com (JIRA)

unread,
Nov 25, 2019, 5:53:02 AM11/25/19
to jenkinsc...@googlegroups.com
Karl Wirth updated an issue
Change By: Karl Wirth
Attachment: image-2019-11-25-10-52-29-460.png

kwirth@perforce.com (JIRA)

unread,
Nov 25, 2019, 6:08:02 AM11/25/19
to jenkinsc...@googlegroups.com

kwirth@perforce.com (JIRA)

unread,
Nov 25, 2019, 6:08:03 AM11/25/19
to jenkinsc...@googlegroups.com
Karl Wirth commented on Bug JENKINS-60251
 
Re: multibranch streams don't allow lightweight checkout?

Hi Adam Smith -Thanks for your interest in the plugin.

A couple of questions....

Can you please send me a screenshot of the 'Branch Sources' section of your multibranch job configuration page. For  a streams depot I would expect something like:

Also just to double check. Have you changed the name of your depot in the above Jenkinsfile? Perforce by default comes with a 'classic' depot called 'depot' that you cannot create streams under. Streams can only be created under a depot of type 'stream'. You can check this by running 'p4 depots'.

The reason I'm pointing this out is that we use different code for streams and classic depots. If the code for a streams was used against a classic depot we would sync everything.

Finally can you send me the version of p4-plugin and Jenkins you are using.

Thanks in advance,

Karl

 

 

kwirth@perforce.com (JIRA)

unread,
Nov 25, 2019, 6:08:03 AM11/25/19
to jenkinsc...@googlegroups.com

asmith@pipeworks.com (JIRA)

unread,
Nov 25, 2019, 1:09:08 PM11/25/19
to jenkinsc...@googlegroups.com
Adam Smith closed an issue as Not A Defect
Change By: Adam Smith
Status: Open Closed
Resolution: Not A Defect

asmith@pipeworks.com (JIRA)

unread,
Nov 25, 2019, 1:09:08 PM11/25/19
to jenkinsc...@googlegroups.com
Adam Smith commented on Bug JENKINS-60251
 
Re: multibranch streams don't allow lightweight checkout?

Good morning Karl,

I apologize for taking your time on this. I discovered my own misconfiguration late this same night and planned to update the ticket this morning. You beat me to the punch! Under the "Advanced" dropdown, I selected "Preview Only" as the populate option which produced my desired behavior.

I'll close this now.

kwirth@perforce.com (JIRA)

unread,
Nov 26, 2019, 6:13:04 AM11/26/19
to jenkinsc...@googlegroups.com

HI Adam Smith - No need to aologise and great that you solved it. If there's anything else we can do to help, please let us know.

Reply all
Reply to author
Forward
0 new messages