NonCPS durability

26 views
Skip to first unread message

Senthil Nathan

unread,
Apr 20, 2020, 8:27:54 PM4/20/20
to Jenkins Users
How do I guarantee durability of my job given that my job will use jenkins plugins that are not CPS transformed.

From my understanding - Jenkins does not provide durability for non CPS transformed jenkins plugin.

Senthil Nathan

unread,
May 7, 2020, 10:56:53 PM5/7/20
to Jenkins Users
In this demo example, I was able to pause/resume when callingCps() method is executing. But I could not pause/resume when callingNonCps() method is executing. Does that mean pipelines that contain NonCPS methods are not durable?


node('build'){
    println "in cps";
    callingNonCps();
    callingCps();
}



def callingCps(){
    println "in cps";
    for(int i=0;i<500;i++){
        println "in cps $i";
    }
}

@NonCPS
def callingNonCps(){
    
    for(int i=0;i<500;i++){
        println "in non cps $i";
    }
}
Reply all
Reply to author
Forward
0 new messages