Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.2.5 release #76

Merged
merged 4 commits into from
Nov 29, 2023
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
2 changes: 1 addition & 1 deletion .azuredevops/pipelines/build-no-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ steps:
displayName: 'Install dotnet-ef'
condition: always()
inputs:
script: 'dotnet tool install --global dotnet-ef'
script: 'dotnet tool install --version 7.0.13 --global dotnet-ef'

- task: CmdLine@2
displayName: 'Check dotnet-ef version'
Expand Down
124 changes: 40 additions & 84 deletions .azuredevops/pipelines/build-v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ variables:
containerTag: develop

baseSourceDirectory: $(Build.SourcesDirectory)/Source
dockerComposeDirectory: $(baseSourceDirectory)/DockerCompose

trigger:
- develop
Expand Down Expand Up @@ -51,7 +52,7 @@ jobs:
docker pull $(AcrBaseUrl).azurecr.io/mock-data-holder-energy:$(containerTag)
docker tag $(AcrBaseUrl).azurecr.io/mock-register:$(containerTag) mock-register:latest
docker tag $(AcrBaseUrl).azurecr.io/mock-data-holder:$(containerTag) mock-data-holder:latest
docker tag $(AcrBaseUrl).azurecr.io/mock-data-holder-energy:$(containerTag) mock-data-holder-energy:latest
docker tag $(AcrBaseUrl).azurecr.io/mock-data-holder-energy:$(containerTag) mock-data-holder-energy:latest

# List docker images
- task: Docker@2
Expand All @@ -61,48 +62,37 @@ jobs:
command: images

# Run unit tests
- task: DockerCompose@0
displayName: Unit tests - Up
inputs:
action: Run a Docker Compose command
dockerComposeFile: $(baseSourceDirectory)/docker-compose.UnitTests.yml
dockerComposeCommand: up --abort-on-container-exit --exit-code-from mock-data-recipient-unit-tests
- script: |
docker compose --file $(dockerComposeDirectory)/docker-compose.UnitTests.yml up --abort-on-container-exit --exit-code-from mock-data-recipient-unit-tests
displayName: Unit Tests - Up
condition: always()

# Remove unit tests
- task: DockerCompose@0
displayName: Unit tests - Down
condition: always()
inputs:
action: Run a Docker Compose command
dockerComposeFile: $(baseSourceDirectory)/docker-compose.UnitTests.yml
dockerComposeCommand: down
- script: |
docker compose --file $(dockerComposeDirectory)/docker-compose.UnitTests.yml down
displayName: 'Unit Tests - Down'
condition: always()

# Run integration tests
- task: DockerCompose@0
- script: |
docker compose --file $(dockerComposeDirectory)/docker-compose.IntegrationTests.yml up --abort-on-container-exit --exit-code-from mock-data-recipient-integration-tests
displayName: Integration tests - Up
condition: always()
inputs:
action: Run a Docker Compose command
dockerComposeFile: $(baseSourceDirectory)/docker-compose.IntegrationTests.yml
dockerComposeCommand: up --abort-on-container-exit --exit-code-from mock-data-recipient-integration-tests

# Output Docker Logs
- script: |
docker logs mock-register
docker logs mock-data-holder
docker logs mock-data-holder-energy
docker logs mock-data-recipient
docker logs mock-register-mdr-int
docker logs mock-data-holder-mdr-int
docker logs mock-data-holder-energy-mdr-int
docker logs mock-data-recipient-mdr-int
displayName: 'Output Docker Logs'
condition: always()

# Remove integration tests
- task: DockerCompose@0
displayName: Integration tests - Down
condition: always()
inputs:
action: Run a Docker Compose command
dockerComposeFile: $(baseSourceDirectory)/docker-compose.IntegrationTests.yml
dockerComposeCommand: down
- script: |
docker compose --file $(dockerComposeDirectory)/docker-compose.IntegrationTests.yml down
displayName: 'Integration tests - Down'
condition: always()

# Surface Integration tests TRX results to Devops
- task: PublishTestResults@2
Expand All @@ -111,37 +101,31 @@ jobs:
inputs:
testResultsFormat: 'VSTest'
testResultsFiles: '**/results.trx'
searchFolder: $(baseSourceDirectory)/_temp/mock-data-recipient-integration-tests/testresults
searchFolder: $(dockerComposeDirectory)/_temp/mock-data-recipient-integration-tests/testresults
mergeTestResults: true
testRunTitle: 'mock-data-recipient-Integration-tests'
publishRunAttachments: true

# Run e2e tests
- task: DockerCompose@0
- script: |
docker compose --file $(dockerComposeDirectory)/docker-compose.E2ETests.yml up --abort-on-container-exit --exit-code-from mock-data-recipient-e2e-tests
displayName: E2E tests - Up
condition: always()
inputs:
action: Run a Docker Compose command
dockerComposeFile: $(baseSourceDirectory)/docker-compose.E2ETests.yml
dockerComposeCommand: up --abort-on-container-exit --exit-code-from mock-data-recipient-e2e-tests

# Output Docker Logs
- script: |
docker logs mock-register
docker logs mock-data-holder
docker logs mock-data-holder-energy
docker logs mock-data-recipient
docker logs mock-register-mdr-e2e
docker logs mock-data-holder-mdr-e2e
docker logs mock-data-holder-energy-mdr-e2e
docker logs mock-data-recipient-mdr-e2e
displayName: 'Output Docker Logs'
condition: always()

# Remove e2e tests
- task: DockerCompose@0
displayName: E2E tests - Down
condition: always()
inputs:
action: Run a Docker Compose command
dockerComposeFile: $(baseSourceDirectory)/docker-compose.E2ETests.yml
dockerComposeCommand: down
- script: |
docker compose --file $(dockerComposeDirectory)/docker-compose.E2ETests.yml down
displayName: 'E2E tests - Down'
condition: always()

# Surface E2E tests TRX results to Devops
- task: PublishTestResults@2
Expand All @@ -150,7 +134,7 @@ jobs:
inputs:
testResultsFormat: 'VSTest'
testResultsFiles: '**/results.trx'
searchFolder: $(baseSourceDirectory)/_temp/mock-data-recipient-e2e-tests/testresults
searchFolder: $(dockerComposeDirectory)/_temp/mock-data-recipient-e2e-tests/testresults
mergeTestResults: true
testRunTitle: 'mock-data-recipient-E2E-tests'
publishRunAttachments: true
Expand All @@ -173,66 +157,38 @@ jobs:
path: $(build.artifactstagingdirectory)
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: $(baseSourceDirectory)/_temp/mock-register/tmp
# displayName: Publish MockRegister logs
# condition: always()
# artifact: Mock-Register - Logs

# 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-data-holder logs
# - publish: $(baseSourceDirectory)/_temp/mock-data-holder/tmp
# displayName: Publish MockDataHolder logs
# condition: always()
# artifact: Mock-Data-Holder - Logs

# 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-data-holder-energy logs
# - publish: $(baseSourceDirectory)/_temp/mock-data-holder-energy/tmp
# displayName: Publish MockDataHolder-Energy logs
# condition: always()
# artifact: Mock-Data-Holder-Energy - Logs

# 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-data-recipient logs
# - publish: $(baseSourceDirectory)/_temp/mock-data-recipient/tmp
# displayName: Publish MockDataRecipient logs
# condition: always()
# artifact: Mock-Data-Recipient - Logs

# Publish mock-data-recipient unit tests results
- publish: $(baseSourceDirectory)/_temp/mock-data-recipient-unit-tests/testresults
- publish: $(dockerComposeDirectory)/_temp/mock-data-recipient-unit-tests/testresults
displayName: Publish unit tests
condition: always()
artifact: Mock-Data-Recipient - Unit tests

