Hello Jenkins users,
I have a pipeline job that run across a whole lot of different platforms. The job checks out source code on each node, builds on each node, runs tests on each node and then completes. Pretty straightforward!
For some reason, when the checkout finishes, all the files that were just checked out get deleted and the build then fails because the required
buildproj.pl file is missing. All that remains after the checkout step is the Jenkinsfiles.
Can anyone help me understand why the checked out files are being deleted?
Thanks
James
In the project root I have:
build/
jenkins/Jenkinsfile_svn_checkout
source/
Jenkinsfile
Jenkinsfile_svn_checkout:
checkout poll: false,
scm: [$class: 'SubversionSCM',
additionalCredentials: [],
excludedCommitMessages: '',
excludedRegions: '',
excludedRevprop: '',
excludedUsers: 'userXYZ',
filterChangelog: true,
ignoreDirPropChanges: true,
includedRegions: '',
locations: [[cancelProcessOnExternalsFail: false,
credentialsId: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
depthOption: 'infinity',
ignoreExternalsOption: false,
local: '.',
remote: "${g_subversion_url}/${params.SUBVERSION_BRANCH}"]],
quietOperation: false,
workspaceUpdater: [$class: 'UpdateUpdater']
]
Jenkinsfile:
pipeline {
agent none
parameters {
booleanParam(name: 'BUILD_WINDOWS_32', defaultValue: true, description: '')
booleanParam(name: 'BUILD_WINDOWS_64', defaultValue: true, description: '')
booleanParam(name: 'BUILD_LINUX_32', defaultValue: true, description: '')
booleanParam(name: 'BUILD_LINUX_64', defaultValue: true, description: '')
booleanParam(name: 'BUILD_SOLARIS_10', defaultValue: true, description: '')
booleanParam(name: 'BUILD_FREEBSD_10', defaultValue: true, description: '')
booleanParam(name: 'BUILD_MAC_OSX_64', defaultValue: true, description: '')
booleanParam(name: 'BUILD_AIX_PPC', defaultValue: true, description: '')
string(name: 'SUBVERSION_BRANCH', defaultValue: 'trunk', description: '')
}
environment {
String g_subversion_url = 'https://svn.project.url'
int m_win64_code = 0
int m_win32_code = 0
}
options {
buildDiscarder(logRotator(numToKeepStr: '10'))
timestamps()
}
triggers {
pollSCM('H/5 * * * *')
}
stages {
stage('Checkout Build Test') {
failFast false
parallel {
stage('Windows 64') {
agent {
node {
label 'WIN64'
customWorkspace 'D:\\JENKINS\\Project_pipeline'
}
}
steps {
script {
if (params.BUILD_WINDOWS_64) {
load 'jenkins/Jenkinsfile_svn_checkout'
m_win64_code = bat (returnStatus: true, script: '''perl buildproj.pl win64''')
}
}
}
}
stage('Windows 32') {
agent {
node {
label 'WIN32'
customWorkspace 'D:\\JENKINS\\Project_pipeline'
}
}
steps {
script {
if (params.BUILD_WINDOWS_32) {
load 'jenkins/Jenkinsfile_svn_checkout'
m_win32_code = bat (returnStatus: true, script: '''perl buildproj.pl win32''')
}
}
}
}
// ... more stages for other platforms
}
}
} // stages
post {
always {
echo "Unit tests completed"
}
success {
echo "All test passed"
}
failure {
echo 'Unit tests failed'
}
}
} // pipeline