I am quite new to Jenkins. I managed to create a simple pipeline to pull from perforce and build the project every commit, but I find sometimes it creates a different workspace such as project@2, project@tmp, project@tmp@2 and so on... why does this happen I have even set the customworkspace. Sorry if this is an obvious question. Here is my pipeline:
pipeline
{
agent {
node {
label 'master'
customWorkspace 'C:/Users/User/.jenkins/workspace/Project'
}
}
options { timestamps () }
stages{
stage('Get latest'){
steps{
p4sync charset: 'none', credential: 'somecredentials',
populate: syncOnly(force: false, have: true, modtime: false,
parallel: [enable: false, minbytes: '1024', minfiles: '1', threads: '4'],
pin: '', quiet: true, revert: false),
source: streamSource('//Project/main')
}
}
stage('Build'){
steps{
script {
def msbuild = tool name: 'MSBuild', type: 'hudson.plugins.msbuild.MsBuildInstallation'
bat "\"${msbuild}\" Project/Source/age2-GRDK.sln /t:Rebuild"
}
}
}
}
post{
changed{
mail to: 'somemail',
subject: "Status of: ${currentBuild.fullDisplayName}",
body: "${env.JOB_NAME} has result ${currentBuild.result}"
}
}
}