Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
43432e4
DPAV-2535-enable-producer-gcp-streaming (#139)
sumeetinformed Feb 24, 2026
7598570
DPAV-2557-added-GKE-support (#140)
sumeetinformed Feb 27, 2026
61e1d27
[DPAV-2590] add missing docker attributes (#145)
JamesRuane-is Mar 9, 2026
a7bf32a
feat(dpav-2591): replaced versions with immutable hashes in gh workfl…
KumailKamranIS Mar 9, 2026
813c820
feat: DPAV-2607 add GCP cloud storage configuration for streaming fil…
sumeetinformed Mar 10, 2026
4baab58
DPAV-2540-throw-meaningful-exceptions-after-retries (#144)
LukeJonesIS Mar 10, 2026
5d7c67c
[DPAV-2590] add capabilities tp redis (#149)
JamesRuane-is Mar 10, 2026
6fd5b0d
[DPAV-2594] resolve federator CVEs (#148)
JamesRuane-is Mar 10, 2026
352527c
fix(dpav-2540): fixed inconsistent messaging when enriching and rethr…
KumailKamranIS Mar 12, 2026
fb8cd63
feat(dpav-2610): hardened the federator client and server docker imag…
KumailKamranIS Mar 12, 2026
b9ab675
ci(dpav-2565): trigger release workflow from main and trivy check
JamesRuane-is Mar 18, 2026
3b498fd
feat(dpav-2562): add trivy security scan to federator pipeline (#160)
ethiggins Mar 25, 2026
33afc97
feat(dpav-2582): fixed memory leak relating to message conductors (#156)
KumailKamranIS Mar 26, 2026
ebfed63
ci(dpav-2565): get image tag from branch name
JamesRuane-is Mar 26, 2026
3f26b86
DPAV-2642-added-documentation (#177)
sumeetinformed Mar 26, 2026
cac96bf
feat(dpav-2562): remove continue on error config (#174)
ethiggins Mar 26, 2026
4b6685d
chore: pre release 1.2.0 prep (#179)
KumailKamranIS Mar 26, 2026
772f013
chore: restructured changelog update to match standard (#180)
KumailKamranIS Mar 26, 2026
f546c9f
chore: fix dependency typo in changelog (#181)
KumailKamranIS Mar 26, 2026
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
93 changes: 93 additions & 0 deletions .github/workflows/auto-back-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# SPDX-License-Identifier: Apache-2.0
# © Crown Copyright 2026. This work has been developed by the National Digital Twin Programme and is legally attributed to the Department for Business and Trade (UK) as the governing entity.

# This workflow is triggered when a pull request is merged into the main branch and automatically merges the main branch back into develop to keep it up to date.
# If the merge fails (e.g., due to conflicts), a manual intervention is required. The workflow generates a Job summary of the merge attempt.
name: Auto Back-merge Main to Develop

on:
pull_request:
types:
- closed
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
merge-main-to-develop:

permissions: {}

name: Back-merge Main to Develop
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest

steps:

- name: Generate Sync Token
id: sync-token
uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3.0.0
with:
app-id: ${{ secrets.NDTP_REPOSITORY_WRITER_APP_CLIENT_ID }}
private-key: ${{ secrets.NDTP_REPOSITORY_WRITER_APP_PRIVATE_KEY }}
permission-contents: write
permission-workflows: write

- name: Merge main into develop and Generate Summary
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
with:
github-token: ${{ steps.sync-token.outputs.token }}
script: |
const prNumber = context.payload.pull_request.number;
const mergedBy = context.payload.sender.login;
const prUrl = context.payload.pull_request.html_url;

try {
// Attempt to merge main into develop, use the api to ensure the commit
// is gpg signed.
await github.rest.repos.merge({
owner: context.repo.owner,
repo: context.repo.repo,
base: 'develop',
head: 'main',
commit_message: `Merge branch 'main' into 'develop' (#${prNumber})`
});

let summaryText =
`## Sync Main to Develop ✅

Successfully triggered a merge of \`main\` into \`develop\` following the closure of PR #${prNumber}.

**Original PR Merged by**: @${mergedBy}

[View Original PR](${prUrl})
`;

await core.summary.addRaw(summaryText).write();
} catch (error) {
const finalErrorMessage = error.message || error;
// Write failure summary
summaryText =
`## Sync Main to Develop ❌

Failed to trigger a merge of \`main\` into \`develop\`! This is usually due to a merge conflict. Please resolve it manually by opening a PR from \`main\` to \`develop\`.

### Error Details:

\`\`\`text
${finalErrorMessage}
\`\`\`

**Original PR Merged by**: @${mergedBy}

[View Original PR](${prUrl})
`;

await core.summary.addRaw(summaryText).write();

// Fail the workflow step
core.setFailed(`Merge failed: ${finalErrorMessage}`);
}
29 changes: 25 additions & 4 deletions .github/workflows/docker-ghcr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ jobs:
fi

- name: Checkout repo
uses: actions/checkout@v5
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1

- name: Login to ghcr.io
uses: docker/login-action@v3
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand All @@ -68,7 +68,7 @@ jobs:
run: echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}

- name: Get server and client jars
uses: actions/download-artifact@v5
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
with:
pattern: federator-*.jar
path: target
Expand All @@ -81,6 +81,16 @@ jobs:
WORKSPACE: ${{ github.workspace }}
run: docker build --no-cache --build-arg JAR_NAME="federator-server-${JAR_VERSION}" -t ghcr.io/${REPO}/federator-server:staged -f "$WORKSPACE/docker/Dockerfile.server" --target ${DOCKER_TARGET} .

- name: Run Trivy Scan on Server Docker Image
uses: aquasecurity/trivy-action@57a97c7e7821a5776cebc9bb87c984fa69cba8f1 # v0.35.0
with:
image-ref: "ghcr.io/${{ env.REPO }}/federator-server:staged"
format: "table"
exit-code: "1"
ignore-unfixed: true
severity: "CRITICAL,HIGH"
continue-on-error: true

- name: Tag Server Image with tag(s) ${{ inputs.image_tag }}
env:
IMAGE_TAG: ${{ inputs.image_tag }}
Expand All @@ -95,6 +105,16 @@ jobs:
WORKSPACE: ${{ github.workspace }}
run: docker build --no-cache --build-arg JAR_NAME="federator-client-${JAR_VERSION}" -t ghcr.io/${REPO}/federator-client:staged -f "$WORKSPACE/docker/Dockerfile.client" --target ${DOCKER_TARGET} .

- name: Run Trivy Scan on Client Docker Image
uses: aquasecurity/trivy-action@57a97c7e7821a5776cebc9bb87c984fa69cba8f1 # v0.35.0
with:
image-ref: "ghcr.io/${{ env.REPO }}/federator-client:staged"
format: "table"
exit-code: "1"
ignore-unfixed: true
severity: "CRITICAL,HIGH"
continue-on-error: true

- name: Tag Client Image with tag(s) ${{ inputs.image_tag }}
env:
IMAGE_TAG: ${{ inputs.image_tag }}
Expand All @@ -108,4 +128,5 @@ jobs:

- name: Push Client Image
if: ${{ !inputs.dry_run }}
run: docker push --all-tags ghcr.io/${REPO}/federator-client
run: docker push --all-tags ghcr.io/${REPO}/federator-client

84 changes: 83 additions & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ on:

env:
MAVEN_CLI_OPTS: "--batch-mode --no-transfer-progress"
DOCKER_TARGET: federator
GITHUB_REPOSITORY: ${{ github.repository }}
WORKSPACE: ${{ github.workspace }}

jobs:
build:
Expand Down Expand Up @@ -74,4 +77,83 @@ jobs:
- name: Lint
env:
GH_PACKAGES_PAT: ${{ secrets.GH_PACKAGES_PAT }}
run: ./mvnw $MAVEN_CLI_OPTS spotless:check
run: ./mvnw $MAVEN_CLI_OPTS spotless:check
security-scanning:
permissions:
contents: read
pull-requests: read
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- name: Set up JDK 21
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
java-version: '21'
distribution: 'temurin'
cache: maven
server-password: 'GH_PACKAGES_PAT'

- name: Get version
id: get_version
run: echo project_version=$(./mvnw $MAVEN_CLI_OPTS help:evaluate -Dexpression=project.version -q -DforceStdout) >> $GITHUB_OUTPUT

- name: Checkout repo
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1

- name: Login to ghcr.io
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Format repo name
run: echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}

- name: Get server and client jars
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
with:
pattern: federator-*.jar
path: target
merge-multiple: true

- name: Build JARs
env:
GH_PACKAGES_PAT: ${{ secrets.GH_PACKAGES_PAT }}
run: ./mvnw $MAVEN_CLI_OPTS package -DskipTests

- name: Build Server Image
env:
JAR_VERSION: ${{ steps.get_version.outputs.project_version }}
run: docker build --no-cache --build-arg JAR_NAME="federator-server-${JAR_VERSION}" -t ghcr.io/${REPO}/federator-server:staged -f "$WORKSPACE/docker/Dockerfile.server" --target ${DOCKER_TARGET} .

- name: Run Trivy vulnerability scanner on server image
uses: aquasecurity/trivy-action@57a97c7e7821a5776cebc9bb87c984fa69cba8f1 # v0.35.0
with:
image-ref: ghcr.io/${{ env.REPO }}/federator-server:staged
format: table
exit-code: 1
ignore-unfixed: true
severity: "CRITICAL,HIGH"
continue-on-error: false

- name: Build Client Image
env:
JAR_VERSION: ${{ steps.get_version.outputs.project_version }}
run: docker build --no-cache --build-arg JAR_NAME="federator-client-${JAR_VERSION}" -t ghcr.io/${REPO}/federator-client:staged -f "$WORKSPACE/docker/Dockerfile.client" --target ${DOCKER_TARGET} .

- name: Run Trivy vulnerability scanner on client image
uses: aquasecurity/trivy-action@57a97c7e7821a5776cebc9bb87c984fa69cba8f1 # v0.35.0
with:
image-ref: ghcr.io/${{ env.REPO }}/federator-client:staged
format: table
exit-code: 1
ignore-unfixed: true
severity: "CRITICAL,HIGH"
continue-on-error: false

- name: Clean up docker image
run: |
docker rmi ghcr.io/${REPO}/federator-server:staged
docker rmi ghcr.io/${REPO}/federator-client:staged
29 changes: 23 additions & 6 deletions .github/workflows/oss-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ jobs:
steps:
- name: Fetch GitHub App token for target repo
id: target_token
uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3.0.0
with:
app-id: ${{ secrets.OSPO_WORKFLOW_APP_ID }}
private-key: ${{ secrets.OSPO_WORKFLOW_PRIVATE_KEY }}
permission-contents: read

- name: Fetch GitHub App token for OSPO source repo (read-only)
id: ospo_token
uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3.0.0
with:
app-id: ${{ secrets.OSPO_WORKFLOW_APP_ID }}
private-key: ${{ secrets.OSPO_WORKFLOW_PRIVATE_KEY }}
Expand Down Expand Up @@ -103,10 +103,27 @@ jobs:
core.info('Generated repository-metadata.json for policy context.');

- name: Install Conftest
env:
FALLBACK_VERSION: '0.67.1'
run: |
LATEST_VERSION=$(curl --proto "=https" -s "https://api.github.com/repos/open-policy-agent/conftest/releases/latest" | grep -Po '"tag_name": "v\K[0-9.]+')
curl --proto "=https" -L "https://github.com/open-policy-agent/conftest/releases/download/v${LATEST_VERSION}/conftest_${LATEST_VERSION}_Linux_x86_64.tar.gz" | tar -xz
sudo mv conftest /usr/local/bin/
set -euo pipefail

install_conftest() {
local version="$1"
local file_name="conftest_${version}_Linux_x86_64.deb"
curl --proto "=https" --fail -sSL "https://github.com/open-policy-agent/conftest/releases/download/v${version}/${file_name}" -o "${file_name}"
sudo dpkg -i "${file_name}"
rm -f "${file_name}"
}

LATEST_VERSION="$(curl --proto "=https" --fail -s "https://api.github.com/repos/open-policy-agent/conftest/releases/latest" | grep -Po '"tag_name": "v\K[0-9.]+' || true)"

if [[ -n "${LATEST_VERSION}" ]] && install_conftest "${LATEST_VERSION}"; then
echo "Installed latest Conftest version: ${LATEST_VERSION}"
else
echo "Failed to install latest Conftest. Falling back to version ${FALLBACK_VERSION}."
install_conftest "${FALLBACK_VERSION}"
fi

- name: Run Policy Checks
id: run_conftest
Expand Down Expand Up @@ -449,7 +466,7 @@ jobs:

- name: Upload OSS result artifacts
if: ${{ steps.summarise_results.outputs.hasResults == 'true' }}
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: oss-checks-${{ github.run_id }}
retention-days: 30
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/publish-github-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,18 @@ on:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
versioning:
if: |
github.event.pull_request.merged == true &&
(startsWith(github.head_ref, 'release/') || startsWith(github.head_ref, 'hotfix/'))
permissions:
contents: read

name: Extract Release Version
runs-on: ubuntu-latest
outputs:
Expand Down Expand Up @@ -62,6 +67,7 @@ jobs:
generate-sbom:
permissions:
contents: read

name: Generate SPDX SBOM
runs-on: ubuntu-latest
needs: [versioning]
Expand All @@ -85,14 +91,15 @@ jobs:
echo "$api_response" | jq '.sbom' > sbom.spdx.json

- name: Upload SBOM Artifact
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: sbom
path: sbom.spdx.json

create-git-tag:
permissions:
contents: write

name: Create Git Tag
needs: [versioning, generate-sbom]
runs-on: ubuntu-latest
Expand All @@ -117,17 +124,18 @@ jobs:
create-git-release:
permissions:
contents: write

name: Create GitHub Release
needs: [versioning, generate-sbom, create-git-tag]
runs-on: ubuntu-latest
steps:
- name: Download SBOM Artifact
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: sbom

- name: Create GitHub Release
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0
uses: softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2.6.1
with:
tag_name: "v${{ needs.versioning.outputs.version }}"
name: "Release v${{ needs.versioning.outputs.version }}"
Expand All @@ -136,4 +144,3 @@ jobs:
prerelease: false
files: |
sbom.spdx.json

Loading
Loading