Skip to content

Commit

Permalink
fix(google): Handle domain names in project names. (#1509)
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Wiseblatt committed Mar 27, 2017
1 parent bc76ca1 commit e89f2a8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion etc/default/spinnaker
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ function __get_google_metadata_value() {

function __determine_default_bucket() {
if [[ ! -z "${SPINNAKER_GOOGLE_PROJECT_ID}" ]]; then
echo "spinnaker-${SPINNAKER_GOOGLE_PROJECT_ID//google.com:/}"
# dot and colon are not valid bucket characters
# however they are valid project id names (e.g. google.com:)
# so replace those bad chars with '-'
echo "spinnaker-${SPINNAKER_GOOGLE_PROJECT_ID}" | tr ".:" "--"
else
echo ""
fi
Expand Down

0 comments on commit e89f2a8

Please sign in to comment.