exit properly in jenkins.