Bug 1956826 - buildArgs does not work when the value is taken from a secret
Summary: buildArgs does not work when the value is taken from a secret
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Build
Version: 4.7
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 4.8.0
Assignee: Gabe Montero
QA Contact: Jitendar Singh
Rolfe Dlugy-Hegwer
Depends On:
TreeView+ depends on / blocked
Reported: 2021-05-04 13:45 UTC by Hongkai Liu
Modified: 2021-07-27 23:06 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
* Previously, the documentation and `oc explain` help text did not convey that the `buildArgs` field in the `BuildConfig` object does not support the `valueFrom` field of its underlying Kubernetes `EnvVar` type. As a result, users believed it was supported and tried to use it. The current release updates the documentation and help text, so it is more apparent that the `BuildConfig` object's `buildArgs` field does not support the `valueFrom` field.
Clone Of:
Last Closed: 2021-07-27 23:06:09 UTC
Target Upstream Version:

Attachments (Terms of Use)
build pod and log (8.66 KB, application/zip)
2021-05-04 13:45 UTC, Hongkai Liu
no flags Details

System ID Private Priority Status Summary Last Updated
Github openshift api pull 933 0 None open Bug 1956826: add restriction note for docker strategy build args 2021-06-02 14:48:51 UTC
Github openshift openshift-apiserver pull 213 0 None open Bug 1956826: add restriction note to docker strategy build args 2021-06-03 19:16:16 UTC
Red Hat Product Errata RHSA-2021:2438 0 None None None 2021-07-27 23:06:25 UTC

Description Hongkai Liu 2021-05-04 13:45:25 UTC
Created attachment 1779380 [details]
build pod and log

Description of problem:

Version-Release number of selected component (if applicable):
oc --context build01 get clusterversion
version   4.7.9     True        False         4d15h   Cluster version is 4.7.9

How reproducible: Always

Steps to Reproduce:
$ oc new-project hongkliu-test
$ oc create is pipeline
$ oc create secret generic build-credentials --from-literal=password=123 -n hongkliu-test
$ oc apply -f test-image.build.yaml

Actual results:
STEP 6: RUN echo -n "$user=$password=" > /tmp/password.txt
STEP 7: RUN base64 /tmp/password.txt

echo amFjaz09 | base64 -d

Expected results:
The password 123 should be passed to the build.

Additional info:

Comment 11 XiuJuan Wang 2021-06-23 06:28:38 UTC
Verified this bug before pr merged and 4.8.0-0.nightly-2021-06-19-005119 build.

Comment 15 errata-xmlrpc 2021-07-27 23:06:09 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 (Moderate: OpenShift Container Platform 4.8.2 bug fix and security update), 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.