You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[custom build] image isn't getting custom environment variables that are set #1272
I've created a simple custom builder image that recreates the issue. The build config is below, the image is on docker hub so anyone can run it. The image runs a bash script
and echo's an openshift env var as well as a custom one set in the build config, the later is not available in the image and can be seen by looking at the echo results in the builder image logs after it is exited.
Steps to recreate..
copy json below to a file and apply it to openshift..
cat issue1272.json | osc create -f -
osc start-build test
docker ps -a # until image rawlingsj/builder-issue:latest has exited
Activity
rawlingsj commentedon Mar 10, 2015
This is using the Openshift v0.3.4 docker image
rawlingsj commentedon Mar 12, 2015
I've created a simple custom builder image that recreates the issue. The build config is below, the image is on docker hub so anyone can run it. The image runs a bash script
https://github.com/rawlingsj/builder-issue/blob/master/builder.sh
and echo's an openshift env var as well as a custom one set in the build config, the later is not available in the image and can be seen by looking at the echo results in the builder image logs after it is exited.
Steps to recreate..
copy json below to a file and apply it to openshift..
cat issue1272.json | osc create -f -osc start-build testdocker ps -a# until image rawlingsj/builder-issue:latest has exiteddocker logs [rawlingsj/builder-issue:latest cid]{ "annotations":{ "description":"issue #1272 test config" }, "apiVersion":"v1beta1", "kind":"List", "items":[ { "apiVersion":"v1beta1", "kind":"BuildConfig", "metadata":{ "labels":{ "name":"test" }, "name":"test" }, "parameters":{ "output":{ "to":{ "name":"test-image" } }, "source":{ "git":{ "uri":"https://github.com/rawlingsj/builder-issue" }, "type":"Git" }, "strategy":{ "customStrategy":{ "image":"rawlingsj/builder-issue", "exposeDockerSocket":true }, "type":"Custom", "env":[ { "name":"CUSTOM_ENV_VAR", "value":"XXXXXXXXXXXX" } ] } } }, { "apiVersion":"v1beta1", "kind":"ImageRepository", "metadata":{ "labels":{ "name":"test" }, "name":"test-image" } } ] }rawlingsj commentedon Mar 12, 2015
Output from running the above is..
You can see the custom env vars are not set.
soltysh commentedon Mar 13, 2015
You have an error in strategy definition,
envis part ofcustomStrategy(see here). So that part should look like this:rawlingsj commentedon Mar 13, 2015
ah many thanks @soltysh!
Squashed 'cmd/service-catalog/go/src/github.com/kubernetes-incubator/…
Fix race condition in admission controllers that use ServicePlan (ope…