File tree Expand file tree Collapse file tree 8 files changed +47
-12
lines changed
Expand file tree Collapse file tree 8 files changed +47
-12
lines changed Original file line number Diff line number Diff line change @@ -17,22 +17,25 @@ jobs:
1717 matrix :
1818 include :
1919 - service : api
20- script_params : api-1 api api frontend v9
20+ script_params : api-1 api frontend v9
2121 skip : false
2222 - service : attribution
23- script_params : attribution attribution attribution backend v9
23+ script_params : attribution attribution backend v9
2424 skip : false
2525 - service : aggregation
26- script_params : aggregation aggregation aggregation backend v9
26+ script_params : aggregation aggregation backend v9
2727 skip : false
2828 - service : web
29- script_params : web-v2-1 web web frontend v9
29+ script_params : web-v2-1 web frontend v9
3030 skip : ${{ inputs.env == 'prod' }}
3131 - service : admin
32- script_params : web-admin-1 web-admin web-admin frontend v9
32+ script_params : web-admin-1 web-admin frontend v9
3333 skip : ${{ inputs.env == 'prod' }}
34- - service : portal
35- script_params : web-portal-1 dpc-portal web-portal frontend v9
34+ - service : web-portal
35+ script_params : web-portal-1 web-portal frontend v9
36+ skip : ${{ inputs.env == 'prod' || inputs.env == 'sandbox' }}
37+ - service : async-portal
38+ script_params : none async-portal frontend v9
3639 skip : ${{ inputs.env == 'prod' || inputs.env == 'sandbox' }}
3740 steps :
3841 - name : " Checkout code"
Original file line number Diff line number Diff line change 11web: bundle exec rails server -b 0.0.0.0 -p 3100
2+ solidqueue: bundle exec rails solid_queue:start
23cpigw: env PORT=4567 ruby spec/support/fake_cpi_gateway.rb
Original file line number Diff line number Diff line change 1+ solidqueue: bundle exec rails solid_queue:start
2+ cpigw: env PORT=4567 ruby spec/support/fake_cpi_gateway.rb
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env sh
2+
3+ echo " Testing removal of foreman log prefix (should be json)"
4+ export LOG_STR=' 06:21:25 web.1 | {"level": "debug", "time": "blahblahblah"}'
5+ export EVERYTHING_AFTER_PIPE_REGEX=' s/[^|]*|//'
6+ echo $LOG_STR | sed $EVERYTHING_AFTER_PIPE_REGEX
7+
8+ echo " Starting Procfile.nonprod_async"
9+ exec foreman start -f Procfile.nonprod_async " $@ " | sed $EVERYTHING_AFTER_PIPE_REGEX
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ class Application < Rails::Application
2727
2828 config . active_support . to_time_preserves_timezone = :zone
2929 config . active_job . queue_adapter = :solid_queue
30+ config . solid_queue . supervisor_pidfile = 'tmp/solid_queue_pidfile'
3031
3132 # Ensure mailer jobs get sent to a specialized queue.
3233 config . action_mailer . deliver_later_queue_name = "portal"
Original file line number Diff line number Diff line change 4343
4444# Allow puma to be restarted by `bin/rails restart` command.
4545plugin :tmp_restart
46- plugin :solid_queue
Original file line number Diff line number Diff line change 66if [ -f tmp/pids/server.pid ]; then
77 rm tmp/pids/server.pid
88fi
9+ if [ -f tmp/solid_queue_pidfile ]; then
10+ echo " Removing solid queue pidfile"
11+ rm tmp/solid_queue_pidfile
12+ fi
913
1014if [ " $1 " == " portal" ]; then
1115 # Start the database service (and make accessible outside the Docker container)
@@ -24,4 +28,14 @@ if [ "$1" == "portal" ]; then
2428 echo " Starting in non-production"
2529 ./bin/nonprod
2630 fi
31+ elif [ " $1 " == " async" ]; then
32+ echo " Starting Solid Queue..."
33+ if [[ " $ENV " == " production" ]]; then
34+ echo " Starting in production"
35+ bundle exec rails solid_queue:start
36+ # For local, SolidQueue starts in same container
37+ elif [[ " $ENV " != " local" ]]; then
38+ echo " Starting in non-production"
39+ ./bin/nonprod_async
40+ fi
2741fi
Original file line number Diff line number Diff line change @@ -4,11 +4,11 @@ set -euxo pipefail
44
55ENV=" $1 " # env
66TARGET_GROUP=" dpc-${ENV} -${2} " # target
7- SVC_NAME=" dpc-${ENV} -${4 } " # service
8- CLUSTER_NAME=" dpc-${ENV} -${5 } " # cluster
9- SVC_VERSION=" $6 " # service version
7+ SVC_NAME=" dpc-${ENV} -${3 } " # service
8+ CLUSTER_NAME=" dpc-${ENV} -${4 } " # cluster
9+ SVC_VERSION=" $5 " # service version
1010
11- if [ $7 == ' true' ]; then
11+ if [ $6 == ' true' ]; then
1212 echo " Skipping $SVC_NAME "
1313 exit 0
1414fi
@@ -80,6 +80,12 @@ echo "ECS service ${SVC_NAME}-${SVC_VERSION} stable"
8080echo " ---"
8181echo " 1. Checking for existing Target Group: $TARGET_GROUP "
8282
83+ if [ $2 == " none" ]; then
84+ echo " Skipping Target Group Check as no Target Group defined"
85+ echo " Deployment successful and application layer confirmed healthy."
86+ exit 0
87+ fi
88+
8389set +e
8490TARGET_GROUP_ARN=$( aws elbv2 describe-target-groups \
8591 --names " $TARGET_GROUP " \
You can’t perform that action at this time.
0 commit comments