Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1509793 - Not able set env vars in jenkinsPipelineStrategy
Summary: Not able set env vars in jenkinsPipelineStrategy
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Command Line Interface
Version: 3.5.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 3.7.0
Assignee: Juan Vallejo
QA Contact: XiuJuan Wang
Depends On:
TreeView+ depends on / blocked
Reported: 2017-11-06 05:10 UTC by Miheer Salunke
Modified: 2017-12-18 13:23 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2017-12-18 13:23:26 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:3464 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.7 bug fix and enhancement update 2017-12-18 18:22:05 UTC

Comment 2 Miheer Salunke 2017-11-06 05:17:31 UTC
Description of problem:

According to this document

I should be able to set parameters in the pipeline build config like this 
    - name: "FOO"
      value: "BAR"

When ever I do this, I am just seeing it get skipped.

Version-Release number of selected component (if applicable):
[root@drlosm02 ~]# openshift version
openshift v3.5.5.31
kubernetes v1.5.2+43a9be4
etcd 3.1.0

How reproducible:

Steps to Reproduce:
1.As per description 

Comment 3 Juan Vallejo 2017-11-06 16:34:09 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).


Comment 4 Juan Vallejo 2017-11-06 16:35:07 UTC
Providing client information for the above comment:

$ oc version

oc v3.7.0-rc.0+c21a470-128-dirty
kubernetes v1.7.6+a08f5eeb62
features: Basic-Auth

openshift v3.7.0-rc.0+b65ef46-105
kubernetes v1.7.6+a08f5eeb62

Comment 5 Juan Vallejo 2017-11-06 17:09:51 UTC
@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?

Comment 6 Ben Parees 2017-11-06 17:14:50 UTC
It looks like we did not support those in 3.5:

however if oc set env is not working with 3.6/3.7, that still sounds like a problem.

Comment 7 Juan Vallejo 2017-11-06 19:34:20 UTC
Thanks, Origin PR to fix `oc set env` on 3.7:

Will open PR against 3.6 branch as well.

Comment 8 Juan Vallejo 2017-11-06 22:35:46 UTC
This patch will not be backported to 3.6 due to its lack of severity. See [1].


Comment 9 XiuJuan Wang 2017-11-08 09:16:33 UTC
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

openshift v3.7.0-0.198.0
kubernetes v1.7.6+a08f5eeb62

Comment 12 errata-xmlrpc 2017-12-18 13:23:26 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.