File tree Expand file tree Collapse file tree 6 files changed +39
-16
lines changed
Expand file tree Collapse file tree 6 files changed +39
-16
lines changed Original file line number Diff line number Diff line change 66 apigee_environment :
77 required : true
88 type : string
9+ create_mns_subscription :
10+ required : false
11+ type : boolean
12+ default : true
913 environment :
1014 required : true
1115 type : string
1923 description : Select the Apigee proxy environment
2024 options :
2125 - internal-dev # Add rest later
26+ create_mns_subscription :
27+ description : Create an MNS Subscription. Only available in dev
28+ required : false
29+ type : boolean
30+ default : true
2231 environment :
2332 type : string
2433 description : Select the backend environment
@@ -93,7 +102,24 @@ jobs:
93102 - name : Terraform Apply
94103 working-directory : ${{ vars.TERRAFORM_DIR_PATH }}
95104 run : make apply apigee_environment=${{ inputs.apigee_environment }} environment=${{ inputs.environment }} sub_environment=${{ inputs.sub_environment }}
96- # TODO - use a saved plan from the plan step
105+
106+ - name : Install poetry
107+ if : ${{ inputs.environment == 'dev' && inputs.create_mns_subscription }}
108+ run : pip install poetry==2.1.4
109+
110+ - uses : actions/setup-python@v5
111+ if : ${{ inputs.environment == 'dev' && inputs.create_mns_subscription }}
112+ with :
113+ python-version : 3.11
114+ cache : ' poetry'
115+
116+ - name : Create MNS Subscription
117+ if : ${{ inputs.environment == 'dev' && inputs.create_mns_subscription }}
118+ working-directory : ' ./lambdas/mns_subscription'
119+ run : |
120+ poetry install --no-root
121+ echo "Subscribing SQS to MNS for notifications..."
122+ make subscribe
97123 # TODO - replace with modular e2e test workflow
98124 # e2e-tests:
99125 # if: ${{ vars.RUN_E2E == 'true' && inputs.sub_environment == vars.ACTIVE_ENVIRONMENT }}
Original file line number Diff line number Diff line change @@ -41,13 +41,16 @@ build-proxy:
4141 scripts/build_proxy.sh
4242
4343# Files to loop over in release
44- _dist_include ="pytest.ini poetry.lock poetry.toml pyproject.toml Makefile build/. specification sandbox terraform scripts $(PYTHON_PROJECT_DIRS ) $(PYTHON_LAMBDA_DEPENDENCIES ) "
44+ # VED-811: remove everything except for proxy related files as we move to Github Actions for backend deployment
45+ _dist_include ="pytest.ini poetry.lock poetry.toml pyproject.toml Makefile build/. specification sandbox terraform scripts"
4546
4647
4748# Create /dist/ sub-directory and copy files into directory
49+ # Ensure full dir structure is preserved for Lambdas
4850release : clean publish build-proxy
4951 mkdir -p dist
5052 for f in $( _dist_include) ; do cp -r $$ f dist; done
53+ for f in $( PYTHON_PROJECT_DIRS) ; do cp --parents -r $$ f dist; done
5154 cp ecs-proxies-deploy.yml dist/ecs-deploy-sandbox.yml
5255 cp ecs-proxies-deploy.yml dist/ecs-deploy-internal-qa-sandbox.yml
5356 cp ecs-proxies-deploy.yml dist/ecs-deploy-internal-dev-sandbox.yml
Original file line number Diff line number Diff line change 9393 echo "Subscribing SQS to MNS for notifications..."
9494 make subscribe
9595 displayName: "Run MNS Subscription"
96- workingDirectory: "$(Pipeline.Workspace)/s/$(SERVICE_NAME)/$(SERVICE_ARTIFACT_NAME)/mns_subscription"
96+ workingDirectory: "$(Pipeline.Workspace)/s/$(SERVICE_NAME)/$(SERVICE_ARTIFACT_NAME)/lambdas/ mns_subscription"
9797 env:
9898 SQS_ARN: "$(ID_SYNC_QUEUE_ARN)"
9999
Original file line number Diff line number Diff line change @@ -42,9 +42,10 @@ module "id_sync_docker_image" {
4242
4343 platform = " linux/amd64"
4444 use_image_tag = false
45- source_path = abspath (" ${ path . root } /.." )
45+ source_path = abspath (" ${ path . root } /../lambdas " )
4646 triggers = {
47- dir_sha = local.id_sync_lambda_dir_sha
47+ dir_sha = local.id_sync_lambda_dir_sha
48+ shared_dir_sha = local.shared_dir_sha
4849 }
4950}
5051
Original file line number Diff line number Diff line change @@ -22,11 +22,3 @@ output "id_sync_queue_arn" {
2222 description = " The ARN of the created SQS queue"
2323 value = aws_sqs_queue. id_sync_queue . arn
2424}
25-
26- output "lambdas_dir_abs_path" {
27- value = local. id_sync_lambda_dir
28- }
29-
30- output "lambdas_dir_normal" {
31- value = " ${ local . id_sync_lambda_dir } /id_sync"
32- }
Original file line number Diff line number Diff line change 11# Define the directory containing the Docker image and calculate its SHA-256 hash for triggering redeployments
22locals {
3- redis_sync_lambda_dir = abspath (" ${ path . root } /../redis_sync" )
3+ redis_sync_lambda_dir = abspath (" ${ path . root } /../lambdas/ redis_sync" )
44
55 redis_sync_lambda_files = fileset (local. redis_sync_lambda_dir , " **" )
66
@@ -42,9 +42,10 @@ module "redis_sync_docker_image" {
4242
4343 platform = " linux/amd64"
4444 use_image_tag = false
45- source_path = abspath (" ${ path . root } /.." )
45+ source_path = abspath (" ${ path . root } /../lambdas " )
4646 triggers = {
47- dir_sha = local.redis_sync_lambda_dir_sha
47+ dir_sha = local.redis_sync_lambda_dir_sha
48+ shared_dir_sha = local.shared_dir_sha
4849 }
4950}
5051
You can’t perform that action at this time.
0 commit comments