Skip to content

Commit ba3dd8c

Browse files
authored
Merge pull request #6175 from NHSDigital/next
2 parents 471ae17 + 1501d67 commit ba3dd8c

File tree

190 files changed

+4706
-1892
lines changed

Some content is hidden

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

190 files changed

+4706
-1892
lines changed

.github/workflows/build-and-push-image.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ jobs:
9999
- name: Save web image
100100
run: docker save -o image.tar mavis-webapp:latest
101101
- name: Upload web image
102-
uses: actions/upload-artifact@v6
102+
uses: actions/upload-artifact@v7
103103
with:
104104
name: webapp-image
105105
path: image.tar
@@ -108,7 +108,7 @@ jobs:
108108
- name: Save ops image
109109
run: docker save -o image.tar mavis-ops:latest
110110
- name: Upload ops image
111-
uses: actions/upload-artifact@v6
111+
uses: actions/upload-artifact@v7
112112
with:
113113
name: ops-image
114114
path: image.tar
@@ -123,7 +123,7 @@ jobs:
123123
image_type: ["webapp", "ops"]
124124
steps:
125125
- name: Download Docker image
126-
uses: actions/download-artifact@v7
126+
uses: actions/download-artifact@v8
127127
with:
128128
name: ${{ matrix.image_type }}-image
129129
- name: Configure AWS Credentials

.github/workflows/data-replication-pipeline.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ jobs:
131131
- name: Rename task definition file
132132
run: mv ${{ steps.create-task-definition.outputs.task-definition }} ${{ runner.temp }}/data-replication-task-definition.json
133133
- name: Upload artifact for data-replication task definition
134-
uses: actions/upload-artifact@v6
134+
uses: actions/upload-artifact@v7
135135
with:
136136
name: ${{ inputs.environment }}-data-replication-task-definition
137137
path: ${{ runner.temp }}/data-replication-task-definition.json
@@ -183,7 +183,7 @@ jobs:
183183
role-to-assume: ${{ env.aws_role }}
184184
aws-region: eu-west-2
185185
- name: Download data-replication task definition artifact
186-
uses: actions/download-artifact@v7
186+
uses: actions/download-artifact@v8
187187
with:
188188
path: ${{ runner.temp }}
189189
name: ${{ inputs.environment }}-data-replication-task-definition

