-
Bug
-
Resolution: Unresolved
-
Major
Setup
- Jenkins 2.303.3
- P4 Plugin 1.11.6
Where Jenkins master is running on Linux
Running slaves on a Kubernetes cluster (configured as Cloud) as Pod Templates
Repro Steps
- Create a pod template that will execute on a Windows Kubernetes node
- Create a pipeline that uses uses the pod template as its agent
- Attempt to checkout a p4 stream on the a container of the windows pod (it can be the jnlp container)
Expectations
The stream should be checked out at the current location
Observations
P4 fails to checkout with the following error:
ERROR: P4: Task Exception: hudson.AbortException: P4JAVA: Error(s): Path 'C:/home/jenkins/agent/workspace/gpetit/gpetit-windows/...' is not under client's root '/home/jenkins/agent/workspace/gpetit/gpetit-windows'.
Additional Details
The the pod template looks like this:
apiVersion: "v1" kind: "Pod" metadata: labels: jenkins/label: "windows-architecture-base" spec: containers: - image: "jenkins/inbound-agent:windowsservercore-ltsc2019" name: "jnlp" nodeSelector: kubernetes.io/os: "windows"
The pipeline:
pipeline { agent { label 'windows-architecture-base' } stages { stage('Checkout') { steps { script { powershell "Get-ChildItem env:" checkout perforce( credential: 'gpetit-p4', populate: autoClean(delete: true, modtime: false, parallel: [enable: true, minbytes: '1024', minfiles: '1', threads: '4'], pin: '', quiet: true, replace: true, tidy: false), workspace: streamSpec(charset: 'none', format: 'jenkins-${NODE_NAME}-${JOB_NAME}-${EXECUTOR_NUMBER}', pinHost: false, streamName: '//depot/stream-main') ) } } } } }
When printing environment variables, noteworthy is that the WORKSPACE is set as a linux path:
WORKSPACE /home/jenkins/agent/workspace/gpetit/gpetit-windows WORKSPACE_TMP /home/jenkins/agent/workspace/gpetit/gpetit-windows@tmp