Hello,
I'm trying to setup Jenkins to run a multibranch pipeline project. Just to test, I use a very simple Jenkinsfile like this:
node {
checkout scm
bat 'echo > tst1.txt'
}
When I run the build, for each branch, for example the 'master' branch, Jenkins creates 3 directories:
- workspace@script: contains source code. This is created first even before the node statement is executed.
- workspace: contains source code. This is created with the node statement
- workspace@tmp: empty. This is created when running 'bat' command.
- Certainly I do not need 2 copies of the source code so I don't need the workspace@script directories but this is created automatically and I do not know how to turn it off. The default directory when inside the node command block is 'workspace', not 'workspace@script' so I can't do anything with the source unless I change directory to workspace@script. Is there anyway so that Jenkins does not check out the workspace@script directory?
- What is the purpose of workspace@tmp? and is there a way not to create it as well?
Thanks