Skip to content

Commit

Permalink
fix(google_front50_test): Default bucket and base path from test bind…
Browse files Browse the repository at this point in the history
…ings. (#1528)
  • Loading branch information
jtk54 authored and Eric Wiseblatt committed Apr 3, 2017
1 parent 7efa73a commit 888d4d3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
4 changes: 3 additions & 1 deletion dev/hal_k8s_run.sh
Expand Up @@ -84,7 +84,9 @@ hal config provider kubernetes account add my-k8s-account \
hal config provider google enable
hal config provider google account add my-gce-account \
--json-path /supporting_data/build.json --project $BUILD_PROJECT
hal config storage edit --account-name my-gce-account

# Uses default root-folder 'spinnaker' implicitly.
hal config storage edit --account-name my-gce-account --bucket $GCS_BUCKET

hal config deploy edit --type distributed --account-name my-k8s-account
hal deploy run
Expand Down
10 changes: 8 additions & 2 deletions testing/citest/tests/google_front50_test.py
Expand Up @@ -49,6 +49,12 @@ def initArgumentParser(cls, parser, defaults=None):
parser.add_argument(
'--gcs_json_path', default='',
help='The path to the Google Cloud Storage service credentials JSON file.')
parser.add_argument(
'--gcs_bucket', default='',
help="The name of the Google Cloud Storage bucket to use, e.g. 'spinnaker-bucket'.")
parser.add_argument(
'--gcs_base_path', default='',
help="The root folder in the specified Google Cloud Storage bucket to place all of Spinnaker's persistent data.")

super(GoogleFront50TestScenario, cls).initArgumentParser(
parser, defaults=defaults)
Expand All @@ -61,8 +67,8 @@ def _do_init_bindings(self):
if not enabled:
raise ValueError('spinnaker.gcs.enabled is not True')

self.BUCKET = config['spinnaker.gcs.bucket']
self.BASE_PATH = config['spinnaker.gcs.rootFolder']
self.BUCKET = self.bindings['GCS_BUCKET'] or config['spinnaker.gcs.bucket']
self.BASE_PATH = config['spinnaker.gcs.rootFolder'] or self.bindings['GCS_BASE_PATH']
self.TEST_APP = self.bindings['TEST_APP']
self.TEST_PIPELINE_NAME = 'My {app} Pipeline'.format(app=self.TEST_APP)
self.TEST_PIPELINE_ID = '{app}-pipeline-id'.format(app=self.TEST_APP)
Expand Down

0 comments on commit 888d4d3

Please sign in to comment.