# Run trx formatter to output .MD and .CSV
- script: |
docker run \
-v=$(baseSourceDirectory)/_temp/mock-data-recipient-integration-tests/testresults/results.trx:/app/results.trx:ro \
-v=$(baseSourceDirectory)/_temp/mock-data-recipient-integration-tests/testresults/formatted/:/app/out/:rw \
-v=$(dockerComposeDirectory)/_temp/mock-data-recipient-integration-tests/testresults/results.trx:/app/results.trx:ro \
-v=$(dockerComposeDirectory)/_temp/mock-data-recipient-integration-tests/testresults/formatted/:/app/out/:rw \
$(AcrBaseUrl).azurecr.io/trx-formatter -i results.trx -t "MDR" --outputprefix "MDR" -o out/
displayName: 'Run trx-formatter for integration tests'
condition: always()

# Publish mock-data-recipient integration tests results
- publish: $(baseSourceDirectory)/_temp/mock-data-recipient-integration-tests/testresults
- publish: $(dockerComposeDirectory)/_temp/mock-data-recipient-integration-tests/testresults
displayName: Publish integration tests
condition: always()
artifact: Mock-Data-Recipient - Integration tests

# Run trx formatter to output .MD and .CSV
- script: |
docker run \
-v=$(baseSourceDirectory)/_temp/mock-data-recipient-e2e-tests/testresults/results.trx:/app/results.trx:ro \
-v=$(baseSourceDirectory)/_temp/mock-data-recipient-e2e-tests/testresults/formatted/:/app/out/:rw \
-v=$(dockerComposeDirectory)/_temp/mock-data-recipient-e2e-tests/testresults/results.trx:/app/results.trx:ro \
-v=$(dockerComposeDirectory)/_temp/mock-data-recipient-e2e-tests/testresults/formatted/:/app/out/:rw \
$(AcrBaseUrl).azurecr.io/trx-formatter -i results.trx -t "MDR-E2E" --outputprefix "MDR-E2E" -o out/
displayName: 'Run trx-formatter for E2E tests'
condition: always()

# Publish mock-data-recipient e2e tests results
- publish: $(baseSourceDirectory)/_temp/mock-data-recipient-e2e-tests/testresults
- publish: $(dockerComposeDirectory)/_temp/mock-data-recipient-e2e-tests/testresults
displayName: Publish e2e tests
condition: always()
artifact: Mock-Data-Recipient - E2E tests
Expand All @@ -249,7 +205,7 @@ jobs:
displayName: 'Install dotnet-ef'
condition: always()
inputs:
script: 'dotnet tool install --global dotnet-ef'
script: 'dotnet tool install --version 7.0.13 --global dotnet-ef'

- task: CmdLine@2
displayName: 'Check dotnet-ef version'
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -70,9 +70,9 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# ℹ️ Command-line programs to run using the OS shell
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
Expand All @@ -84,4 +84,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
9 changes: 9 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,12 @@ jobs:

- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}

- name: Docker Hub Description
if: ${{ github.repository_owner == 'ConsumerDataRight' && github.ref_name == 'main' }}
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: ${{ env.DOCKER_IMAGE }}
enable-url-completion: true
26 changes: 13 additions & 13 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,12 @@ jobs:
# Run integration tests
- name: Run integration tests
run: |
docker-compose -f './mock-data-recipient/Source/docker-compose.IntegrationTests.yml' up --abort-on-container-exit --exit-code-from mock-data-recipient-integration-tests
docker compose -f './mock-data-recipient/Source/DockerCompose/docker-compose.IntegrationTests.yml' up --abort-on-container-exit --exit-code-from mock-data-recipient-integration-tests

# Remove integration tests
- name: Remove integration tests
run: |
docker-compose -f './mock-data-recipient/Source/docker-compose.IntegrationTests.yml' down
docker compose -f './mock-data-recipient/Source/DockerCompose/docker-compose.IntegrationTests.yml' down

# List docker images
- name: List Docker images
Expand All @@ -121,12 +121,12 @@ jobs:
# Run e2e tests
- name: Run e2e tests
run: |
docker-compose -f './mock-data-recipient/Source/docker-compose.E2ETests.yml' up --abort-on-container-exit --exit-code-from mock-data-recipient-e2e-tests
docker compose -f './mock-data-recipient/Source/DockerCompose/docker-compose.E2ETests.yml' up --abort-on-container-exit --exit-code-from mock-data-recipient-e2e-tests

