Hi team,

In my scenario, I am running a ci pipeline of java project whose 
jenkinsfile look like below:

node ('slave_java') {

stage "checkout code"
build "fetch-code"

stage "compile code"
build "code-stability"

stage "code-quality"
    parallel "code-quality": {
build "code-quality"
}, "code-coverage": {
build "code-coverage"
}


1)fetch-code,code-stability,code-quality,code-coverage these jobs are 
pre-existing.and these jobs use a common workspace (configured in jobs)
2)as pipeline job starts it creates a kubernetes slave for fetch-code job, 
and job runs and slave dies.
3)when next job code-stability executes, it creates new fresh kubernetes 
slave for this, and as there is no source code ,compilation failes.

possible solution may be to checkout source code in every stage, but i dont 
want this.another solution is ruuning shell commnads(sh mvn clean install) 
in every stage instead of build job. but i want to use jobs only.


is there any way by which we can *retain 1 kubernetes slave* for all 
following jobs?

-- 
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/597147e2-af80-4d92-8376-928409a354a4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to