Skip to content

CDAPI-20 Add integration support to preview environment workflow#67

Merged
neil-sproston merged 2 commits intomainfrom
CDAPI-20internalInt
Mar 18, 2026
Merged

CDAPI-20 Add integration support to preview environment workflow#67
neil-sproston merged 2 commits intomainfrom
CDAPI-20internalInt

Conversation

@neil-sproston
Copy link
Copy Markdown
Contributor

@neil-sproston neil-sproston commented Mar 17, 2026

Description

Create an "internal-int" like environment for each preview environment.

Support dependabot runs.

Context

Type of changes

  • Refactoring (non-breaking change)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would change existing functionality)
  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have followed the code style of the project
  • I have added tests to cover my changes
  • I have updated the documentation accordingly
  • This PR is a result of pair or mob programming
  • Exceptions/Exclusions to coding standards (e.g. #noqa or #NOSONAR) are included within this Pull Request.

Sensitive Information Declaration

To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.

  • I confirm that neither PII/PID nor sensitive data are included in this PR and the codebase changes.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 17, 2026

Trivy gate: no Critical/High vulnerabilities.

Trivy Filesystem Scan Summary

Filesystem: /tmp/artifact

Severity Count
CRITICAL 0
HIGH 0
MEDIUM 0
LOW 0
UNKNOWN 0

✅ No vulnerabilities found.

@neil-sproston neil-sproston requested a review from a team as a code owner March 17, 2026 16:55
@neil-sproston neil-sproston self-assigned this Mar 17, 2026
Copy link
Copy Markdown
Collaborator

@nhsd-jack-wainwright nhsd-jack-wainwright left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 👍 , just a few minor comments / questions.

MTLS_CERT="${API_MTLS_CERT:-/cds/pathology/dev/mtls/client1-key-public}"
MTLS_KEY="${API_MTLS_KEY:-/cds/pathology/dev/mtls/client1-key-secret}"
echo "Deploying preview function: $FN"
wait_for_lambda_ready() {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a bit of duplication here with the main and mock lambda deployments? Is it worth implementing this waiting logic as part of a separate Github action that maybe accepts a function name to wait for?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed - this is the plan for the re-plumbing stage which is one of my next actions - as part of this we will be removing the preview-env functionality and placing the functionality into the main ci/cd workflow.

echo "http_result=unexpected-status" >> "$GITHUB_OUTPUT"
exit 0

- name: Smoke test int URL
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there some more potential duplication here also? Perhaps these smoke test steps could be refactored to use a single shared github action?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed - this is the plan for the re-plumbing stage which is one of my next actions - as part of this we will be removing the preview-env functionality and placing the functionality into the main ci/cd workflow.

Comment on lines +685 to +686
const fn = '${{ steps.names.outputs.function_name }}' || 'not-set';
const mock_fn = '${{ steps.names.outputs.mock_function_name }}' || 'not-set';
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would we expect fn and mock_fn not to be set here?

Copy link
Copy Markdown
Contributor Author

@neil-sproston neil-sproston Mar 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We would, but it is included as a defensive measure if the pipeline fails in part so as to make the comment a bit more reliable/understandable.

@sonarqubecloud
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown

Deployment Complete

@neil-sproston neil-sproston merged commit 298c253 into main Mar 18, 2026
45 checks passed
@neil-sproston neil-sproston deleted the CDAPI-20internalInt branch March 18, 2026 16:39
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.

2 participants