-
Bug
-
Resolution: Won't Do
-
Minor
-
None
-
centos 7 master,
openjdk8,
jenkins 1.631
workflow plugin 1.10
I have a script I can run via terminal, and via the envinject plugin
import javax.net.ssl.HostnameVerifier import javax.net.ssl.HttpsURLConnection import javax.net.ssl.SSLContext import javax.net.ssl.TrustManager import javax.net.ssl.X509TrustManager def nullTrustManager = [ checkClientTrusted: { chain, authType -> }, checkServerTrusted: { chain, authType -> }, getAcceptedIssuers: { null } ] def nullHostnameVerifier = [ verify: { hostname, session -> true } ] SSLContext sc = SSLContext.getInstance("SSL") sc.init(null, [nullTrustManager as X509TrustManager] as TrustManager[], null) HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory()) HttpsURLConnection.setDefaultHostnameVerifier(nullHostnameVerifier as HostnameVerifier) URL url = new URL('<my svn https url>'); URLConnection conn = url.openConnection(); String basicAuth = "Basic " + <my base 64 encoded user:pass> ; conn.setRequestProperty ("Authorization", basicAuth); svnPageContents = conn.content.text regexGroup = (svnPageContents =~ /svn - Revision (\d+):/) printf ("found: ${regexGroup[1][1]}")
This just connects to svn to get the latest rev number, on a svn server with a self signed cert. On the console and in envinject this works fine. In the workflow plugin groovy script it exceptions out
java.lang.NullPointerException: Cannot get property 'text' on null object
So my openConnection is returning null. I don't know why, but it's easy to reproduce
- is related to
-
JENKINS-32986 hard killing a pipeline leaves the JVM CPS thread running.
- Open