-
Notifications
You must be signed in to change notification settings - Fork 144
Description
Hello,
I am basically reopening the issue #479 that was strangely closed without any description and/or comments.
We are running our main Jenkins in a VM outside our Openshift Cluster. We are using Kubernetes Plugin for planning our builds inside of our Openshift Dev cluster.
We are using couple of Openshift Client Plugin features, mainly selectors and listing all available objects / checking whether objects exist in a namespace.
Our problem began after upgrading Openshift to 4.14 when a warning about DeploymentConfig deprecation started to appear:
oc get dc
-->
Warning: apps.openshift.io/v1 DeploymentConfig is deprecated in v4.14+, unavailable in v4.10000+
This suddenly broke our builds as we are using deploymentconfigs, and we are getting info about them via Openshift Plugin:
List all = openshift.selector("deploymentconfig").objects()
This now crashes with an error:
Also: org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: 3a3be41a-8fe6-4556-ab04-9a157608047b
groovy.json.JsonException: Unable to determine the current character, it is not a string, number, array, or object
The current character read is 'W' with an int value of 87
Unable to determine the current character, it is not a string, number, array, or object
line number 1
index number 0
Warning: apps.openshift.io/v1 DeploymentConfig is deprecated in v4.14+, unavailable in v4.10000+
I tried to debug it and found out, that when I run the same code in the local main Jenkins context, it works, when I run it via Kubernetes Plugin pod, it mixes stderr and stdout both to stdout:
openshift.raw("get dc -ojson")
-->
16:53:20 {
16:53:20 "operation": "raw",
16:53:20 "actions": [
16:53:20 {
16:53:20 "err": "",
16:53:20 "verb": "",
16:53:20 "cmd": "oc --server=https://api.osdev.cp.cloud:6443/ --insecure-skip-tls-verify --namespace=dev-spot --token=XXXXX get dc -ojson ",
16:53:20 "out": "Warning: apps.openshift.io/v1 DeploymentConfig is deprecated in v4.14+, unavailable in v4.10000+\n{\n \"apiVersion\":
Can you, please, guide us to a solution?
Thank you!
Miroslav