Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,13 @@ trim_trailing_whitespace = unset
indent_style = unset
indent_size = unset
generated_code = true

[*.sln]
generated_code = true
charset = unset
end_of_line = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
indent_style = unset
indent_size = unset
generated_code = true
49 changes: 49 additions & 0 deletions .github/actions/build-libraries/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: "Build libraries"
description: "build libraries"
inputs:
version:
description: "Version number"
required: true
runs:
using: "composite"
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24

- name: Npm install
working-directory: .
run: npm ci
shell: bash

- name: Build servers
working-directory: ./src/server
shell: bash
run: |
make build VERSION="${{ inputs.version }}"

- name: Upload abstractions artifact
uses: actions/upload-artifact@v4
with:
path: "src/server/abstractions/bin/Release"
name: libs-abstractions-${{ inputs.version }}

- name: Upload data artifact
uses: actions/upload-artifact@v4
with:
path: "src/server/data/bin/Release"
name: libs-data-${{ inputs.version }}

- name: Upload letter artifact
uses: actions/upload-artifact@v4
with:
path: "src/server/letter/bin/Release"
name: libs-letter-${{ inputs.version }}

- name: Upload host artifact
uses: actions/upload-artifact@v4
with:
path: "src/server/host/bin/Release"
name: libs-host-${{ inputs.version }}
2 changes: 1 addition & 1 deletion .github/actions/build-server/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ runs:
run: |
make build VERSION="${{ inputs.version }}"

- name: Upload csharp-server artifact
- name: Upload csharp-server artifact
uses: actions/upload-artifact@v4
with:
path: "server/csharp-server"
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/stage-3-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,18 @@ jobs:
with:
version: "${{ inputs.version }}"

artefact-libs:
name: "Build libs"
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- name: "Checkout code"
uses: actions/checkout@v4
- name: "Build servers"
uses: ./.github/actions/build-libraries
with:
version: "${{ inputs.version }}"

# artefact-1:
# name: "Artefact 1"
# runs-on: ubuntu-latest
Expand Down
55 changes: 55 additions & 0 deletions .github/workflows/stage-5-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -351,3 +351,58 @@ jobs:
message-title: "Notification title"
message-text: "This is a notification body"
link: ${{ github.event.pull_request.html_url }}


### PUBLISH LIBS ABSTRACTION NUGET
publishlibsabstractionsnuget:
name: "Publish libs abstractions packages to nuget.pkg.github.com"
runs-on: ubuntu-latest
needs: [publish]
permissions:
packages: write
contents: read
steps:
- name: "Get the artefacts"
uses: actions/download-artifact@v4
with:
path: .
name: libs-abstractions-${{ inputs.version }}
- run: ls -la
- run: |
dotnet nuget add source \
--username nhs-notify-supplier-api \
--password ${{ secrets.GITHUB_TOKEN }} \
--store-password-in-clear-text \
--name github \
"https://nuget.pkg.github.com/NHSDigital/index.json"
- run: |
echo "ROOT .version file is: $(cat .version)"
echo "GH variable version is: ${{ inputs.version }}"
name: Showing the base versions

- run: |
VERSION=${{ inputs.version }}
SHORT_VERSION="$(echo $VERSION | rev | cut -d"." -f2- | rev)"
NUGET_VERSION="$(echo "$VERSION" | tr + .)"
echo $VERSION
echo $SHORT_VERSION
echo $NUGET_VERSION
SHORT_NUGET_VERSION="$(echo $NUGET_VERSION | rev | cut -d"." -f2- | rev)"
echo $SHORT_NUGET_VERSION
SHORTER_NUGET_VERSION="$(echo $SHORT_NUGET_VERSION | rev | cut -d"." -f2- | rev)"
echo $SHORTER_NUGET_VERSION
TEST_NUGET_VERSION="$(echo $NUGET_VERSION | sed -E 's/.([^.]*)$/\1/')"
TEST_NUGET_VERSION="$(echo $TEST_NUGET_VERSION | sed -E 's/.([^.]*)$/\1/')"
echo $TEST_NUGET_VERSION
echo "TEST_NUGET_VERSION=$TEST_NUGET_VERSION" >> "$GITHUB_OUTPUT"
name: Set the nuget version
id: set-nuget-version

- run: |
dotnet nuget push \
nhs.notify.suppliers.api.abstractions.${TEST_NUGET_VERSION}.nupkg \
--source github \
--api-key $GITHUB_TOKEN
env:
TEST_NUGET_VERSION: ${{ steps.set-nuget-version.outputs.TEST_NUGET_VERSION }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions .gitleaksignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ b1f85a7faf54eaf66074d7a6daa093aefe6b3ebe:sdk/python/pyproject.toml:ipv4:25
4118582e5009685c1ac31fc664371649602a8a0e:specification/api/notify-supplier-next.yml:generic-api-key:119
28aa8bcf42e1af50ab2541a345be851b53dd0f00:specification/api/notify-supplier-next.yml:generic-api-key:119
28aa8bcf42e1af50ab2541a345be851b53dd0f00:specification/api/notify-supplier.yml:generic-api-key:115
93e54b6baa390529aab08d9fd956837f7bb3f30:src/src.sln:ipv4:3
493e54b6baa390529aab08d9fd956837f7bb3f30:src/src.sln:ipv4:3
1 change: 1 addition & 0 deletions infrastructure/terraform/components/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ No requirements.
| <a name="input_parent_acct_environment"></a> [parent\_acct\_environment](#input\_parent\_acct\_environment) | Name of the environment responsible for the acct resources used, affects things like DNS zone. Useful for named dev environments | `string` | `"main"` | no |
| <a name="input_project"></a> [project](#input\_project) | The name of the tfscaffold project | `string` | n/a | yes |
| <a name="input_region"></a> [region](#input\_region) | The AWS Region | `string` | n/a | yes |
| <a name="input_shared_infra_account_id"></a> [shared\_infra\_account\_id](#input\_shared\_infra\_account\_id) | The AWS Account ID of the shared infrastructure account | `string` | `"000000000000"` | no |
## Modules

| Name | Source | Version |
Expand Down
3 changes: 2 additions & 1 deletion scripts/config/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ repos:
exclude: |
(?x)^(
sdk/.* |
someotherdir/.*
someotherdir/.* |
src/server/host/Properties/launchSettings.json
)$

# - id: ...
Expand Down
Loading
Loading