-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
split off geoserver functionality into a microservice - update docker… (
#4427) * split off geoserver functionality into a microservice - update docker and ci/cd to support. * updates to proxy appsettings and dockerfile. * dockerfile proxy corrections. * code review corrections. * revert change to dev ci-cd pipeline. * revert changes to api-dotnetcore * correction * update tokens.jwt library. * remove unused service. --------- Co-authored-by: Smith <[email protected]>
- Loading branch information
1 parent
e9e93bb
commit 7a53d28
Showing
304 changed files
with
2,496 additions
and
951 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,12 +24,16 @@ jobs: | |
build-backend: | ||
needs: check-changes | ||
if: ${{ needs.check-changes.outputs.backend == 'true' }} | ||
runs-on: ubuntu-latest | ||
if: ${{ needs.check-changes.outputs.backend == 'true' }} | ||
strategy: | ||
matrix: | ||
services: [{directory: ./source/backend/api, solution: 'Pims.sln'}, {directory: ./source/backend/proxy, solution: 'Proxy.sln'}] | ||
env: | ||
working-directory: ./source/backend | ||
working-directory: ${{ matrix.services.directory }} | ||
solution-name: ${{ matrix.services.solution }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GIT_BRANCH: "${{github.ref}}" | ||
GIT_BRANCH: "${{ github.ref }}" | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
@@ -45,19 +49,20 @@ jobs: | |
dotnet-version: "8.0.x" | ||
|
||
- name: Install dependencies | ||
run: dotnet restore | ||
run: dotnet restore ${{env.solution-name}} | ||
working-directory: ${{env.working-directory}} | ||
|
||
- name: Install coverlet for code coverage | ||
run: dotnet tool install -g coverlet.console --version 1.7.2 | ||
- name: Build | ||
run: dotnet build ${{env.solution-name}} --configuration Release --no-restore | ||
working-directory: ${{env.working-directory}} | ||
|
||
- name: Build | ||
run: dotnet build --configuration Release --no-restore | ||
- name: Install coverlet for code coverage | ||
run: dotnet tool install -g coverlet.console --version 1.7.2 | ||
working-directory: ${{env.working-directory}} | ||
|
||
- name: Test | ||
run: dotnet test --no-restore --verbosity normal | ||
if: ${{ env.solution-name == 'Pims.sln' }} | ||
run: dotnet test Pims.sln --no-restore --verbosity normal | ||
working-directory: ${{env.working-directory}} | ||
|
||
# For future reference, if we have N test projects the flow of events would be: | ||
|
@@ -84,46 +89,54 @@ jobs: | |
# | ||
# The final `coverage.opencover.xml` is the one we want | ||
- name: Generate code coverage | ||
working-directory: ${{env.working-directory}}/tests/unit | ||
if: ${{ env.solution-name == 'Pims.sln' }} | ||
working-directory: ${{env.working-directory}}/../tests/unit | ||
run: | | ||
pwd | ||
mkdir -p TestResults | ||
rm -rf api/TestResults | ||
rm -rf dal/TestResults | ||
rm -rf mockdal/TestResults | ||
cd api | ||
dotnet test --collect:"XPlat Code Coverage" --settings coverlet.runsettings --no-restore | ||
dotnet test --collect:"XPlat Code Coverage" --settings coverlet.runsettings --no-restore > out.txt | ||
ls | ||
cat out.txt | ||
mv TestResults/*/* ../TestResults/ | ||
cd .. | ||
cd dal | ||
dotnet test --collect:"XPlat Code Coverage" --settings coverlet.runsettings --no-restore | ||
ls | ||
mv TestResults/*/* ../TestResults/ | ||
cd .. | ||
cd mockdal | ||
dotnet test --collect:"XPlat Code Coverage" --settings coverlet.runsettings --no-restore | ||
ls | ||
mv TestResults/*/* ../TestResults/ | ||
cd .. | ||
head TestResults/coverage.opencover.xml | ||
- name: Save PR number and scan results | ||
if: ${{ env.solution-name == 'Pims.sln' }} | ||
run: | | ||
mkdir -p ./pr | ||
echo ${{ github.event.pull_request.number }} > ./pr/NR | ||
cp ${{env.working-directory}}/tests/unit/TestResults/coverage.opencover.xml ./pr | ||
cp ${{env.working-directory}}/../tests/unit/TestResults/coverage.opencover.xml ./pr | ||
- uses: actions/upload-artifact@v4 | ||
if: ${{ env.solution-name == 'Pims.sln' }} | ||
with: | ||
name: pr-codecov | ||
path: pr/ | ||
|
||
- name: SonarScanner for .NET 8 with pull request decoration support | ||
id: scan | ||
uses: highbyte/[email protected] | ||
if: ${{ github.event_name == 'push' }} | ||
if: ${{ github.event_name == 'push' && env.solution-name == 'Pims.sln' }} | ||
env: | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
with: | ||
dotnetBuildArguments: ${{env.working-directory}} | ||
dotnetTestArguments: ${{env.working-directory}} --logger trx --collect:"XPlat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover | ||
dotnetBuildArguments: ${{env.working-directory}}/${{ env.solution-name }} | ||
dotnetTestArguments: ${{env.working-directory}}/${{ env.solution-name }} --logger trx --collect:"XPlat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover | ||
# Optional extra command arguments the the SonarScanner 'begin' command | ||
sonarBeginArguments: /d:sonar.cs.opencover.reportsPaths="**/TestResults/**/coverage.opencover.xml" -d:sonar.cs.vstest.reportsPaths="**/TestResults/*.trx" -d:sonar.qualitygate.wait=true | ||
# The key of the SonarQube project | ||
|
@@ -132,7 +145,14 @@ jobs: | |
sonarProjectName: PIMS-API | ||
# The SonarQube server URL. For SonarCloud, skip this setting. | ||
sonarHostname: ${{secrets.SONAR_URL}} | ||
|
||
post-build: | ||
needs: build-backend | ||
runs-on: ubuntu-latest | ||
env: | ||
working-directory: ./source/backend | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GIT_BRANCH: "${{github.ref}}" | ||
steps: | ||
# Send notifications only if MS_TEAMS_NOTIFY_URL secret has been set | ||
- name: Failure notification to Teams Channel | ||
env: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.