Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IMP] Add env var expansion for repo.yml #5

Closed
wants to merge 3 commits into from

Conversation

lasley
Copy link
Contributor

@lasley lasley commented Jan 14, 2017

  • Expand environment variables in repo.yml before use

My use case being a dynamic odoo version, which interestingly enough could also work for module branches too.

* Expand environment variables in repo.yml before use
Copy link
Contributor

@yajo yajo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't you think PR for gitaggregator would be better?

@@ -11,6 +11,7 @@ conf=/opt/odoo/custom/src/repos.yaml
if [ -f $conf ]; then
log INFO Aggregating repositories from $conf
cd $(dirname $conf)
echo $(eval echo $(cat $conf)) > $conf
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better use envsubst, like with conf files.

@lasley
Copy link
Contributor Author

lasley commented Jan 19, 2017

Don't you think PR for gitaggregator would be better?

Env vars seem a bit more on the side of the system configuration vs. a CLI tool IMO, but I could be wrong. TBH this is the first I've heard of the tool, so I'm not sure of a use case outside of this one. If you think I should submit that way though, I don't have any problems with it.

TIL with envsubst - not sure how I've gone this long in life without needing it! Updated.

@lasley lasley force-pushed the feature/env-expand-repos-yml branch from ee31dd1 to f27c8a9 Compare January 19, 2017 00:12
Normally at devel time the volume will be mounted readonly, so no chance to write there.
@yajo
Copy link
Contributor

yajo commented Jan 19, 2017

I added a little fix, but there's still a problem: this would break the scaffolding's setup-devel step.

We could either support this also in tecnativa/git-aggregator or you could propose this PR to upstream.

@lasley
Copy link
Contributor Author

lasley commented Jan 21, 2017

Hrmmm alright so out of the choice of git-aggregator Docker container vs. library, library is probably best. Seems like the feature would get buried in the container & be an unexpected feature.

PR in acsone/git-aggregator#8

@lasley lasley closed this Jan 21, 2017
@lasley lasley deleted the feature/env-expand-repos-yml branch January 21, 2017 01:46
@yajo
Copy link
Contributor

yajo commented Jan 23, 2017

Nice, I merged acsone/git-aggregator#8 in our fork's master branch, so you have it in https://hub.docker.com/r/tecnativa/git-aggregator and will have it in this image too after the next rebuild (should be done in 30 mins)

@lasley
Copy link
Contributor Author

lasley commented Jan 23, 2017

Hooray thanks @yajo! This feature should help me quite a bit 😄

pedrobaeza pushed a commit that referenced this pull request Feb 3, 2019
Apply #165 in scaffolding. See it for details.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants