Skip to content

Commit 3313427

Browse files
committed
Add new Integration environment
The new 'Integration' environment will soon replace 'Preview'; add support for it so that we can start running Fabric scripts against it. I'd added a FIXME to remove the code for Preview once we've migrated away from that environment.
1 parent 664f526 commit 3313427

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

fabfile.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,14 @@ def staging():
249249
_set_gateway('staging.publishing.service.gov.uk')
250250

251251

252+
@task
253+
def integration():
254+
"""Select integration environment"""
255+
env['environment'] = 'integration'
256+
_set_gateway('integration.publishing.service.gov.uk')
257+
258+
259+
# FIXME: Remove once Preview environment is deleted
252260
@task
253261
def preview():
254262
"""Select preview environment"""

nagios.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ def submit_nagios_cmd(command):
1414

1515
def _monitoring_hostname(host):
1616
"""Returns the canonical name (according to our monitoring) for a host"""
17-
if env['environment'] == 'preview':
17+
if env['environment'] == 'production':
18+
return "{0}.publishing.service.gov.uk".format(host)
19+
elif env['environment'] == 'preview': # FIXME: Remove once Preview is deleted
1820
return "%s.production" % host
19-
elif env['environment'] == 'staging':
20-
return "{0}.staging.publishing.service.gov.uk".format(host)
2121
else:
22-
return "{0}.publishing.service.gov.uk".format(host)
22+
return "{0}.{1}.publishing.service.gov.uk".format(host, env['environment'])
2323

2424

2525
@task

0 commit comments

Comments
 (0)