# Remove e2e tests
- name: Remove e2e tests
run: |
docker-compose -f './mock-data-recipient/Source/docker-compose.E2ETests.yml' down
docker compose -f './mock-data-recipient/Source/DockerCompose/docker-compose.E2ETests.yml' down

# Build mock-data-recipient-unit-tests image
- name: Build the mock-data-recipient-unit-tests image
Expand All @@ -136,65 +136,65 @@ jobs:
# Run unit tests
- name: Run unit tests
run: |
docker-compose -f './mock-data-recipient/Source/docker-compose.UnitTests.yml' up --abort-on-container-exit --exit-code-from mock-data-recipient-unit-tests
docker compose -f './mock-data-recipient/Source/DockerCompose/docker-compose.UnitTests.yml' up --abort-on-container-exit --exit-code-from mock-data-recipient-unit-tests

# Remove unit tests
- name: Remove unit tests
run: |
docker-compose -f './mock-data-recipient/Source/docker-compose.UnitTests.yml' down
docker compose -f './mock-data-recipient/Source/DockerCompose/docker-compose.UnitTests.yml' down

# Archive unit test results
- name: Archive unit test results
uses: actions/upload-artifact@v2
if: always()
with:
name: unit-test-results
path: ${{ github.workspace }}/mock-data-recipient/Source/_temp/mock-data-recipient-unit-tests/testresults
path: ${{ github.workspace }}/mock-data-recipient/Source/DockerCompose/_temp/mock-data-recipient-unit-tests/testresults

# Archive integration test results
- name: Archive integration test results
uses: actions/upload-artifact@v2
if: always()
with:
name: integration-test-results
path: ${{ github.workspace }}/mock-data-recipient/Source/_temp/mock-data-recipient-integration-tests/testresults
path: ${{ github.workspace }}/mock-data-recipient/Source/DockerCompose/_temp/mock-data-recipient-integration-tests/testresults

# Archive e2e test results
- name: Archive e2e test results
uses: actions/upload-artifact@v2
if: always()
with:
name: e2e-test-results
path: ${{ github.workspace }}/mock-data-recipient/Source/_temp/mock-data-recipient-e2e-tests/testresults
path: ${{ github.workspace }}/mock-data-recipient/Source/DockerCompose/_temp/mock-data-recipient-e2e-tests/testresults

# Archive mock data recipient logs
- name: Archive mock data recipient logs
uses: actions/upload-artifact@v2
if: always()
with:
name: integration-test-artifacts
path: ${{ github.workspace }}/mock-data-recipient/Source/_temp/mock-data-recipient/tmp
path: ${{ github.workspace }}/mock-data-recipient/Source/DockerCompose/_temp/mock-data-recipient/tmp

# Archive mock data holder logs
- name: Archive mock data holder logs
uses: actions/upload-artifact@v2
if: always()
with:
name: integration-test-artifacts
path: ${{ github.workspace }}/mock-data-recipient/Source/_temp/mock-data-holder/tmp
path: ${{ github.workspace }}/mock-data-recipient/Source/DockerCompose/_temp/mock-data-holder/tmp

# Archive mock data holder energy logs
- name: Archive mock data holder energy logs
uses: actions/upload-artifact@v2
if: always()
with:
name: integration-test-artifacts
path: ${{ github.workspace }}/mock-data-recipient/Source/_temp/mock-data-holder-energy/tmp
path: ${{ github.workspace }}/mock-data-recipient/Source/DockerCompose/_temp/mock-data-holder-energy/tmp

# Archive mock register logs
- name: Archive mock register logs
uses: actions/upload-artifact@v2
if: always()
with:
name: integration-test-artifacts
path: ${{ github.workspace }}/mock-data-recipient/Source/_temp/mock-register/tmp
path: ${{ github.workspace }}/mock-data-recipient/Source/DockerCompose/_temp/mock-register/tmp
Loading
Loading