@@ -326,40 +326,27 @@ jobs:
326
326
fi
327
327
328
328
dev_deploy :
329
- strategy :
330
- matrix :
331
- include :
332
- - deployment : fsd-form-runner-adapter
333
- command : svc
334
- appname : " form-runner-adapter"
335
- - deployment : fsd-form-designer-adapter
336
- command : svc
337
- appname : " form-designer-adapter"
329
+ needs : [ setup, docker-designer-build, docker-runner-build ]
330
+ if : ${{ always() && contains(fromJSON(needs.setup.outputs.jobs_to_run), 'dev') && (! contains(needs.*.result, 'failure') ) && (! contains(needs.*.result, 'cancelled') ) }}
338
331
permissions :
339
332
id-token : write # This is required for requesting the JWT
340
333
contents : read # This is required for actions/checkout
341
- needs : [ setup, docker-designer-build, docker-runner-build ]
342
- if : ${{ always() && contains(fromJSON(needs.setup.outputs.jobs_to_run), 'dev') && (! contains(needs.*.result, 'failure') ) && (! contains(needs.*.result, 'cancelled') ) }}
343
- runs-on : ubuntu-latest
344
- environment : dev
345
- steps :
346
- - name : Git clone the repository
347
- uses : actions/checkout@v4
348
-
349
- - name : Setup Copilot
350
- uses : communitiesuk/funding-service-design-workflows/.github/actions/copilot_setup@main
351
- with :
352
- environment : dev
353
- AWS_ACCOUNT : ${{ secrets.AWS_ACCOUNT }}
354
-
355
- - name : Inject env specific values into manifest
356
- run : |
357
- yq -i '.variables.GITHUB_SHA = "${{ github.sha }}"' copilot/${{ matrix.deployment }}/manifest.yml
358
- yq -i '.image.location = "ghcr.io/communitiesuk/funding-service-design-${{ matrix.appname }}:sha-${{ github.sha }}"' copilot/${{ matrix.deployment }}/manifest.yml
359
-
360
- - name : Copilot deploy ${{ matrix.deployment }}
361
- run : |
362
- copilot ${{ matrix.command }} deploy --name ${{ matrix.deployment }}
334
+ strategy :
335
+ matrix :
336
+ include :
337
+ - appname : " form-runner-adapter"
338
+ image_location : ghcr.io/communitiesuk/funding-service-design-form-runner-adapter:sha-${{ github.sha }}
339
+ - appname : " form-designer-adapter"
340
+ image_location : ghcr.io/communitiesuk/funding-service-design-form-designer-adapter:sha-${{ github.sha }}
341
+ uses : communitiesuk/funding-service-design-workflows/.github/workflows/standard-deploy.yml@main
342
+ secrets :
343
+ AWS_ACCOUNT : ${{ secrets.AWS_ACCOUNT }}
344
+ with :
345
+ environment : dev
346
+ app_name : ${{ matrix.appname }}
347
+ run_db_migrations : false
348
+ image_location : ${{ matrix.image_location }}
349
+ notify_slack : false
363
350
364
351
post_dev_deploy_tests :
365
352
needs : [ setup, docker-designer-build, docker-runner-build, dev_deploy ]
@@ -381,42 +368,32 @@ jobs:
381
368
run_zap_scan : true
382
369
app_name : forms
383
370
environment : dev
371
+ notify_slack : false
384
372
385
373
test_deploy :
386
- strategy :
387
- matrix :
388
- include :
389
- - deployment : fsd-form-runner-adapter
390
- command : svc
391
- appname : " form-runner-adapter"
392
- - deployment : fsd-form-designer-adapter
393
- command : svc
394
- appname : " form-designer-adapter"
374
+ needs : [ setup, docker-designer-build, docker-runner-build, dev_deploy, post_dev_deploy_tests ]
375
+ if : ${{ always() && contains(fromJSON(needs.setup.outputs.jobs_to_run), 'test') && (! contains(needs.*.result, 'failure') ) && (! contains(needs.*.result, 'cancelled') ) }}
395
376
permissions :
396
377
id-token : write # This is required for requesting the JWT
397
378
contents : read # This is required for actions/checkout
398
- needs : [ setup, docker-designer-build, docker-runner-build, dev_deploy, post_dev_deploy_tests ]
399
- if : ${{ always() && contains(fromJSON(needs.setup.outputs.jobs_to_run), 'test') && (! contains(needs.*.result, 'failure') ) && (! contains(needs.*.result, 'cancelled') ) }}
400
- runs-on : ubuntu-latest
401
- environment : test
402
- steps :
403
- - name : Git clone the repository
404
- uses : actions/checkout@v4
405
-
406
- - name : Setup Copilot
407
- uses : communitiesuk/funding-service-design-workflows/.github/actions/copilot_setup@main
408
- with :
409
- environment : test
410
- AWS_ACCOUNT : ${{ secrets.AWS_ACCOUNT }}
411
-
412
- - name : Inject env specific values into manifest
413
- run : |
414
- yq -i '.variables.GITHUB_SHA = "${{ github.sha }}"' copilot/${{ matrix.deployment }}/manifest.yml
415
- yq -i '.image.location = "ghcr.io/communitiesuk/funding-service-design-${{ matrix.appname }}:sha-${{ github.sha }}"' copilot/${{ matrix.deployment }}/manifest.yml
416
-
417
- - name : Copilot deploy ${{ matrix.deployment }}
418
- run : |
419
- copilot ${{ matrix.command }} deploy --name ${{ matrix.deployment }}
379
+ strategy :
380
+ matrix :
381
+ include :
382
+ - appname : " form-runner-adapter"
383
+ image_location : ghcr.io/communitiesuk/funding-service-design-form-runner-adapter:sha-${{ github.sha }}
384
+ - appname : " form-designer-adapter"
385
+ image_location : ghcr.io/communitiesuk/funding-service-design-form-designer-adapter:sha-${{ github.sha }}
386
+ uses : communitiesuk/funding-service-design-workflows/.github/workflows/standard-deploy.yml@main
387
+ secrets :
388
+ AWS_ACCOUNT : ${{ secrets.AWS_ACCOUNT }}
389
+ SLACK_BOT_TOKEN : ${{ secrets.SLACK_BOT_TOKEN }}
390
+ SLACK_NOTIFICATION_CHANNEL_ID : ${{ secrets.SLACK_NOTIFICATION_CHANNEL_ID }}
391
+ with :
392
+ environment : test
393
+ app_name : ${{ matrix.appname }}
394
+ run_db_migrations : false
395
+ image_location : ${{ matrix.image_location }}
396
+ notify_slack : true
420
397
421
398
post_test_deploy_tests :
422
399
needs : [ setup, docker-designer-build, docker-runner-build, dev_deploy, test_deploy ]
@@ -431,6 +408,8 @@ jobs:
431
408
FS_BASIC_AUTH_USERNAME : ${{ secrets.FS_BASIC_AUTH_USERNAME }}
432
409
FS_BASIC_AUTH_PASSWORD : ${{ secrets.FS_BASIC_AUTH_PASSWORD }}
433
410
AWS_ACCOUNT : ${{ secrets.AWS_ACCOUNT }}
411
+ SLACK_BOT_TOKEN : ${{ secrets.SLACK_BOT_TOKEN }}
412
+ SLACK_NOTIFICATION_CHANNEL_ID : ${{ secrets.SLACK_NOTIFICATION_CHANNEL_ID }}
434
413
uses : communitiesuk/funding-service-design-workflows/.github/workflows/post-deploy.yml@main
435
414
with :
436
415
run_performance_tests : ${{ inputs.run_performance_tests || true }}
@@ -440,39 +419,25 @@ jobs:
440
419
run_zap_scan : true
441
420
app_name : forms
442
421
environment : test
443
-
422
+ notify_slack : true
423
+
444
424
uat_deploy :
445
- strategy :
446
- matrix :
447
- include :
448
- - deployment : fsd-form-runner-adapter
449
- command : svc
450
- appname : " form-runner-adapter"
425
+ needs : [ setup, docker-designer-build, docker-runner-build, dev_deploy, test_deploy, post_test_deploy_tests ]
426
+ if : ${{ always() && contains(fromJSON(needs.setup.outputs.jobs_to_run), 'uat') && (! contains(needs.*.result, 'failure') ) && (! contains(needs.*.result, 'cancelled') ) }}
451
427
permissions :
452
428
id-token : write # This is required for requesting the JWT
453
429
contents : read # This is required for actions/checkout
454
- needs : [ setup, docker-designer-build, docker-runner-build, dev_deploy, test_deploy, post_test_deploy_tests ]
455
- if : ${{ always() && contains(fromJSON(needs.setup.outputs.jobs_to_run), 'uat') && (! contains(needs.*.result, 'failure') ) && (! contains(needs.*.result, 'cancelled') ) }}
456
- runs-on : ubuntu-latest
457
- environment : uat
458
- steps :
459
- - name : Git clone the repository
460
- uses : actions/checkout@v4
461
-
462
- - name : Setup Copilot
463
- uses : communitiesuk/funding-service-design-workflows/.github/actions/copilot_setup@main
464
- with :
465
- environment : uat
466
- AWS_ACCOUNT : ${{ secrets.AWS_ACCOUNT }}
467
-
468
- - name : Inject env specific values into manifest
469
- run : |
470
- yq -i '.variables.GITHUB_SHA = "${{ github.sha }}"' copilot/${{ matrix.deployment }}/manifest.yml
471
- yq -i '.image.location = "ghcr.io/communitiesuk/funding-service-design-${{ matrix.appname }}:sha-${{ github.sha }}"' copilot/${{ matrix.deployment }}/manifest.yml
472
-
473
- - name : Copilot deploy ${{ matrix.deployment }}
474
- run : |
475
- copilot ${{ matrix.command }} deploy --name ${{ matrix.deployment }}
430
+ uses : communitiesuk/funding-service-design-workflows/.github/workflows/standard-deploy.yml@main
431
+ secrets :
432
+ AWS_ACCOUNT : ${{ secrets.AWS_ACCOUNT }}
433
+ SLACK_BOT_TOKEN : ${{ secrets.SLACK_BOT_TOKEN }}
434
+ SLACK_NOTIFICATION_CHANNEL_ID : ${{ secrets.SLACK_NOTIFICATION_CHANNEL_ID }}
435
+ with :
436
+ environment : uat
437
+ app_name : form-runner-adapter
438
+ run_db_migrations : false
439
+ image_location : ghcr.io/communitiesuk/funding-service-design-form-runner-adapter:sha-${{ github.sha }}
440
+ notify_slack : true
476
441
477
442
post_uat_deploy_tests :
478
443
needs : [ setup, docker-designer-build, docker-runner-build, dev_deploy, test_deploy, uat_deploy ]
@@ -486,6 +451,8 @@ jobs:
486
451
FS_BASIC_AUTH_USERNAME : ${{ secrets.FS_BASIC_AUTH_USERNAME }}
487
452
FS_BASIC_AUTH_PASSWORD : ${{ secrets.FS_BASIC_AUTH_PASSWORD }}
488
453
AWS_ACCOUNT : ${{ secrets.AWS_ACCOUNT }}
454
+ SLACK_BOT_TOKEN : ${{ secrets.SLACK_BOT_TOKEN }}
455
+ SLACK_NOTIFICATION_CHANNEL_ID : ${{ secrets.SLACK_NOTIFICATION_CHANNEL_ID }}
489
456
uses : communitiesuk/funding-service-design-workflows/.github/workflows/post-deploy.yml@main
490
457
with :
491
458
run_performance_tests : ${{ inputs.run_performance_tests || true }}
@@ -495,37 +462,23 @@ jobs:
495
462
run_zap_scan : true
496
463
app_name : forms
497
464
environment : uat
465
+ notify_slack : true
498
466
499
467
prod_deploy :
500
- strategy :
501
- matrix :
502
- include :
503
- - deployment : fsd-form-runner-adapter
504
- command : svc
505
- appname : " form-runner-adapter"
468
+ needs : [ setup, docker-designer-build, docker-runner-build, dev_deploy, test_deploy, uat_deploy, post_uat_deploy_tests ]
469
+ if : ${{ always() && contains(fromJSON(needs.setup.outputs.jobs_to_run), 'prod') && (! contains(needs.*.result, 'failure') ) && (! contains(needs.*.result, 'cancelled') ) }}
506
470
permissions :
507
471
id-token : write # This is required for requesting the JWT
508
472
contents : read # This is required for actions/checkout
509
- needs : [ setup, docker-designer-build, docker-runner-build, dev_deploy, test_deploy, uat_deploy, post_uat_deploy_tests ]
510
- if : ${{ always() && contains(fromJSON(needs.setup.outputs.jobs_to_run), 'prod') && (! contains(needs.*.result, 'failure') ) && (! contains(needs.*.result, 'cancelled') ) }}
511
- runs-on : ubuntu-latest
512
- environment : prod
513
- steps :
514
- - name : Git clone the repository
515
- uses : actions/checkout@v4
516
-
517
- - name : Setup Copilot
518
- uses : communitiesuk/funding-service-design-workflows/.github/actions/copilot_setup@main
519
- with :
520
- environment : prod
521
- AWS_ACCOUNT : ${{ secrets.AWS_ACCOUNT }}
522
-
523
- - name : Inject env specific values into manifest
524
- run : |
525
- yq -i '.variables.GITHUB_SHA = "${{ github.sha }}"' copilot/${{ matrix.deployment }}/manifest.yml
526
- yq -i '.image.location = "ghcr.io/communitiesuk/funding-service-design-${{ matrix.appname }}:sha-${{ github.sha }}"' copilot/${{ matrix.deployment }}/manifest.yml
527
-
528
- - name : Copilot deploy ${{ matrix.deployment }}
529
- run : |
530
- copilot ${{ matrix.command }} deploy --name ${{ matrix.deployment }}
473
+ uses : communitiesuk/funding-service-design-workflows/.github/workflows/standard-deploy.yml@main
474
+ secrets :
475
+ AWS_ACCOUNT : ${{ secrets.AWS_ACCOUNT }}
476
+ SLACK_BOT_TOKEN : ${{ secrets.SLACK_BOT_TOKEN }}
477
+ SLACK_NOTIFICATION_CHANNEL_ID : ${{ secrets.SLACK_NOTIFICATION_CHANNEL_ID }}
478
+ with :
479
+ environment : prod
480
+ app_name : form-runner-adapter
481
+ run_db_migrations : false
482
+ image_location : ghcr.io/communitiesuk/funding-service-design-form-runner-adapter:sha-${{ github.sha }}
483
+ notify_slack : true
531
484
0 commit comments