Skip to content

Commit 01bed26

Browse files
committed
Add environments and tidy
1 parent e4cc8d4 commit 01bed26

File tree

2 files changed

+6
-86
lines changed

2 files changed

+6
-86
lines changed

.github/workflows/deploy-backend.yml

Lines changed: 5 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ on:
2222
type: choice
2323
description: Select the Apigee proxy environment
2424
options:
25-
- internal-dev # Add rest later
25+
- internal-dev
26+
- int
27+
- ref
28+
- prod
2629
create_mns_subscription:
2730
description: Create an MNS Subscription. Only available in dev
2831
required: false
@@ -34,6 +37,7 @@ on:
3437
options:
3538
- dev
3639
- preprod
40+
- prod
3741
sub_environment:
3842
type: string
3943
description: Set the sub environment name e.g. pr-xxx, or green/blue in higher environments
@@ -71,7 +75,6 @@ jobs:
7175
- name: Terraform Plan
7276
working-directory: ${{ vars.TERRAFORM_DIR_PATH }}
7377
run: make plan apigee_environment=${{ inputs.apigee_environment }} environment=${{ inputs.environment }} sub_environment=${{ inputs.sub_environment }}
74-
# TODO - save the plan and use it in the apply step
7578

7679
terraform-apply:
7780
needs: terraform-plan
@@ -125,86 +128,3 @@ jobs:
125128
poetry install --no-root
126129
echo "Subscribing SQS to MNS for notifications..."
127130
make subscribe
128-
# TODO - replace with modular e2e test workflow
129-
# e2e-tests:
130-
# if: ${{ vars.RUN_E2E == 'true' && inputs.sub_environment == vars.ACTIVE_ENVIRONMENT }}
131-
# needs: terraform-apply
132-
# runs-on: ubuntu-latest
133-
# permissions:
134-
# id-token: write
135-
# contents: read
136-
# steps:
137-
# - name: Checkout
138-
# uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
139-
140-
# - uses: aws-actions/configure-aws-credentials@7474bc4690e29a8392af63c5b98e7449536d5c3a
141-
# with:
142-
# aws-region: eu-west-2
143-
# role-to-assume: arn:aws:iam::${{ vars.AWS_ACCOUNT_ID }}:role/auto-ops
144-
# role-session-name: github-actions
145-
146-
# - uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
147-
# with:
148-
# terraform_version: "1.12.2"
149-
150-
# - name: Terraform Init
151-
# working-directory: ${{ vars.TERRAFORM_DIR_PATH }}
152-
# run: make init apigee_environment=${{ inputs.apigee_environment }} environment=${{ inputs.environment }} sub_environment=${{ inputs.sub_environment }}
153-
154-
# - name: Set up Python
155-
# uses: actions/setup-python@v5
156-
# with:
157-
# python-version: "3.11"
158-
159-
# - name: Install Poetry
160-
# run: |
161-
# curl -sSL https://install.python-poetry.org | python3 - --version 2.1.4
162-
# echo "$HOME/.local/bin" >> $GITHUB_PATH
163-
# poetry --version
164-
165-
# - name: Set Poetry to use Python 3.11
166-
# working-directory: ${{ vars.E2E_DIR_PATH }}
167-
# run: |
168-
# poetry env use $(which python3.11)
169-
170-
# - name: Install dependencies with Poetry
171-
# working-directory: ${{ vars.E2E_DIR_PATH }}
172-
# run: |
173-
# poetry install --no-root
174-
175-
# - name: Install oathtool
176-
# run: sudo apt-get update && sudo apt-get install -y oathtool
177-
178-
# - name: Get JWT token for apigee
179-
# env:
180-
# APIGEE_USERNAME: ${{ vars.APIGEE_USERNAME }}
181-
# APIGEE_PASSWORD: ${{ secrets.APIGEE_PASSWORD }}
182-
# APIGEE_OAUTH_TOKEN: ${{ secrets.APIGEE_BASIC_AUTH_TOKEN }}
183-
# APIGEE_OTP_SECRET: ${{ secrets.APIGEE_OTP_KEY }}
184-
# run: |
185-
# CODE=$(oathtool --totp -b "$APIGEE_OTP_SECRET")
186-
# echo "::add-mask::$CODE"
187-
# echo "Requesting access token from Apigee..."
188-
# response=$(curl -s -X POST "https://login.apigee.com/oauth/token" \
189-
# -H "Content-Type: application/x-www-form-urlencoded" \
190-
# -H "Accept: application/json;charset=utf-8" \
191-
# -H "Authorization: Basic $APIGEE_BASIC_AUTH_TOKEN" \
192-
# -d "username=$APIGEE_USERNAME&password=$APIGEE_PASSWORD&mfa_token=$CODE&grant_type=password")
193-
# token=$(echo "$response" | jq -e -r '.access_token')
194-
# if [[ -z "$token" ]]; then
195-
# echo "Failed to retrieve access token"
196-
# exit 1
197-
# fi
198-
# echo "::add-mask::$token"
199-
# echo "APIGEE_ACCESS_TOKEN=$token" >> $GITHUB_ENV
200-
201-
# - name: Run e2e tests
202-
# working-directory: ${{ vars.E2E_DIR_PATH }}
203-
# env:
204-
# APIGEE_ACCESS_TOKEN: ${{ env.APIGEE_ACCESS_TOKEN }}
205-
# APIGEE_USERNAME: [email protected]
206-
# run: |
207-
# export APIGEE_ENVIRONMENT=internal-dev
208-
# export PROXY_NAME=immunisation-fhir-api-${{ inputs.sub_environment }}
209-
# export SERVICE_BASE_PATH=immunisation-fhir-api/FHIR/R4-${{ inputs.sub_environment }}
210-
# make run-immunization

terraform/id_sync_lambda.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Define the directory containing the Docker image and calculate its SHA-256 hash for triggering redeployments
22
locals {
3-
id_sync_lambda_dir = abspath("${path.root}/../id_sync")
3+
id_sync_lambda_dir = abspath("${path.root}/../lambdas/id_sync")
44

55
id_sync_lambda_files = fileset(local.id_sync_lambda_dir, "**")
66

0 commit comments

Comments
 (0)