Hi

I'm converting older jobs from Jenkins 1.x to the pipeline system. Seems to 
work so far.
But I have a problem with temporary files.

The job mainly consists of the stages:
- update from svn
- build
- test1
- test2
...

I want to use the built files from stage 2 in the later stages. And 
preferably keep
the binaries even between job runs so I don't need to rebuild on every run. 
It should
be equivalent to
- svn update
- make
- sh test1
- sh test2

However all the created files get deleted between steps. I don't call any 
command
to clear the workspace or directories. How can I tell jenkins to not 
cleanup? Does
it have to do with the @tmp directories it keeps creating?

In general that's my script:

def DoBuild(target, config, build) {
    dir('subdir') {
        sh script: 'make'" || exit $?'
        warnings ...
    }
}

def DoTest(target, config, test) {
    sh script: '$test' || exit $?'
    xunit thresholds: [...]
}

pipeline {
    stages {
        stage('Checkout') { 
            steps {
                checkout([$class: 'SubversionSCM'...])
            }
        }
        stage('Build'){
            steps {
                DoBuild("tgt", "Debug", "build")
            }
        }
        stage('Test 1'){
            steps {
                DoTest("tgt", "Debug", "test1")
            }
        }
        stage('Test 2'){
            steps {
                DoTest("tgt", "Debug", "test2")
            }
        }

Thanks

bye  Fabi

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/654405b1-3fc5-4e21-b05a-0a6eb76d73ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to