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:
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"
}
}