Bug 1509793
| Summary: | Not able set env vars in jenkinsPipelineStrategy | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Miheer Salunke <misalunk> |
| Component: | oc | Assignee: | Juan Vallejo <jvallejo> |
| Status: | CLOSED ERRATA | QA Contact: | XiuJuan Wang <xiuwang> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 3.5.0 | CC: | aos-bugs, bparees, jokerman, jvallejo, misalunk, mmccomas, xxia |
| Target Milestone: | --- | ||
| Target Release: | 3.7.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-12-18 13:23:26 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Comment 2
Miheer Salunke
2017-11-06 05:17:31 UTC
Hi Miheer, I am able to set an env var through `oc edit` using a recent version of the client [1]. I was able to reproduce the error received when setting an env var through `oc set env bc/...` however. I will look into this further. In the meantime, would you mind providing the client version used? (oc version / openshift cli version). Thanks Providing client information for the above comment: 1. ``` $ oc version oc v3.7.0-rc.0+c21a470-128-dirty kubernetes v1.7.6+a08f5eeb62 features: Basic-Auth Server https://127.0.0.1:8443 openshift v3.7.0-rc.0+b65ef46-105 kubernetes v1.7.6+a08f5eeb62 ``` @bparees I am able to use `oc edit` to add an environment variable to a build-config with the `JenkinsPipeline` strategy in a 3.6 and 3.7 cluster. Per comment 0, it appears that a 3.5 server is being used. I was wondering if we just did not support env vars on JenkinsPipeline build-configs back then, and if we should just recommend using a newer version of the cluster for this? It looks like we did not support those in 3.5: https://github.com/openshift/origin/blob/release-1.5/pkg/build/api/types.go#L644-L652 however if oc set env is not working with 3.6/3.7, that still sounds like a problem. Thanks, Origin PR to fix `oc set env` on 3.7: https://github.com/openshift/origin/pull/17203 Will open PR against 3.6 branch as well. This patch will not be backported to 3.6 due to its lack of severity. See [1]. 1. https://github.com/openshift/origin/pull/17204#issuecomment-342262205 Could set env successfully to pipeline bc via 'oc set env' cmd. $oc set env bc/sample-pipeline FOO=bar -n xiu buildconfig "sample-pipeline" updated oc v3.7.0-0.198.0 kubernetes v1.7.6+a08f5eeb62 features: Basic-Auth GSSAPI Kerberos SPNEGO Server https://172.16.120.56:8443 openshift v3.7.0-0.198.0 kubernetes v1.7.6+a08f5eeb62 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2017:3464 |