Skip to content

Commit 683d325

Browse files
Merge branch 'main' into dependabot/github_actions/actions/cache-5
2 parents 4d038c2 + d046728 commit 683d325

12 files changed

Lines changed: 3015 additions & 8651 deletions

File tree

.devcontainer/Dockerfile

Lines changed: 50 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,24 @@
1-
FROM mcr.microsoft.com/devcontainers/base:ubuntu
1+
FROM mcr.microsoft.com/devcontainers/base:ubuntu-22.04
2+
3+
ARG TARGETARCH
4+
ENV TARGETARCH=${TARGETARCH}
5+
6+
# Install essential packages first
7+
RUN apt-get update && apt-get install -y \
8+
curl \
9+
wget \
10+
git \
11+
sudo \
12+
unzip \
13+
&& apt-get clean \
14+
&& rm -rf /var/lib/apt/lists/*
15+
16+
# Copy ASDF version file
17+
ARG ASDF_VERSION
18+
COPY .tool-versions.asdf /tmp/.tool-versions.asdf
19+
20+
# Add amd64 architecture if on arm64
21+
RUN if [ "$TARGETARCH" == "arm64" ] || [ "$TARGETARCH" == "aarch64" ]; then dpkg --add-architecture amd64; fi
222

323
RUN apt-get update \
424
&& export DEBIAN_FRONTEND=noninteractive \
@@ -9,33 +29,42 @@ RUN apt-get update \
929
jq apt-transport-https ca-certificates gnupg-agent \
1030
software-properties-common bash-completion python3-pip make libbz2-dev \
1131
libreadline-dev libsqlite3-dev wget llvm libncurses5-dev libncursesw5-dev \
12-
xz-utils tk-dev liblzma-dev netcat-traditional libyaml-dev
32+
xz-utils tk-dev liblzma-dev netcat-traditional libyaml-dev uuid-runtime xxd unzip
1333

1434
# install aws stuff
15-
RUN wget -O /tmp/awscliv2.zip "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" && \
35+
# Download correct AWS CLI for arch
36+
RUN if [ "$TARGETARCH" = "arm64" ] || [ "$TARGETARCH" == "aarch64" ]; then \
37+
wget -O /tmp/awscliv2.zip "https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip"; \
38+
else \
39+
wget -O /tmp/awscliv2.zip "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip"; \
40+
fi && \
1641
unzip /tmp/awscliv2.zip -d /tmp/aws-cli && \
1742
/tmp/aws-cli/aws/install && \
18-
rm tmp/awscliv2.zip && \
19-
rm -rf /tmp/aws-cli
43+
rm /tmp/awscliv2.zip && rm -rf /tmp/aws-cli
2044

21-
RUN wget -O /tmp/aws-sam-cli.zip https://github.com/aws/aws-sam-cli/releases/latest/download/aws-sam-cli-linux-x86_64.zip && \
22-
unzip /tmp/aws-sam-cli.zip -d /tmp/aws-sam-cli && \
23-
/tmp/aws-sam-cli/install && \
24-
rm /tmp/aws-sam-cli.zip && \
25-
rm -rf /tmp/aws-sam-cli
45+
# Install ASDF
46+
RUN ASDF_VERSION=$(awk '!/^#/ && NF {print $1; exit}' /tmp/.tool-versions.asdf) && \
47+
if [ "$TARGETARCH" = "arm64" ] || [ "$TARGETARCH" == "aarch64" ]; then \
48+
wget -O /tmp/asdf.tar.gz "https://github.com/asdf-vm/asdf/releases/download/v${ASDF_VERSION}/asdf-v${ASDF_VERSION}-linux-arm64.tar.gz"; \
49+
else \
50+
wget -O /tmp/asdf.tar.gz "https://github.com/asdf-vm/asdf/releases/download/v${ASDF_VERSION}/asdf-v${ASDF_VERSION}-linux-amd64.tar.gz"; \
51+
fi && \
52+
tar -xzf /tmp/asdf.tar.gz -C /tmp && \
53+
mkdir -p /usr/bin && \
54+
mv /tmp/asdf /usr/bin/asdf && \
55+
chmod +x /usr/bin/asdf && \
56+
rm -rf /tmp/asdf.tar.gz
2657

2758
USER vscode
2859

29-
# Install ASDF
30-
RUN git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.0; \
31-
echo '. $HOME/.asdf/asdf.sh' >> ~/.bashrc; \
32-
echo '. $HOME/.asdf/completions/asdf.bash' >> ~/.bashrc; \
60+
ENV PATH="/home/vscode/.asdf/shims/:$PATH:/workspaces/eps-loadtest/node_modules/.bin"
61+
RUN \
62+
echo 'PATH="/home/vscode/.asdf/shims/:$PATH:/workspaces/eps-loadtest/node_modules/.bin"' >> ~/.bashrc; \
63+
echo '. <(asdf completion bash)' >> ~/.bashrc; \
3364
echo '# Install Ruby Gems to ~/gems' >> ~/.bashrc; \
3465
echo 'export GEM_HOME="$HOME/gems"' >> ~/.bashrc; \
3566
echo 'export PATH="$HOME/gems/bin:$PATH"' >> ~/.bashrc;
3667

37-
ENV PATH="$PATH:/home/vscode/.asdf/bin/:/workspaces/eps-prescription-status-update-api/node_modules/.bin"
38-
3968

4069
# Install ASDF plugins
4170
RUN asdf plugin add python; \
@@ -47,12 +76,10 @@ RUN asdf plugin add python; \
4776
asdf plugin add ruby https://github.com/asdf-vm/asdf-ruby.git
4877

4978

50-
WORKDIR /workspaces/eps-prescription-status-update-api
51-
ADD .tool-versions /workspaces/eps-prescription-status-update-api/.tool-versions
79+
WORKDIR /workspaces/eps-loadtest
80+
ADD .tool-versions /workspaces/eps-loadtest/.tool-versions
5281
ADD .tool-versions /home/vscode/.tool-versions
5382

54-
RUN asdf install; \
55-
asdf reshim python; \
56-
asdf reshim poetry; \
57-
asdf reshim nodejs; \
58-
asdf direnv setup --shell bash --version 2.32.2;
83+
# install python before poetry to ensure correct python version is used
84+
RUN asdf install python; \
85+
asdf install

.github/workflows/release_psu_to_ref.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
echo "## psuWorkflowRunID : [${{ github.event.inputs.psuWorkflowRunID }}](https://github.com/NHSDigital/eps-prescription-status-update-api/actions/runs/${{ github.event.inputs.psuWorkflowRunID }})" >> "$GITHUB_STEP_SUMMARY"
2222
2323
- name: Checkout local github actions
24-
uses: actions/checkout@v4
24+
uses: actions/checkout@v6
2525
with:
2626
ref: ${{ env.BRANCH_NAME }}
2727
fetch-depth: 0
@@ -50,7 +50,7 @@ jobs:
5050

5151
# using git commit sha for version of action to ensure we have stable version
5252
- name: Install asdf
53-
uses: asdf-vm/actions/setup@1902764435ca0dd2f3388eea723a4f92a4eb8302
53+
uses: asdf-vm/actions/setup@b7bcd026f18772e44fe1026d729e1611cc435d47
5454
with:
5555
asdf_branch: v0.11.3
5656

@@ -64,7 +64,7 @@ jobs:
6464
${{ runner.os }}-asdf-
6565
6666
- name: Install asdf dependencies in .tool-versions
67-
uses: asdf-vm/actions/install@1902764435ca0dd2f3388eea723a4f92a4eb8302
67+
uses: asdf-vm/actions/install@b7bcd026f18772e44fe1026d729e1611cc435d47
6868
with:
6969
asdf_branch: v0.11.3
7070
env:

.github/workflows/run_cpsu_load.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ jobs:
4242
echo "## maxVusers : ${{ github.event.inputs.maxVusers }}" >> "$GITHUB_STEP_SUMMARY"
4343
4444
- name: Checkout repo
45-
uses: actions/checkout@v4
45+
uses: actions/checkout@v6
4646
with:
4747
ref: ${{ env.BRANCH_NAME }}
4848

4949
- name: Install asdf
50-
uses: asdf-vm/actions/setup@1902764435ca0dd2f3388eea723a4f92a4eb8302
50+
uses: asdf-vm/actions/setup@b7bcd026f18772e44fe1026d729e1611cc435d47
5151
with:
5252
asdf_branch: v0.14.0
5353

@@ -61,7 +61,7 @@ jobs:
6161
${{ runner.os }}-asdf-
6262
6363
- name: Install asdf dependencies in .tool-versions
64-
uses: asdf-vm/actions/install@1902764435ca0dd2f3388eea723a4f92a4eb8302
64+
uses: asdf-vm/actions/install@b7bcd026f18772e44fe1026d729e1611cc435d47
6565
with:
6666
asdf_branch: v0.14.0
6767
env:

.github/workflows/run_notify_load.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ jobs:
5151
fi
5252
5353
- name: Checkout repo
54-
uses: actions/checkout@v4
54+
uses: actions/checkout@v6
5555
with:
5656
ref: ${{ env.BRANCH_NAME }}
5757

5858
- name: Install asdf
59-
uses: asdf-vm/actions/setup@05e0d2ed97b598bfce82fd30daf324ae0c4570e6
59+
uses: asdf-vm/actions/setup@b7bcd026f18772e44fe1026d729e1611cc435d47
6060
with:
6161
asdf_branch: v0.14.0
6262

@@ -70,7 +70,7 @@ jobs:
7070
${{ runner.os }}-asdf-
7171
7272
- name: Install asdf dependencies in .tool-versions
73-
uses: asdf-vm/actions/install@05e0d2ed97b598bfce82fd30daf324ae0c4570e6
73+
uses: asdf-vm/actions/install@b7bcd026f18772e44fe1026d729e1611cc435d47
7474
with:
7575
asdf_branch: v0.14.0
7676
env:

.github/workflows/run_psu_load.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ jobs:
4242
echo "## maxVusers : ${{ github.event.inputs.maxVusers }}" >> "$GITHUB_STEP_SUMMARY"
4343
4444
- name: Checkout repo
45-
uses: actions/checkout@v4
45+
uses: actions/checkout@v6
4646
with:
4747
ref: ${{ env.BRANCH_NAME }}
4848

4949
- name: Install asdf
50-
uses: asdf-vm/actions/setup@1902764435ca0dd2f3388eea723a4f92a4eb8302
50+
uses: asdf-vm/actions/setup@b7bcd026f18772e44fe1026d729e1611cc435d47
5151
with:
5252
asdf_branch: v0.14.0
5353

@@ -61,7 +61,7 @@ jobs:
6161
${{ runner.os }}-asdf-
6262
6363
- name: Install asdf dependencies in .tool-versions
64-
uses: asdf-vm/actions/install@1902764435ca0dd2f3388eea723a4f92a4eb8302
64+
uses: asdf-vm/actions/install@b7bcd026f18772e44fe1026d729e1611cc435d47
6565
with:
6666
asdf_branch: v0.14.0
6767
env:

.tool-versions

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
nodejs 20.10.0
2-
python 3.12.2
3-
poetry 1.8.2
1+
nodejs 24.12.0
2+
python 3.14.2
3+
poetry 2.2.1
44
shellcheck 0.9.0
55
direnv 2.32.2
66
actionlint 1.6.26

.tool-versions.asdf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# define the .asdf-version to use here
2+
0.18.0

0 commit comments

Comments
 (0)