Skip to content

Commit

Permalink
feat(stats): Adds stat collection (staging instance) to the nightly b…
Browse files Browse the repository at this point in the history
…uild. (#4883)
  • Loading branch information
Travis Tomsu committed Sep 12, 2019
1 parent fe82485 commit 31a9d10
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions dev/validate_bom__config.py
Expand Up @@ -45,6 +45,8 @@

import logging
import os
import random
import string

from buildtool import (
add_parser_argument,
Expand Down Expand Up @@ -1554,6 +1556,19 @@ def add_config(self, options, script):
script.append('echo "{}" > ~/.hal/default/profiles/gate-local.yml'.format(hystrix_config))
script.append('echo "{}" > ~/.hal/default/profiles/front50-local.yml'.format(hystrix_config))

# Good enough ULID impl for our purposes.
fake_ulid = ''.join(random.choice(string.ascii_uppercase + string.digits)
for _ in range(26))
telemetry_config = '''\
telemetry:
enabled: true
endpoint: https://stats-staging.spinnaker.io
instanceId: {}
spinnakerVersion: {}
'''.format(fake_ulid, options.deploy_version)

script.append('echo "{}" > ~/.hal/default/profiles/echo-local.yml'.format(telemetry_config))

if options.halyard_profile_dir:
# Unpack the tar file into halyard's defualt profile directory.
script.extend([
Expand Down

0 comments on commit 31a9d10

Please sign in to comment.