From 54d0b47bccc13a6cdfa3f13c090563a990bfe5a0 Mon Sep 17 00:00:00 2001 From: Colin Saliceti Date: Thu, 18 Jan 2024 14:27:48 +0000 Subject: [PATCH 1/4] Remove paas Github environments They were still referenced in some places. The new environments are only the *_aks ones. --- .github/workflows/manual.yml | 2 +- .github/workflows/trello.yml | 2 +- README.md | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml index edf47e847..a3c571c95 100644 --- a/.github/workflows/manual.yml +++ b/.github/workflows/manual.yml @@ -72,7 +72,7 @@ jobs: azure-credentials: ${{ secrets.AZURE_CREDENTIALS }} - name: Slack Release Notification - if: steps.tag_id.outputs.release_id && github.event.inputs.environment == 'Production' + if: steps.tag_id.outputs.release_id && github.event.inputs.environment == 'production_aks' uses: rtCamp/action-slack-notify@master env: SLACK_COLOR: ${{env.SLACK_SUCCESS}} diff --git a/.github/workflows/trello.yml b/.github/workflows/trello.yml index a06282922..55c3aaa17 100644 --- a/.github/workflows/trello.yml +++ b/.github/workflows/trello.yml @@ -8,7 +8,7 @@ jobs: name: Link Trello card to this PR if: "!contains( 'dependabot[bot] snyk-bot' , github.actor )" runs-on: ubuntu-latest - environment: Development + environment: development_aks steps: - uses: Azure/login@v1 with: diff --git a/README.md b/README.md index ff50db351..f872a2b0d 100644 --- a/README.md +++ b/README.md @@ -117,15 +117,15 @@ The API is deployed to [AKS](https://github.com/DFE-Digital/teacher-services-clo | Environment | ASP.NET Core Environment | URL | | ----------------------- | ------------------------ | ----------------------------------------------------------------- | -| development (AKS) | staging | https://getintoteachingapi-development.test.teacherservices.cloud/| -| test (AKS) | staging | https://getintoteachingapi-test.test.teacherservices.cloud/ | -| production (AKS) | production | https://getintoteachingapi-production.teacherservices.cloud/ | -| development (local) | development | localhost | -| test (local) | test | n/a | +| development (AKS) | Staging | https://getintoteachingapi-development.test.teacherservices.cloud/| +| test (AKS) | Staging | https://getintoteachingapi-test.test.teacherservices.cloud/ | +| production (AKS) | Production | https://getintoteachingapi-production.teacherservices.cloud/ | +| development (local) | Development | localhost | +| test (local) | Test | n/a | ### Process -When you merge a branch to `master` it will automatically be deployed to the [development](#environments) and [test](#environments) environments via GitHub Actions and a tagged release will be created (the tag will use the PR number). You can then test the changes using the corresponding dev/test environments of the other GiT services. Once you're happy and want to ship to [production](#environments) you need to note the tag of your release and go to the `Manual Release` GitHub Action; from there you can select `Run workflow`, choose the `Production` environment and enter your release number. +When you merge a branch to `master` it will automatically be deployed to the [development](#environments) and [test](#environments) environments via GitHub Actions and a tagged release will be created (the tag will use the PR number). You can then test the changes using the corresponding dev/test environments of the other GiT services. Once you're happy and want to ship to [production](#environments) you need to note the tag of your release and go to the `Manual Release` GitHub Action; from there you can select `Run workflow`, choose the `production_aks` environment and enter your release number. ### Rollbacks From 2056b3b4204c08ccc5685cdad2fee1c016969afd Mon Sep 17 00:00:00 2001 From: Colin Saliceti Date: Thu, 18 Jan 2024 15:01:37 +0000 Subject: [PATCH 2/4] Set up java for sonarcloud --- .github/workflows/sonarcloud.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index 06c3ecbaa..292da81f2 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -16,6 +16,11 @@ jobs: - name: set-up-environment uses: DFE-Digital/github-actions/set-up-environment@master + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 21 + - uses: Azure/login@v1 with: creds: ${{ secrets.AZURE_CREDENTIALS }} From 830be3e15368d6ce3c6fd9f1635060c0d77e5241 Mon Sep 17 00:00:00 2001 From: Colin Saliceti Date: Thu, 18 Jan 2024 15:12:39 +0000 Subject: [PATCH 3/4] Update dotnet-sonarscanner to 5.15.0 --- .github/workflows/sonarcloud.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index 292da81f2..af7ed4cae 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -43,7 +43,7 @@ jobs: dotnet-version: '7.0' - name: Install dotnet-sonarscanner - run: dotnet tool install --global dotnet-sonarscanner --version 5.9.1 + run: dotnet tool install --global dotnet-sonarscanner --version 5.15.0 - name: Install dependencies run: dotnet restore From 0e21227d0e17ba754fce6c2158ce7e964573f312 Mon Sep 17 00:00:00 2001 From: Colin Saliceti Date: Thu, 18 Jan 2024 15:20:58 +0000 Subject: [PATCH 4/4] Sonarcloud fix indentation --- .github/workflows/sonarcloud.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index af7ed4cae..310c4610a 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -75,9 +75,9 @@ jobs: " \ /d:sonar.verbose=true \ /d:sonar.log.level="DEBUG" - dotnet build - dotnet test --no-build --logger:trx -e:CollectCoverage=true -e:CoverletOutputFormat=opencover - dotnet sonarscanner end /d:sonar.login="${{ steps.fetch-secrets.outputs.SONAR-TOKEN }}" + dotnet build + dotnet test --no-build --logger:trx -e:CollectCoverage=true -e:CoverletOutputFormat=opencover + dotnet sonarscanner end /d:sonar.login="${{ steps.fetch-secrets.outputs.SONAR-TOKEN }}" - name: Slack Notification if: failure() && github.ref == 'refs/heads/master'