File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 9
9
def fastly_purge (* args ):
10
10
"Purge items from Fastly, eg \" /one,/two,/three\" . Wildcards not supported."
11
11
govuk_fastly = 'http://www-gov-uk.map.fastly.net'
12
- hostnames_to_purge = ['www.gov.uk' , 'assets.digital.cabinet-office.gov.uk' ]
12
+ if env .environment == 'production' :
13
+ hostnames_to_purge = ['www.gov.uk' , 'assets.digital.cabinet-office.gov.uk' ]
14
+ elif env .environment == 'staging' :
15
+ # FIXME - Staging Fastly service should point to non alphagov.co.uk
16
+ # domains and amended here after the miration to Carrenza
17
+ hostnames_to_purge = ['www.staging.alphagov.co.uk' , 'assets.staging.alphagov.co.uk' ]
18
+
13
19
for path in args :
14
20
if "*" in path :
15
21
abort ("Sorry, purging paths containing wildcards is not supported "
Original file line number Diff line number Diff line change @@ -231,21 +231,25 @@ def help(name):
231
231
@task
232
232
def production ():
233
233
"""Select production environment"""
234
+ env ['environment' ] = 'production'
234
235
_set_gateway ('production.alphagov.co.uk' )
235
236
236
237
@task
237
238
def production_migration ():
238
239
"""Select production migration environment"""
240
+ env ['environment' ] = 'production'
239
241
_set_gateway ('publishing.service.gov.uk' )
240
242
241
243
@task
242
244
def staging ():
243
245
"""Select staging environment"""
246
+ env ['environment' ] = 'staging'
244
247
_set_gateway ('staging.publishing.service.gov.uk' )
245
248
246
249
@task
247
250
def preview ():
248
251
"""Select preview environment"""
252
+ env ['environment' ] = 'preview'
249
253
_set_gateway ('preview.alphagov.co.uk' )
250
254
251
255
@task
You can’t perform that action at this time.
0 commit comments