Skip to content

Commit b27d3a1

Browse files
Rohooliojaklingermegan-bower4
authored
[Release 2024-04-16] (#179)
* [feature/PI-292-plop_prod_bulk_rebase] changes required for prod * [release/2024-04-10] create release * feature/PI-307-local_deploy_qa updated command and readme * feature/PI-307-local_deploy_qa fixed destroy * feature/PI-307-local_deploy_qa added readme extras * [release/2024-04-10] get apigee env from aws env, not workspace * [release/2024-04-10] use environment to retrieve apigee secret * feature/PI-213-connect_to_ldap squash commits * [feature/PI-311-account_wide_smoke_tests] smoke tests account wide * [feature/PI-311-account_wide_smoke_tests] rename ldap to hscn * feature/PI-311-account_wide_smoke_tests updated permissions * feature/PI-311-account_wide_smoke_tests added ref hscn endpoint & ldap connection infrastructure * release/2024-04-16 New release * release/2024-04-16 upgraded broken proxygen-cli version --------- Co-authored-by: Joel Klinger <[email protected]> Co-authored-by: megan-bower4 <[email protected]>
1 parent 728f6be commit b27d3a1

File tree

50 files changed

+1284
-419
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1284
-419
lines changed

.github/actions/components/caching/action.yml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,13 @@ inputs:
1818
default: |
1919
.venv
2020
.timestamp
21-
**/.terraform
22-
**/dist/*zip
23-
**/tfplan
24-
**/swagger.yaml
25-
**/infrastructure/terraform/**/output.json
2621
.downloads
27-
**/fhir/r4/*models.py
2822
.tool-versions
2923
pyproject.toml
3024
poetry.lock
31-
**/make.py
32-
**/infrastructure/swagger/*.yaml
33-
**/infrastructure/swagger/**/*.yaml
34-
**/fhir-base/*json
35-
**/.proxygen/*
25+
src
26+
infrastructure
27+
!**/.terraform/modules/**/*
3628
3729
runs:
3830
using: "composite"
@@ -50,6 +42,11 @@ runs:
5042
restore-keys: |
5143
${{ env.GITHUB_SHA_SHORT }}-${{ inputs.cache-suffix == '' && 'head' || inputs.cache-suffix }}
5244
45+
# # For debugging, uncomment the following:
46+
# - id: tree
47+
# shell: bash
48+
# run: tree -D -I '__pycache__|.git|.venv|.hypothesis|.pytest_cache'
49+
5350
- if: ${{ inputs.save-or-restore == 'save' }}
5451
id: save-cache
5552
uses: actions/cache/save@v3

.github/workflows/_deploy.yml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,26 +55,23 @@ jobs:
5555
- uses: actions/checkout@v4
5656
with:
5757
ref: ${{ needs.get-branch-from-workflow-file.outputs.branch_name }}
58-
- uses: ./.github/actions/make/
58+
- if: ${{ env.SCOPE == 'per_workspace'}}
59+
uses: ./.github/actions/make/
5960
with:
6061
command: build
6162
save-to-cache: "true"
6263
restore-from-cache: "false"
6364
cache-suffix: ${{ env.CACHE_NAME }}
64-
65-
helpers--truststore-pull:
66-
needs: [get-branch-from-workflow-file, build]
67-
runs-on: [self-hosted, ci]
68-
steps:
69-
- uses: actions/checkout@v4
70-
with:
71-
ref: ${{ needs.get-branch-from-workflow-file.outputs.branch_name }}
72-
- uses: ./.github/actions/make/
65+
- if: ${{ env.SCOPE != 'per_workspace'}}
66+
uses: ./.github/actions/make/
7367
with:
74-
command: helpers--truststore-pull WORKSPACE=${{ env.WORKSPACE }}
68+
command: poetry--update
69+
save-to-cache: "true"
70+
restore-from-cache: "false"
71+
cache-suffix: ${{ env.CACHE_NAME }}
7572

7673
terraform--init:
77-
needs: [get-branch-from-workflow-file, helpers--truststore-pull]
74+
needs: [get-branch-from-workflow-file, build]
7875
runs-on: [self-hosted, ci]
7976
steps:
8077
- uses: actions/checkout@v4
@@ -161,6 +158,7 @@ jobs:
161158
command: test--smoke
162159
workspace: ${{ env.WORKSPACE }}
163160
requires-aws: true
161+
restore-from-cache: "true"
164162
cache-suffix: ${{ env.CACHE_NAME }}
165163

166164
set-success:

.github/workflows/pull-requests.yml

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -112,25 +112,8 @@ jobs:
112112
with:
113113
command: test--feature--local
114114

115-
helpers--truststore-pull:
116-
runs-on: [self-hosted, ci]
117-
needs: [workflow--check--branch-name]
118-
steps:
119-
- uses: actions/checkout@v4
120-
with:
121-
ref: ${{ env.BRANCH_NAME }}
122-
- uses: ./.github/actions/make/
123-
with:
124-
command: helpers--truststore-pull WORKSPACE=ref
125-
126115
terraform-base-build:
127-
needs:
128-
[
129-
create-workspace-name,
130-
build-base,
131-
helpers--truststore-pull,
132-
parse-secrets,
133-
]
116+
needs: [create-workspace-name, build-base, parse-secrets]
134117
runs-on: [self-hosted, ci]
135118
steps:
136119
- uses: actions/checkout@v4
@@ -157,7 +140,6 @@ jobs:
157140
workflow--codebase-checks,
158141
test--unit,
159142
test--feature--local,
160-
helpers--truststore-pull,
161143
parse-secrets,
162144
terraform-base-build,
163145
]
@@ -233,6 +215,26 @@ jobs:
233215
command: test--feature--integration
234216
requires-aws: true
235217

