jorgebastida/gordon

how to share settings.xml

ahl opened this issue · 1 comments

ahl commented

I used gordon (love it!) to build a little project that I wanted to share, but realized that I'd need users to edit settings.yml to update the code-bucket or else gordon apply would fail (because S3 has a shared namespace). I did something gross to work around this:

$ echo gordon-project-$(date +%s) >code-bucket
$ grep code-bucket settings.yml
code-bucket: !!python/object/apply:subprocess.check_output [[perl, -pe, 's/\n//', code-bucket]]

Is there a better mechanism for this?

Perhaps an alternative would be to allow code-bucket-file as an alternative or some sort of import syntax to allow private settings to reside elsewhere.

ahl commented

Answering my own question:

Tests already do this in a pretty clever way, with ref:// variables and the common.yml file:

mkdir parameters
echo CodeBucketName: gordon-project-$(date +%s) >parameters/common.yml

Then set code-bucket to ref://CodeBucketName.