Jenkins openshiftVerifyBuild () не работает с com.openshift.restclient.authorization.UnauthorizedException - PullRequest
0 голосов
/ 17 июня 2020

Конвейер Jenkins openshiftVerifyBuild () не работает с com.openshift.restclient.authorization.UnauthorizedException: доступ к ресурсу не авторизован. Вы можете получить доступ к серверу, используя аутентификацию Basi c.

Тот же конвейер несколько дней назад работал нормально. Есть предложения здесь?

Код конвейера :

echo '***************** Verify build *****************\r'
withEnv(['SKIP_TLS=true']) {
withCredentials([usernamePassword(credentialsId: "${NAMESPACE_DEV}", passwordVariable: 'TOKEN', usernameVariable: 'USERNAME')]) {
openshiftVerifyBuild apiURL: 'https://master_server_name:PORT',
authToken: '$TOKEN',
bldCfg: "${APPLICATION}",
checkForTriggeredDeployments: 'false',
namespace: "${NAMESPACE_DEV}",
verbose: 'true',
waitTime: '900',
waitUnit: 'sec'
}
}

Version : openshift v3.11.216

Полное сообщение об ошибке :

Auth - allowCertificate with incoming chain of len 2
Auth - in skip tls mode, returning true
Auth - allowCertificate with incoming chain of len 2
Auth - in skip tls mode, returning true
Auth - allowCertificate with incoming chain of len 2
Auth - in skip tls mode, returning true
Auth - allowHostname getting called, skip tls is true
Auth - allowHostname getting called, skip tls is true
Auth - allowHostname getting called, skip tls is true
com.openshift.restclient.authorization.UnauthorizedException: Unauthorized to access resource. You can access the server using Basic authentication.
at com.openshift.internal.restclient.okhttp.ResponseCodeInterceptor.createOpenShiftException(ResponseCodeInterceptor.java:110)
at com.openshift.internal.restclient.okhttp.ResponseCodeInterceptor.intercept(ResponseCodeInterceptor.java:65)
at okhttp3.RealCall$ApplicationInterceptorChain.proceed(RealCall.java:190)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:163)
at okhttp3.RealCall.execute(RealCall.java:57)
at com.openshift.internal.restclient.okhttp.OpenShiftAuthenticator.tryAuth(OpenShiftAuthenticator.java:106)
at com.openshift.internal.restclient.okhttp.OpenShiftAuthenticator.authenticate(OpenShiftAuthenticator.java:62)
at okhttp3.internal.http.HttpEngine.followUpRequest(HttpEngine.java:946)
at okhttp3.RealCall.getResponse(RealCall.java:279)
at okhttp3.RealCall$ApplicationInterceptorChain.proceed(RealCall.java:201)
at com.openshift.internal.restclient.okhttp.ResponseCodeInterceptor.intercept(ResponseCodeInterceptor.java:54)
at okhttp3.RealCall$ApplicationInterceptorChain.proceed(RealCall.java:190)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:163)
at okhttp3.RealCall.execute(RealCall.java:57)
at com.openshift.internal.restclient.ApiTypeMapper.readEndpoint(ApiTypeMapper.java:193)
at com.openshift.internal.restclient.ApiTypeMapper.getResources(ApiTypeMapper.java:168)
at com.openshift.internal.restclient.ApiTypeMapper.lambda$null$2(ApiTypeMapper.java:127)
at java.util.ArrayList.forEach(ArrayList.java:1257)
at com.openshift.internal.restclient.ApiTypeMapper.lambda$init$3(ApiTypeMapper.java:126)
at java.util.ArrayList.forEach(ArrayList.java:1257)
at com.openshift.internal.restclient.ApiTypeMapper.init(ApiTypeMapper.java:124)
at com.openshift.internal.restclient.ApiTypeMapper.isSupported(ApiTypeMapper.java:111)
at com.openshift.internal.restclient.URLBuilder.buildWithNamespaceInPath(URLBuilder.java:145)
at com.openshift.internal.restclient.URLBuilder.build(URLBuilder.java:132)
at com.openshift.internal.restclient.DefaultClient.execute(DefaultClient.java:251)
at com.openshift.internal.restclient.DefaultClient.execute(DefaultClient.java:229)
at com.openshift.internal.restclient.DefaultClient.list(DefaultClient.java:162)
at com.openshift.internal.restclient.DefaultClient.list(DefaultClient.java:150)
at com.openshift.jenkins.plugins.pipeline.model.RetryIClient.lambda$list$3(RetryIClient.java:177)
at com.openshift.jenkins.plugins.pipeline.model.RetryIClient.retry(RetryIClient.java:78)
at com.openshift.jenkins.plugins.pipeline.model.RetryIClient.list(RetryIClient.java:177)
at com.openshift.jenkins.plugins.pipeline.model.IOpenShiftBuildVerifier.getLatestBuildID(IOpenShiftBuildVerifier.java:49)
at com.openshift.jenkins.plugins.pipeline.model.IOpenShiftBuildVerifier.coreLogic(IOpenShiftBuildVerifier.java:90)
at com.openshift.jenkins.plugins.pipeline.model.IOpenShiftPlugin.doItCore(IOpenShiftPlugin.java:359)
at com.openshift.jenkins.plugins.pipeline.dsl.OpenShiftBuildVerifierExecution.run(OpenShiftBuildVerifierExecution.java:45)
at com.openshift.jenkins.plugins.pipeline.dsl.OpenShiftBuildVerifierExecution.run(OpenShiftBuildVerifierExecution.java:17)
at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
at hudson.security.ACL.impersonate(ACL.java:290)
at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

Дополнительная информация : В среде openshift изменений не было.

...