walter-cd / walter

Tiny deployment pipeline
http://walter-cd.net
Apache License 2.0
438 stars 39 forks source link

Can I take settings from environment variables? #67

Closed sawanoboly closed 9 years ago

sawanoboly commented 9 years ago

Hi, I'm using the walter to CI (localmachine, CiecleCI, Jenkins , etc...).

I would like to override pipline.yml by project specific values from environment variables.

For example, like below.

messenger:
  type: slack
  channel: {{SLACK_CHANNEL}}
  url: {{SLACK_HOOK_URL}}
...
takahi-i commented 9 years ago

Cool feature! :+1:

ainoya commented 9 years ago

Sorry for late reply 🙇 I'd like to support this feature, by using text.Template module. Before parsing a YAML format structure, apply text.Template process to pipeline.yaml.

sawanoboly commented 9 years ago

Thanks!

I had created fork for trying it. But, writing program and test by golang was hard to me yet...

sawanoboly commented 9 years ago

FYI. I had tried to write for this feature. The result is here golang - Go言語で設定ファイルの一部を環境変数で置換 - Qiita

takahi-i commented 9 years ago

:+1:

takahi-i commented 9 years ago

I have implemented the environment variable support based on your qiita article, @sawanoboly. The patches are in #77. When no problem is found in the verification, the patches will be merged.

sawanoboly commented 9 years ago

:+1: :+1:

takahi-i commented 9 years ago

I am so sorry that I have changed the format of environment variables following the comments by @mizzy in #83, but the function itself works as the walter before #83.

takahi-i commented 9 years ago

Close with #77 and #86.