Git command gets "is a directory" error in Jenkins

Viewed 192

I am very new to Jenkins, and was wondering what might be wrong with the following scenario:

I have the following code block in a running Jenkinsfile via a Single Pipeline:

ws("${WORKSPACE_PATH}") {
                sh "git pull ${REPO_NAME} ${BRANCH_NAME}"
                sh "git checkout ${BRANCH_NAME}"
}

where WORKSPACE_PATH is in the following format:

\\<ip-address>\Workspace\Test

It is noted that ip-address denotes a location for a shared folder, and Test is a git repository folder. I am attempting to pull from a remote repository and checkout the pulled branch for the workspace in the shared folder.

When I attempted to run this, I get the following in console:

Running in \\<ip-address>\Workspace\Test
[Pipeline] {
[Pipeline] sh
[\\<ip-address>\Workspace\Test] Running shell script
sh: \<ip-address>\Workspace\Test@tmp\durable-dd888913\pid: Is a directory
sh: \<ip-address>\Workspace\Test@tmp\durable-dd888913\jenkins-log.txt: Is a directory
sh: \<ip-address>\Workspace\Test@tmp\durable-dd888913\jenkins-result.txt: Is a directory
[Pipeline] }

Seemingly it can manipulate and access the files in the shared folder and can be seen in the remote desktop where the shared folder is in (so authorization is fine, yes?), but otherwise it will fail.

Could anyone point out what might I have done wrong in this case? Any help would be greatly appreciated. Thanks in advance.

0 Answers
Related