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
106 changes: 64 additions & 42 deletions .azuredevops/pipelines/build-v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,53 @@ schedules:
include:
- develop

resources:
repositories:
- repository: shared-code-scanning
type: git
name: Common/shared-code-scanning
ref: refs/heads/main
trigger: none

trigger:
- develop
- main
- releases/*


variables:
- group: PT-Pipeline-Common

pool:
vmImage: ubuntu-latest
name: mdp-mgmt-shared
demands:
- ImageOverride -equals $(PipelineHostLinuxImage)

steps:
- script: |
echo "Cleaning mock-register folder in temp"
ls $(Agent.BuildDirectory)/s/Source/_temp/mock-register-* 2>/dev/null || "No matching folders found"
sudo rm -rf $(Agent.BuildDirectory)/s/Source/_temp/mock-register-* 2> /dev/null
displayName: Clean temp mock-register folders
condition: always()

- checkout: self
clean: true

- task: UseDotNet@2
displayName: 'Use .NET 8 sdk'
condition: always()
inputs:
packageType: sdk
version: '8.0.x'
performMultiLevelLookup: true

# Restore dotnet tooling
- task: CmdLine@2
displayName: 'Restore dotnet tooling'
condition: always()
inputs:
script: 'dotnet tool restore'

# Build mock-register
- task: Docker@2
displayName: Build mock-register image
Expand All @@ -25,6 +63,11 @@ steps:
repository: mock-register
tags: latest

- template: templates/scan-image.yml@shared-code-scanning
parameters:
Repository: mock-register
Tag: latest

# Build mock-register-unit-tests
- task: Docker@2
displayName: Build mock-register-unit-tests image
Expand Down Expand Up @@ -83,23 +126,22 @@ steps:

# Remove integration tests
- script: |
docker compose --file $(Build.SourcesDirectory)/Source/docker-compose.IntegrationTests.yml down
docker compose --file $(Build.SourcesDirectory)/Source/docker-compose.IntegrationTests.yml down
displayName: 'Integration Tests - Down'
condition: always()

# Run trx formatter to output .MD and .CSV
# Generate Extent Report from Test Results
- script: |
docker run \
-v=$(Build.SourcesDirectory)/Source/_temp/mock-register-integration-tests/testresults/results.trx:/app/results.trx:ro \
-v=$(Build.SourcesDirectory)/Source/_temp/mock-register-integration-tests/testresults/formatted/:/app/out/:rw \
$(SharedAcrBaseUrl).azurecr.io/trx-formatter -i results.trx -t "MR" --outputprefix "MR" -o out/
displayName: 'Run trx-formatter'
condition: always()
env:
TEST_FILTER: "Category!=CTSONLY"
dotnet TrxToExtentReport \
--output $(Build.ArtifactStagingDirectory)/test-results/mock-register-integration-tests/MR-$(Build.BuildNumber).html \
--trx $(Build.SourcesDirectory)/Source/_temp/mock-register-integration-tests/testresults/results.trx \
--verbose
cp $(Build.SourcesDirectory)/Source/_temp/mock-register-integration-tests/testresults/results.trx $(Build.ArtifactStagingDirectory)/test-results/mock-register-integration-tests/MR-$(Build.BuildNumber).trx
displayName: 'Format Test Results'
condition: always()

# Publish mock-register integration tests results
- publish: Source/_temp/mock-register-integration-tests/testresults
- publish: $(Build.ArtifactStagingDirectory)/test-results/mock-register-integration-tests
displayName: Publish MockRegister Integration tests
condition: always()
artifact: Mock-Register - Integration tests
Expand All @@ -117,7 +159,7 @@ steps:
# Run integration tests For CTS Only tests
#****************************************************************************************************************
- script: |
docker compose --file $(Build.SourcesDirectory)/Source/docker-compose.IntegrationTests.yml up --abort-on-container-exit --exit-code-from mock-register-integration-tests
docker compose --file $(Build.SourcesDirectory)/Source/docker-compose.IntegrationTests.yml up --abort-on-container-exit --exit-code-from mock-register-integration-tests
displayName: 'Integration Tests Tests For CTS Only - Up'
condition: always()
env:
Expand All @@ -142,11 +184,12 @@ steps:

# Run trx formatter to output .MD and .CSV
- script: |
docker run \
-v=$(Build.SourcesDirectory)/Source/_temp/mock-register-integration-tests/testresults/results.trx:/app/results.trx:ro \
-v=$(Build.SourcesDirectory)/Source/_temp/mock-register-integration-tests/testresults/formatted/:/app/out/:rw \
$(SharedAcrBaseUrl).azurecr.io/trx-formatter -i results.trx -t "MR-CTS" --outputprefix "MR-CTS" -o out/
displayName: 'Run trx-formatter'
dotnet TrxToExtentReport \
--output $(Build.ArtifactStagingDirectory)/test-results/mock-register-cts-integration-tests/MR-CTS-$(Build.BuildNumber).html \
--trx $(Build.SourcesDirectory)/Source/_temp/mock-register-integration-tests/testresults/results.trx \
--verbose
cp $(Build.SourcesDirectory)/Source/_temp/mock-register-integration-tests/testresults/results.trx $(Build.ArtifactStagingDirectory)/test-results/mock-register-cts-integration-tests/MR-CTS-$(Build.BuildNumber).trx
displayName: 'Format Test Results'
condition: always()

# Remove integration tests For CTS Only tests
Expand All @@ -156,7 +199,7 @@ steps:
condition: always()

# Publish mock-register integration tests results
- publish: Source/_temp/mock-register-integration-tests/testresults
- publish: $(Build.ArtifactStagingDirectory)/test-results/mock-register-cts-integration-tests
displayName: Publish MockRegister CTS Integration tests
condition: always()
artifact: Mock-Register - CTS Integration tests
Expand Down Expand Up @@ -185,36 +228,15 @@ steps:
displayName: Publish container images
# condition: always()
inputs:
path: $(build.artifactstagingdirectory)
path: $(build.artifactstagingdirectory)/mock-register.image.tar
artifact: Container Images

# FIXME - MJS - See dockercompose, volume no longer mapped as 1001:121 (vsts:docker) in build pipeline and causes issue with chown in dockerfile (appuser:appgroup), ie stops register from starting because of different user
# # Publish mock-register logs
# - publish: Source/_temp/mock-register/tmp
# displayName: Publish MockRegister logs
# condition: always()
# artifact: Mock-Register - Logs

# Publish mock-register unit tests results
- publish: Source/_temp/mock-register-unit-tests/testresults
displayName: Publish unit tests
condition: always()
artifact: Mock-Register - Unit tests

- task: UseDotNet@2
displayName: 'Use .NET 8 sdk'
condition: always()
inputs:
packageType: sdk
version: '8.0.x'
performMultiLevelLookup: true

- task: CmdLine@2
displayName: 'Restore dotnet tooling'
condition: always()
inputs:
script: 'dotnet tool restore'

- script: |
cd Source/CDR.Register.Repository
dotnet ef migrations bundle --context RegisterDatabaseContext --verbose --self-contained
Expand Down
7 changes: 6 additions & 1 deletion .azuredevops/pipelines/code-scanning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,13 @@ schedules:
# Disable standard CI build
trigger: none

variables:
- group: PT-Pipeline-Common

pool:
vmImage: 'ubuntu-latest'
name: mdp-mgmt-shared
demands:
- ImageOverride -equals $(PipelineHostLinuxImage)

extends:
template: pipeline-templates/code-scanning.yml@shared-code-scanning
8 changes: 7 additions & 1 deletion .azuredevops/pipelines/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,17 @@ schedules:
- refs/heads/develop
always: true

variables:
- group: PT-Pipeline-Common


jobs:
- job: dependabot
displayName: Dependabot
pool:
vmImage: ubuntu-latest
name: mdp-mgmt-shared
demands:
- ImageOverride -equals $(PipelineHostLinuxImage)

steps:
- task: CmdLine@2
Expand Down
12 changes: 10 additions & 2 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,18 @@
"isRoot": true,
"tools": {
"dotnet-ef": {
"version": "8.0.20",
"version": "8.0.25",
"commands": [
"dotnet-ef"
]
],
"rollForward": false
},
"trxtoextentreport": {
"version": "0.0.4",
"commands": [
"TrxToExtentReport"
],
"rollForward": false
}
}
}
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
## [2.2.6] - 2026-05-13
### Changed
- Support for "Non Bank Lending" industry added to the Mock Register
- Updated Integration Tests inline with NBL updates
- Migrate solution from Microsoft.AspNetCore.Mvc.Versioning to Asp.Versioning.Mvc package

## [2.2.5] - 2026-03-18
# Fixed
- Patched vulnerabilities

## [2.2.4] - 2026-02-25
# Fixed
- Fixed JWKS endpoint response to conform CDR Data Standard

## [2.2.3] - 2025-12-03
### Added
- Added health check endpoints for APIs
Expand Down
Loading
Loading