{"action":"opened","issue":{"url":"https://api.github.com/repos/JonathonReinhart/scuba/issues/88","repository_url":"https://api.github.com/repos/JonathonReinhart/scuba","labels_url":"https://api.github.com/repos/JonathonReinhart/scuba/issues/88/labels{/name}","comments_url":"https://api.github.com/repos/JonathonReinhart/scuba/issues/88/comments","events_url":"https://api.github.com/repos/JonathonReinhart/scuba/issues/88/events","html_url":"https://github.com/JonathonReinhart/scuba/issues/88","id":218419072,"number":88,"title":"Using environment variables in .scuba.yml or passing them ","user":{"login":"mpdude","id":1202333,"avatar_url":"https://avatars3.githubusercontent.com/u/1202333?v=3","gravatar_id":"","url":"https://api.github.com/users/mpdude","html_url":"https://github.com/mpdude","followers_url":"https://api.github.com/users/mpdude/followers","following_url":"https://api.github.com/users/mpdude/following{/other_user}","gists_url":"https://api.github.com/users/mpdude/gists{/gist_id}","starred_url":"https://api.github.com/users/mpdude/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpdude/subscriptions","organizations_url":"https://api.github.com/users/mpdude/orgs","repos_url":"https://api.github.com/users/mpdude/repos","events_url":"https://api.github.com/users/mpdude/events{/privacy}","received_events_url":"https://api.github.com/users/mpdude/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-03-31T07:25:05Z","updated_at":"2017-03-31T07:25:05Z","closed_at":null,"body":"Is it already possible – or do you consider it a valuable addition – to use environment variables in the `.scuba.yml` file?\r\n\r\nFor one, these could be already present in the shell where `scuba` is run. Additionally, I think some variables added by `scuba` might be helpful. (Is there a list of already used variables available somewhere, like the directory where `scuba` was started, path and directory to `.scubafile.yml` etc.)?\r\n\r\nThe goal would be do define an alias like `build: ./do-build.sh ${SCUBA_HOME} ${SOME_ENV}`.\r\n\r\nWith regard to passing environment variables into the container, what about a new configuration setting, either global or per-alias, that lists env vars to be passed?\r\n\r\n```\r\nimage: ...\r\naliases:\r\n    build: \r\n        command: ./do-build.sh ${TARGET}\r\n        env:\r\n            - THIS_VAR\r\n            - THAT_VAR\r\n        \r\nenv:\r\n    - TARGET_ARCH\r\n    - COMPILE_MODE\r\n```\r\n\r\nNote that we'd probably need to change the alias syntax somewhat or allow another structure to place the `env` key.\r\n\r\nThis would add `-e THIS_VAR -e THAT_VAR` to the `docker run` command when using the `build` alias, and add `-e TARGET_ARCH -e COMPILE_MODE` in any case.\r\n\r\nDoes that make sense?\r\n"}}
{"actor":{"display_login":"mpdude"}}