deis / workflow-cli

The CLI for Deis Workflow
http://deis.com
MIT License
31 stars 43 forks source link

feat(cmd): allow config:set FOO="" #270

Closed bacongobbler closed 8 years ago

bacongobbler commented 8 years ago

Empty string values for an envionment variable is a valid environment variable. This is used when an application is reading for an environment variable present in the application's environment, but does not necessarily care about the value.

fixes deis/deis#4802

deis-bot commented 8 years ago

@Joshua-Anderson, @mboersma and @ultimateboy are potential reviewers of this pull request based on my analysis of git blame information. Thanks @bacongobbler!

bacongobbler commented 8 years ago

Manually tested that this works for me:

><> k --namespace=go get po
NAME                      READY     STATUS    RESTARTS   AGE
go-web-1469805774-o5klj   1/1       Running   0          6m
><> k --namespace=go exec go-web-1469805774-o5klj env
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HOSTNAME=go-web-1469805774-o5klj
BUILDER_STORAGE=minio
DEIS_APP=go
DEIS_MINIO_SERVICE_HOST=10.247.94.99
DEIS_MINIO_SERVICE_PORT=9000
FOO=
PORT=5000
SLUG_URL=home/go:git-f3a78dd4/push/slug.tgz
SOURCE_VERSION=f3a78dd4
WORKFLOW_RELEASE=v3
WORKFLOW_RELEASE_CREATED_AT=2016-11-15T20:22:22Z
WORKFLOW_RELEASE_SUMMARY=bacongobbler deployed f3a78dd
GO_SERVICE_HOST=10.247.89.69
GO_SERVICE_PORT_HTTP=80
GO_PORT=tcp://10.247.89.69:80
GO_PORT_80_TCP_ADDR=10.247.89.69
KUBERNETES_SERVICE_PORT_HTTPS=443
GO_PORT_80_TCP=tcp://10.247.89.69:80
GO_SERVICE_PORT=80
GO_PORT_80_TCP_PROTO=tcp
GO_PORT_80_TCP_PORT=80
KUBERNETES_PORT=tcp://10.247.0.1:443
KUBERNETES_PORT_443_TCP_PROTO=tcp
KUBERNETES_PORT_443_TCP_PORT=443
KUBERNETES_PORT_443_TCP_ADDR=10.247.0.1
KUBERNETES_SERVICE_HOST=10.247.0.1
KUBERNETES_SERVICE_PORT=443
KUBERNETES_PORT_443_TCP=tcp://10.247.0.1:443
HOME=/app
><> deis config
=== go Config
FOO
codecov-io commented 8 years ago

Current coverage is 72.36% (diff: 100%)

Merging #270 into master will not change coverage

@@             master       #270   diff @@
==========================================
  Files            57         57          
  Lines          3933       3933          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits           2846       2846          
  Misses          777        777          
  Partials        310        310          

Powered by Codecov. Last update f068e5a...07747dd