.github/workflows/deploy.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ jobs:
134134
- name: Rename task definition file
135135
run: mv ${{ steps.create-task-definition.outputs.task-definition }} ${{ runner.temp }}/${{ matrix.service }}-task-definition.json
136136
- name: Upload artifact for ${{ matrix.service }} task definition
137-
uses: actions/upload-artifact@v6
137+
uses: actions/upload-artifact@v7
138138
with:
139139
name: ${{ inputs.environment }}-${{ matrix.service }}-task-definition
140140
path: ${{ runner.temp }}/${{ matrix.service }}-task-definition.json
@@ -186,7 +186,7 @@ jobs:
186186
role-to-assume: arn:aws:iam::${{ env.aws_account_id }}:role/GithubDeployECSService
187187
aws-region: eu-west-2
188188
- name: Download ops task definition artifact
189-
uses: actions/download-artifact@v7
189+
uses: actions/download-artifact@v8
190190
with:
191191
path: ${{ runner.temp }}
192192
name: ${{ inputs.environment }}-ops-task-definition
@@ -313,7 +313,7 @@ jobs:
313313
role-to-assume: arn:aws:iam::${{ env.aws_account_id }}:role/GithubDeployECSService
314314
aws-region: eu-west-2
315315
- name: Download ${{ matrix.service }} task definition artifact
316-
uses: actions/download-artifact@v7
316+
uses: actions/download-artifact@v8
317317
with:
318318
path: ${{ runner.temp }}
319319
name: ${{ inputs.environment }}-${{ matrix.service }}-task-definition
@@ -345,10 +345,10 @@ jobs:
345345
name: Notify deployment status
346346
runs-on: ubuntu-latest
347347
needs: [ deploy-service, run-migrations ]
348-
if: ${{ !cancelled() }}
348+
if: ${{ !cancelled() && inputs.environment == 'production' }}
349349
steps:
350350
- name: Notify deployment success
351-
if: ${{ env.environment == 'production' && needs.deploy-service.result == 'success' }}
351+
if: ${{ needs.deploy-service.result == 'success' }}
352352
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a
353353
with:
354354
webhook: ${{ secrets.SLACK_MAVIS_RELEASES_WEBHOOK_URL }}
@@ -361,7 +361,7 @@ jobs:
361361
type: "mrkdwn"
362362
text: "*${{ env.app_version }}* is deployed :ship:"
363363
- name: Notify deployment failure
364-
if: ${{ env.environment == 'production' && (needs.deploy-service.result == 'failure' || needs.run-migrations.result == 'failure') }}
364+
if: ${{ needs.deploy-service.result == 'failure' || needs.run-migrations.result == 'failure' }}
365365
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a
366366
with:
367367
webhook: ${{ secrets.SLACK_MAVIS_RELEASES_WEBHOOK_URL }}
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Set Slack Topics
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- release
7+
tags:
8+
- 'v*'
9+
workflow_dispatch:
10+
11+
jobs:
12+
get-tags:
13+
runs-on: ubuntu-latest
14+
outputs:
15+
release_tag: ${{ steps.get_tags.outputs.release_tag }}
16+
main_tag: ${{ steps.get_tags.outputs.main_tag }}
17+
steps:
18+
- name: Checkout code and fetch tags
19+
uses: actions/checkout@v6
20+
with:
21+
fetch-depth: 0
22+
- name: Get latest tags for branches
23+
id: get_tags
24+
run: |
25+
branches=("release" "main")
26+
for branch in "${branches[@]}"; do
27+
full_branch="origin/$branch"
28+
if ! git rev-parse --verify "$full_branch" >/dev/null 2>&1; then
29+
echo "Branch $branch does not exist."
30+
continue
31+
fi
32+
latest_tag=$(git tag --merged "$full_branch" | grep -p '^v\d+\.\d+\.\d+' | sort -V | tail -1)
33+
if [ -n "$latest_tag" ]; then
34+
echo "Latest tag on branch $branch: $latest_tag"
35+
echo "${branch}_tag=$latest_tag" >> $GITHUB_OUTPUT
36+
else
37+
echo "No semantic version tags found on branch $branch."
38+
fi
39+
done
40+
update-topics:
41+
needs: get-tags
42+
runs-on: ubuntu-latest
43+
steps:
44+
- name: Set next tag
45+
run: |
46+
CURRENT_VERSION=${{ needs.get-tags.outputs.main_tag }}
47+
major=${CURRENT_VERSION#v};
48+
major=${major%%.*};
49+
minor=${CURRENT_VERSION#v${major}.};
50+
minor=${minor%%.*};
51+
new_minor=$((minor+1));
52+
patch=${CURRENT_VERSION#v${major}.${minor}.};
53+
NEXT_VERSION=$(echo "v${major}.${new_minor}.${patch}")
54+
echo "next_tag=$NEXT_VERSION" >> $GITHUB_ENV
55+
- name: Create channel topic
56+
run: |
57+
TOPIC="release: ${{ needs.get-tags.outputs.release_tag }} - main: ${{ needs.get-tags.outputs.main_tag }} - next: $next_tag"
58+
echo "MAVIS_TECH_TOPIC=$TOPIC" >> $GITHUB_ENV
59+
- name: Update mavis tech channel topic
60+
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a
61+
with:
62+
method: conversations.setTopic
63+
token: ${{ secrets.MAVIS_DEPLOYMENT_BOT_OAUTH_TOKEN }}
64+
errors: true
65+
payload: |
66+
channel: ${{ secrets.MAVIS_TECH_CHANNEL_ID }}
67+
topic: "${{ env.MAVIS_TECH_TOPIC }}"

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,4 @@ dump.rdb
8989

9090
# Data that gets downloaded by CLI tools
9191
db/data/dfe-schools.zip
92-
db/data/nhs-gp-practices.zip
92+
db/data/nhs-gp-practices.csv

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ruby-4.0.0
1+
ruby-4.0.1

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ nodejs 22.15.0
44
pkl 0.28.1
55
postgres 17.2
66
redis 8.2.1
7-
ruby 4.0.0
7+
ruby 4.0.1

CONTRIBUTING.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Contributing
2+
3+
## Code reviews
4+
5+
All pull requests should be reviewed by another developer on the team before
6+
they can be merged in.
7+
8+
Don't be afraid to use "Request changes" when suggesting changes to a pull
9+
request. This helps to make it easier to filter in lists of pull requests
10+
which are still in need of a review, and the person who raised the pull
11+
request can still dismiss the review if they disagree.

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# check=error=true
33

44
# Make sure RUBY_VERSION matches the Ruby version in .ruby-version
5-
ARG RUBY_VERSION=4.0.0
5+
ARG RUBY_VERSION=4.0.1
66
ARG BUNDLE_WITHOUT="development:test"
77
ARG RAILS_ENV="production"
88
FROM docker.io/library/ruby:$RUBY_VERSION-slim AS base

Gemfile.lock

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,13 @@ GEM
128128
array_enum (1.6.0)
129129
activemodel
130130
asciidoctor (2.0.26)
131-
asciidoctor-diagram (3.1.0)
131+
asciidoctor-diagram (3.2.0)
132132
asciidoctor (>= 1.5.7, < 3.x)
133133
rexml
134134
ast (2.4.3)
135135
attr_required (1.0.2)
136136
aws-eventstream (1.4.0)
137-
aws-partitions (1.1219.0)
137+
aws-partitions (1.1220.0)
138138
aws-sdk-accessanalyzer (1.85.0)
139139
aws-sdk-core (~> 3, >= 3.241.4)
140140
aws-sigv4 (~> 1.5)
@@ -146,10 +146,10 @@ GEM
146146
bigdecimal
147147
jmespath (~> 1, >= 1.6.1)
148148
logger
149-
aws-sdk-ec2 (1.604.0)
149+
aws-sdk-ec2 (1.606.0)
150150
aws-sdk-core (~> 3, >= 3.241.4)
151151
aws-sigv4 (~> 1.5)
152-
aws-sdk-ecr (1.121.0)
152+
aws-sdk-ecr (1.122.0)
153153
aws-sdk-core (~> 3, >= 3.241.4)
154154
aws-sigv4 (~> 1.5)
155155
aws-sdk-iam (1.140.0)
@@ -178,7 +178,7 @@ GEM
178178
bindex (0.8.1)
179179
bootsnap (1.23.0)
180180
msgpack (~> 1.2)
181-
brakeman (8.0.2)
181+
brakeman (8.0.4)
182182
racc
183183
builder (3.3.0)
184184
capybara (3.40.0)
@@ -190,7 +190,7 @@ GEM
190190
rack-test (>= 0.6.3)
191191
regexp_parser (>= 1.5, < 3.0)
192192
xpath (~> 3.2)
193-
capybara-screenshot (1.0.26)
193+
capybara-screenshot (1.0.27)
194194
capybara (>= 1.0, < 4)
195195
launchy
196196
caxlsx (4.4.1)
@@ -279,14 +279,14 @@ GEM
279279
date_time_precision (>= 0.8)
280280
mime-types (>= 3.0)
281281
nokogiri (>= 1.11.4)
282-
flipper (1.3.6)
282+
flipper (1.4.0)
283283
concurrent-ruby (< 2)
284-
flipper-active_record (1.3.6)
284+
flipper-active_record (1.4.0)
285285
activerecord (>= 4.2, < 9)
286-
flipper (~> 1.3.6)
287-
flipper-ui (1.3.6)
286+
flipper (~> 1.4.0)
287+
flipper-ui (1.4.0)
288288
erubi (>= 1.0.0, < 2.0.0)
289-
flipper (~> 1.3.6)
289+
flipper (~> 1.4.0)
290290
rack (>= 1.4, < 4)
291291
rack-protection (>= 1.5.3, < 5.0.0)
292292
rack-session (>= 1.0.2, < 3.0.0)
@@ -476,7 +476,7 @@ GEM
476476
reline (>= 0.6.0)
477477
pry-rails (0.3.11)
478478
pry (>= 0.13.0)
479-
pstore (0.2.0)
479+
pstore (0.2.1)
480480
psych (5.3.1)
481481
date
482482
stringio
@@ -527,8 +527,8 @@ GEM
527527
activesupport (>= 5.0.0)
528528
minitest
529529
nokogiri (>= 1.6)
530-
rails-html-sanitizer (1.6.2)
531-
loofah (~> 2.21)
530+
rails-html-sanitizer (1.7.0)
531+
loofah (~> 2.25)
532532
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
533533
rails_semantic_logger (4.19.0)
534534
rack
@@ -585,7 +585,7 @@ GEM
585585
rspec-mocks (3.13.7)
586586
diff-lcs (>= 1.2.0, < 2.0)
587587
rspec-support (~> 3.13.0)
588-
rspec-rails (8.0.2)
588+
rspec-rails (8.0.3)
589589
actionpack (>= 7.2)
590590
activesupport (>= 7.2)
591591
railties (>= 7.2)
@@ -657,15 +657,15 @@ GEM
657657
securerandom (0.4.1)
658658
semantic_logger (4.17.0)
659659
concurrent-ruby (~> 1.0)
660-
sentry-rails (6.3.1)
660+
sentry-rails (6.4.1)
661661
railties (>= 5.2.0)
662-
sentry-ruby (~> 6.3.1)
663-
sentry-ruby (6.3.1)
662+
sentry-ruby (~> 6.4.1)
663+
sentry-ruby (6.4.1)
664664
bigdecimal
665665
concurrent-ruby (~> 1.0, >= 1.0.2)
666666
logger
667-
sentry-sidekiq (6.3.1)
668-
sentry-ruby (~> 6.3.1)
667+
sentry-sidekiq (6.4.1)
668+
sentry-ruby (~> 6.4.1)
669669
sidekiq (>= 5.0)
670670
shoulda-matchers (7.0.1)
671671
activesupport (>= 7.1)
@@ -917,7 +917,7 @@ DEPENDENCIES
917917
with_advisory_lock
918918

919919
RUBY VERSION
920-
ruby 4.0.0
920+
ruby 4.0.1
921921

922922
BUNDLED WITH
923923
4.0.3

0 commit comments

Comments
 (0)