You might want to add "skipDefaultCheckout(true)" to your options - it
could be that the automatic checkout that happens whenever you enter an
agent is messing things up.

A.

On Wed, Oct 17, 2018 at 11:40 AM James Chapman <ja...@mtbfr.co.uk> wrote:

> 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/
> buildproj.pl
> 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
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/CAHvkzy%3DEtB_1umVBgUUC5rL8g-x%2BC9Zu1M%3DpB7St1mBazoWqbQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/jenkinsci-users/CAHvkzy%3DEtB_1umVBgUUC5rL8g-x%2BC9Zu1M%3DpB7St1mBazoWqbQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAPbPdOaR-yxzKa2S3ncFuXz%3DVsvCnc8_18EEqU6nSFgZKMhzag%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to