Sync code from release instead of git repo #96
Conversation
@@ -54,7 +55,7 @@ resources: | |||
scanner-bucket: SCANNER_BUCKET | |||
database-name: forseti_security | |||
organization-id: YOUR_ORG_ID | |||
src-path: https://github.com/GoogleCloudPlatform/forseti-security | |||
src-path: https://github.com/GoogleCloudPlatform/forseti-security/archive/v1.0.tar.gz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can the src-path be dynamic based on the version in the properties. Which could be set to HEAD to get current repo, or a specific version to get that release?
Slightly off-topic, it would be nice if the release included the compiled protos so protoc wouldn't be required when running a release version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll revisit the dynamic src-path and see if I can get that working with another PR. I'll also see if I can get the compiled protos in the release, in that PR.
@@ -128,8 +129,8 @@ def GenerateConfig(context): | |||
pip install --upgrade setuptools | |||
|
|||
cd $USER_HOME | |||
git clone {} | |||
cd forseti-security | |||
wget -qO- {} | tar xvz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be cleaner if the format() string used named identifiers for the variables instead of relying on positional arguments.
So something like:
startup_script_config = {'forseti-version': context.properties['forseti-version'], ...}
"""
...
wget -q0- {forseti-version} | tar xvz
...
""".format(**startup_script_config)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I'll create a followup PR for that.
Adding |
No description provided.