218+
test--smoke:
219+
needs:
220+
[
221+
build-head,
222+
workflow--codebase-checks,
223+
test--unit,
224+
test--feature--local,
225+
terraform-head-build,
226+
apigee--deploy,
227+
]
228+
runs-on: [self-hosted, ci]
229+
steps:
230+
- uses: actions/checkout@v4
231+
with:
232+
ref: ${{ env.BRANCH_NAME }}
233+
- uses: ./.github/actions/make/
234+
with:
235+
command: test--smoke
236+
requires-aws: true
237+
236238
destroy-redundant-workspaces:
237239
runs-on: [self-hosted, ci]
238240
needs: [build-head]

.vscode/settings.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,21 @@
99
"editor.formatOnSave": true,
1010
"black-formatter.args": ["--line-length=88"],
1111
"cSpell.words": [
12+
"attrlist",
1213
"changetype",
14+
"filterstr",
15+
"firstchangenumber",
1316
"getbuffer",
17+
"hscn",
1418
"ldif",
19+
"ldifs",
20+
"NEWCTX",
1521
"nhsexternalchangelogentry",
1622
"NOSONAR",
1723
"objectclass",
1824
"popleft",
1925
"stepfunctions",
26+
"TRUSTSTORE",
2027
"unmarshall"
2128
],
2229
"sonarlint.connectedMode.project": {

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## 2024-04-16
4+
- [PI-311] Smoke tests
5+
- [PI-213] Connect to LDAP
6+
- [PI-222] Connect to LDAP via VPC endpoint
7+
38
## 2024-04-10
49
- [PI-307] Deploy user workspaces to qa environment
510
- [PI-292] Prod bulk data (SDS ETL)

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2024.04.10
1+
2024.04.16

changelog/2024-04-16.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
- [PI-311] Smoke tests
2+
- [PI-213] Connect to LDAP
3+
- [PI-222] Connect to LDAP via VPC endpoint

infrastructure/terraform/per_account/dev/main.tf

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,26 @@ module "bucket" {
4545
}
4646
}
4747

48+
module "truststore_bucket" {
49+
source = "terraform-aws-modules/s3-bucket/aws"
50+
version = "3.15.2"
51+
bucket = "${local.project}--${replace(terraform.workspace, "_", "-")}--truststore"
52+
force_destroy = true
53+
versioning = {
54+
enabled = true
55+
}
56+
tags = {
57+
Name = "${local.project}--${replace(terraform.workspace, "_", "-")}--truststore"
58+
}
59+
}
60+
61+
module "vpc" {
62+
source = "../modules/vpc"
63+
environment = terraform.workspace
64+
prefix = local.project
65+
}
66+
67+
4868
# -------- ROUTE 53 ---------
4969

5070
resource "aws_route53_zone" "dev-ns" {

infrastructure/terraform/per_account/dev/parameters/main.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,10 @@ resource "aws_secretsmanager_secret" "apigee-cpm-apikey" {
3838
resource "aws_secretsmanager_secret" "apigee-app-key" {
3939
name = "${terraform.workspace}-apigee-app-key"
4040
}
41+
resource "aws_secretsmanager_secret" "sds-hscn-endpoint" {
42+
name = "${terraform.workspace}-sds-hscn-endpoint"
43+
}
44+
45+
resource "aws_secretsmanager_secret" "ldap-host" {
46+
name = "${terraform.workspace}-ldap-host"
47+
}

infrastructure/terraform/per_account/mgmt/modules/route53/main.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ resource "aws_route53_record" "dev_zone" {
5454
zone_id = module.zones.route53_zone_zone_id["cpm.dev.national.nhs.uk"]
5555
name = "api.cpm.dev.national.nhs.uk"
5656
records = [
57-
"ns-81.awsdns-10.com.",
58-
"ns-1238.awsdns-26.org.",
59-
"ns-776.awsdns-33.net.",
60-
"ns-1540.awsdns-00.co.uk."
57+
"ns-821.awsdns-38.net.",
58+
"ns-1945.awsdns-51.co.uk.",
59+
"ns-366.awsdns-45.com.",
60+
"ns-1311.awsdns-35.org.",
6161
]
6262
ttl = 300
6363
type = "NS"

0 commit comments

Comments
 (0)