Skip to content

VED-810 (Child of VED-720) Standalone deploy Github Action to deploy backend#851

Merged
dlzhry2nhs merged 11 commits intomasterfrom
feature/VED-810-backend-deploy-pipeline
Sep 29, 2025
Merged

VED-810 (Child of VED-720) Standalone deploy Github Action to deploy backend#851
dlzhry2nhs merged 11 commits intomasterfrom
feature/VED-810-backend-deploy-pipeline

Conversation

@dlzhry2nhs
Copy link
Copy Markdown
Contributor

@dlzhry2nhs dlzhry2nhs commented Sep 25, 2025

Summary

  • New Feature

This purpose of this PR is to introduce a standalone Github Actions workflow to deploy the Imms Backend in isolation. However, some further changes were required outside of this scope and are outlined below.

Main Change

  • New Deploy Backend pipeline added. It can be reused by other workflows or run manually with parameters. The intention is that our new release pipeline & PR pipeline (next ticket) could use it to deploy the environments. While when deploying to preprod or prod, we could run this manually.
  • Higher environments will be gated with only the Github Admins permitted to check and run the pipeline.
  • It will execute a terraform plan, apply and set up the MNS subscription if applicable (i.e. dev environments).

Testing - it will not be possible to run manually from the Github UI until this is merged to master. However, the manual workflow_dispatch can be triggered using the Github CLI with the following command: gh workflow run "Deploy Backend" --ref feature/VED-810-backend-deploy-pipeline -f apigee_environment=internal-dev -f environment=dev -f sub_environment=pr-851

You can see the output here: https://github.com/NHSDigital/immunisation-fhir-api/actions/runs/18036125997

Additional changes
All additional changes described in more detail here: https://screening-discovery.slack.com/archives/C08AVB8MEBG/p1758813738227159

  • Terraform would not run successfully locally or in Github because we keep the directory structure but the Lambdas in the lambda/ directory do not have their paths aligned in the terraform definition. What happens is everything was being flattened when preparing the files for the Azure DevOps pipeline. I have ensured the structure is maintained so it will work in both Azure and GH Actions. In future, we will be removing anything not relating to the proxy from Azure DevOps anyway.
  • On inspecting the artifacts, it turned out we were uploading a massive 7-8MB file that was part of the backend tests. Removed and replaced with a more sensible testing approach.

Reviews Required

  • Dev

Review Checklist

ℹ️ This section is to be filled in by the reviewer.

  • I have reviewed the changes in this PR and they fill all or part of the acceptance criteria of the ticket, and the code is in a mergeable state.
  • If there were infrastructure, operational, or build changes, I have made sure there is sufficient evidence that the changes will work.
  • I have ensured the changelog has been updated by the submitter, if necessary.

@github-actions
Copy link
Copy Markdown
Contributor

This branch is working on a ticket in the NHS England VED JIRA Project. Here's a handy link to the ticket:

VED-810

Comment thread .github/workflows/deploy-backend.yml Fixed
Comment thread .github/workflows/deploy-backend.yml Fixed
Comment thread .github/workflows/deploy-backend.yml Fixed
Comment thread .github/workflows/deploy-backend.yml Fixed
Comment thread .github/workflows/deploy-backend.yml Fixed
Comment thread .github/workflows/deploy-backend.yml Fixed
Comment thread .github/workflows/deploy-backend.yml Fixed
Comment thread .github/workflows/deploy-backend.yml Fixed
Comment thread .github/workflows/deploy-backend.yml Fixed
Comment thread .github/workflows/deploy-backend.yml Fixed
@dlzhry2nhs dlzhry2nhs marked this pull request as ready for review September 26, 2025 13:18
Comment thread .github/workflows/deploy-backend.yml Fixed
Comment thread .github/workflows/deploy-backend.yml Fixed
Comment thread .github/workflows/deploy-backend.yml Fixed
Comment thread .github/workflows/deploy-backend.yml Fixed
Comment thread .github/workflows/deploy-backend.yml Fixed
Comment thread .github/workflows/deploy-backend.yml Fixed
Comment thread .github/workflows/deploy-backend.yml Fixed
Comment thread .github/workflows/deploy-backend.yml Fixed
Comment thread .github/workflows/deploy-backend.yml Fixed
Comment thread .github/workflows/deploy-backend.yml Fixed
Comment thread .github/workflows/deploy-backend.yml
Comment thread .github/workflows/deploy-backend.yml Fixed
Comment thread .github/workflows/deploy-backend.yml Fixed
Comment thread .github/workflows/deploy-backend.yml Fixed
@dlzhry2nhs dlzhry2nhs force-pushed the feature/VED-810-backend-deploy-pipeline branch from bfd93fb to b062415 Compare September 26, 2025 13:44
@dlzhry2nhs dlzhry2nhs changed the title VED-810 Standalone deploy Github Action to deploy backend VED-810 (Child of VED-720) Standalone deploy Github Action to deploy backend Sep 26, 2025
@sonarqubecloud
Copy link
Copy Markdown

@dlzhry2nhs
Copy link
Copy Markdown
Contributor Author

Pre-prod was just a test that the gated checks work. Nothing untoward - expected failures with the plan.

Comment thread terraform/redis_sync_lambda.tf
@dlzhry2nhs dlzhry2nhs merged commit 71ee4c2 into master Sep 29, 2025
10 of 11 checks passed
@dlzhry2nhs dlzhry2nhs deleted the feature/VED-810-backend-deploy-pipeline branch September 29, 2025 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants