Hi,

I were trying to write custom class in Jenkinsfile.

With following example the JOb does hang after the line "echo hi:2". I have 
to click to abort the build and then click twice
on provided links in the Jenkins Console to fully cancel it. On our server 
- even after kill - Jenkins remains 200 and more percentage of CPU.
We were forced to shutdown the Service and to restart. Locally I'm running 
Jenkins inside a Docker container. No CPU problems there.
I'm using a 2.8 and on our server we have a 2.23.

The Console output looks like this:

hi:2
Aborted by Thomas Lehmann <http://tlehmann.office.aol.com:8080/user/tlehmann>

Click here to forcibly terminate running steps 
<http://tlehmann.office.aol.com:8080/job/Test1/25/console#>

Terminating node

Click here to forcibly kill entire build 
<http://tlehmann.office.aol.com:8080/job/Test1/25/console#>

Hard kill!
Finished: ABORTED


And ideas?

Kind Regards,
Thomas

class Project implements Serializable {
    static final serialVersionUID = 1L
    
    private String message = ""
    
    def setMessage(String message) {
        this.message = message
    }
    
    def getMessage() {
        return this.message
    }
}

node {
    echo "hi:1"
    def project = new Project()

    stage("Using a class") {
        echo "hi:2"
        project.setMessage("some message")
        echo "hi:3"
        echo project.getMessage()
        echo "hi:4"
    }
}



-- 
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/48fca903-6d35-4852-ade9-38688f2663f6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to