Skip to content

Commit

Permalink
Fix/small infra changes (#423)
Browse files Browse the repository at this point in the history
* activate test script in staging infra

* check for empty string on notification email + reset test action

* fix some spacing errors

* disable test/sonar in infra pipeline

---------

Co-authored-by: Hammerbeck <[email protected]>
  • Loading branch information
Andreass2 and Hammerbeck authored May 7, 2024
1 parent 738a47a commit 7b0924d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 18 deletions.
4 changes: 2 additions & 2 deletions .azure/modules/containerAppEnvironment/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ resource containerAppEnvironment 'Microsoft.App/managedEnvironments@2023-11-02-p
}
}
resource application_insights_action 'Microsoft.Insights/actionGroups@2023-01-01' =
if (emailReceiver != null) {
if (emailReceiver != null && emailReceiver != '') {
name: '${namePrefix}-action'
location: 'global' // action group locations is limited, change to use location variable when new locations is added
dependsOn: [application_insights, containerAppEnvironment]
Expand All @@ -58,7 +58,7 @@ resource application_insights_action 'Microsoft.Insights/actionGroups@2023-01-01
}
}
resource exceptionOccuredAlertRule 'Microsoft.Insights/scheduledQueryRules@2023-03-15-preview' =
if (emailReceiver != null) {
if (emailReceiver != null && emailReceiver != '') {
name: '${namePrefix}-500-exception-occured'
location: location
properties: {
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/action-build-and-analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ jobs:
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: "temurin"
distribution: 'temurin'
java-version: 17
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Format
run: |
dotnet format Altinn.Broker.sln --verify-no-changes --verbosity diagnostic --include ./src/**
dotnet format --verify-no-changes --verbosity diagnostic
- name: Cache SonarCloud packages
uses: actions/cache@v4
with:
Expand Down Expand Up @@ -62,4 +62,4 @@ jobs:
uses: NasAmin/[email protected]
with:
TRX_PATH: ${{ github.workspace }}/TestResults
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8 changes: 1 addition & 7 deletions .github/workflows/ci-cd-staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,10 @@ jobs:
name: Check for changes
uses: ./.github/workflows/action-check-for-changes.yml

build-and-test:
name: Build and test
uses: ./.github/workflows/action-build-and-analyze.yml
needs: [check-for-changes]
if: ${{ needs.check-for-changes.outputs.hasBackendChanges == 'true' }}

publish:
name: Build and publish docker images
uses: ./.github/workflows/action-build-and-push.yml
needs: [ generate-git-short-sha, check-for-changes, get-current-version, deploy-infra, build-and-test]
needs: [ generate-git-short-sha, check-for-changes, get-current-version, deploy-infra]
if: ${{ inputs.initialDeploy || needs.check-for-changes.outputs.hasBackendChanges == 'true' }}
with:
dockerImageBaseName: ghcr.io/altinn/altinn-broker
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/ci-cd-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@ jobs:
name: Check for changes
uses: ./.github/workflows/action-check-for-changes.yml

build-and-test:
name: Build and test
uses: ./.github/workflows/action-build-and-analyze.yml
needs: [check-for-changes]
if: ${{ needs.check-for-changes.outputs.hasBackendChanges == 'true' }}

publish:
name: Build and publish docker images
uses: ./.github/workflows/action-build-and-push.yml
Expand Down

0 comments on commit 7b0924d

Please sign in to comment.