From 569d267b2f6ab864d582acce2483209f1b28458f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20J=C3=B8rgen=20Skogstad?= Date: Thu, 5 Dec 2024 15:11:12 +0100 Subject: [PATCH] gpsup --- .../availabilityTest.bicep | 2 +- .azure/modules/keyvault/copySecrets.bicep | 2 +- .azure/modules/managedIdentity/main.bicep | 2 +- .../addMetricsPublisherRoles.bicep | 2 +- .azure/modules/serviceBus/main.bicep | 4 +-- .github/pr-title-checker-config.json | 26 +++++++++---------- .github/tools/containerAppJobVerifier.sh | 10 +++---- .github/tools/pwdGenerator.ps1 | 8 +++--- .github/tools/revisionVerifier.sh | 2 +- .github/workflows/ci-cd-prod.yml | 4 +-- .../workflows/workflow-run-k6-performance.yml | 8 +++--- .github/workflows/workflow-run-k6-tests.yml | 4 +-- 12 files changed, 37 insertions(+), 37 deletions(-) diff --git a/.azure/modules/applicationInsights/availabilityTest.bicep b/.azure/modules/applicationInsights/availabilityTest.bicep index 3a384e0e3..41c4deead 100644 --- a/.azure/modules/applicationInsights/availabilityTest.bicep +++ b/.azure/modules/applicationInsights/availabilityTest.bicep @@ -22,7 +22,7 @@ param timeout int = 60 // Default is 1 minute resource availabilityTest 'Microsoft.Insights/webtests@2022-06-15' = { name: name location: location - tags: union(tags, { + tags: union(tags, { 'hidden-link:${appInsightsId}': 'Resource' }) kind: 'standard' diff --git a/.azure/modules/keyvault/copySecrets.bicep b/.azure/modules/keyvault/copySecrets.bicep index 5b68f8f3a..4e504c8d1 100644 --- a/.azure/modules/keyvault/copySecrets.bicep +++ b/.azure/modules/keyvault/copySecrets.bicep @@ -1,4 +1,4 @@ -/* +/* This module copies secrets from a source Key Vault to a destination Key Vault and adds references to those secrets in App Configuration. */ // Source diff --git a/.azure/modules/managedIdentity/main.bicep b/.azure/modules/managedIdentity/main.bicep index a5f9241ca..475df69e6 100644 --- a/.azure/modules/managedIdentity/main.bicep +++ b/.azure/modules/managedIdentity/main.bicep @@ -14,4 +14,4 @@ resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023- } output managedIdentityId string = managedIdentity.id -output managedIdentityPrincipalId string = managedIdentity.properties.principalId +output managedIdentityPrincipalId string = managedIdentity.properties.principalId diff --git a/.azure/modules/monitor-workspace/addMetricsPublisherRoles.bicep b/.azure/modules/monitor-workspace/addMetricsPublisherRoles.bicep index b79418da6..26ea44553 100644 --- a/.azure/modules/monitor-workspace/addMetricsPublisherRoles.bicep +++ b/.azure/modules/monitor-workspace/addMetricsPublisherRoles.bicep @@ -22,4 +22,4 @@ resource roleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = [ principalId: principalId principalType: 'ServicePrincipal' } -}] +}] diff --git a/.azure/modules/serviceBus/main.bicep b/.azure/modules/serviceBus/main.bicep index c17c03e69..d043e8161 100644 --- a/.azure/modules/serviceBus/main.bicep +++ b/.azure/modules/serviceBus/main.bicep @@ -1,5 +1,5 @@ -// This Bicep module provisions a Service Bus namespace with a Premium SKU in Azure, -// assigns a system-managed identity, and sets up a private endpoint for secure connectivity. +// This Bicep module provisions a Service Bus namespace with a Premium SKU in Azure, +// assigns a system-managed identity, and sets up a private endpoint for secure connectivity. // It also configures a private DNS zone for the Service Bus namespace to facilitate network resolution within the virtual network. import { uniqueResourceName } from '../../functions/resourceName.bicep' diff --git a/.github/pr-title-checker-config.json b/.github/pr-title-checker-config.json index 5c12b16ac..fa8bf6bbb 100644 --- a/.github/pr-title-checker-config.json +++ b/.github/pr-title-checker-config.json @@ -1,14 +1,14 @@ { - "LABEL": { - "name": "title needs formatting", - "color": "EEEEEE" - }, - "CHECKS": { - "regexp": "^(feat|fix|docs|test|ci|chore)!?(\\(.*\\))?!?:.*" - }, - "MESSAGES": { - "success": "PR title is valid", - "failure": "PR title is invalid", - "notice": "PR Title needs to pass regex '^(feat|fix|docs|test|ci|chore)!?(\\(.*\\))?!?:.*" - } - } \ No newline at end of file + "LABEL": { + "name": "title needs formatting", + "color": "EEEEEE" + }, + "CHECKS": { + "regexp": "^(feat|fix|docs|test|ci|chore)!?(\\(.*\\))?!?:.*" + }, + "MESSAGES": { + "success": "PR title is valid", + "failure": "PR title is invalid", + "notice": "PR Title needs to pass regex '^(feat|fix|docs|test|ci|chore)!?(\\(.*\\))?!?:.*" + } +} diff --git a/.github/tools/containerAppJobVerifier.sh b/.github/tools/containerAppJobVerifier.sh index e73f2606c..36be55d3a 100755 --- a/.github/tools/containerAppJobVerifier.sh +++ b/.github/tools/containerAppJobVerifier.sh @@ -31,25 +31,25 @@ echo " " verify_job_succeeded() { local current_job_execution - + current_job_execution=$(az containerapp job execution list -n "$job_name" -g "$resource_group" --query "$query_filter" 2>/dev/null) if [ -z "$current_job_execution" ]; then echo "No job execution found for job $job_name" return 1 fi - + current_job_execution_name=$(echo $current_job_execution | jq -r '.name') current_job_execution_status=$(echo $current_job_execution | jq -r '.status') echo "Container: $current_job_execution_name" echo "Running status: $current_job_execution_status" - + # Check job execution status if [[ $current_job_execution_status == "Succeeded" ]]; then return 0 # OK! elif [[ $current_job_execution_status == "Failed" ]]; then - echo "Job execution failed. Exiting script." + echo "Job execution failed. Exiting script." exit 1 else return 1 # Not OK! @@ -71,4 +71,4 @@ while true; do echo "Attempt $attempt: Waiting for job $job_name ..." sleep 10 # Sleep for 10 seconds fi -done \ No newline at end of file +done diff --git a/.github/tools/pwdGenerator.ps1 b/.github/tools/pwdGenerator.ps1 index f46dd6c7d..44a1d89b2 100644 --- a/.github/tools/pwdGenerator.ps1 +++ b/.github/tools/pwdGenerator.ps1 @@ -3,11 +3,11 @@ function Get-RandomCharacters([int]$length, [string]$characters) { $private:ofs="" return [string]$characters[$random] } -function Scramble-String([string]$inputString){ - $characterArray = $inputString.ToCharArray() - $scrambledStringArray = $characterArray | Get-Random -Count $characterArray.Length +function Scramble-String([string]$inputString){ + $characterArray = $inputString.ToCharArray() + $scrambledStringArray = $characterArray | Get-Random -Count $characterArray.Length $outputString = -join $scrambledStringArray - return $outputString + return $outputString } function GeneratePassword{ param( diff --git a/.github/tools/revisionVerifier.sh b/.github/tools/revisionVerifier.sh index 726f6e485..fdaa0004d 100755 --- a/.github/tools/revisionVerifier.sh +++ b/.github/tools/revisionVerifier.sh @@ -58,7 +58,7 @@ attempt=1 while true; do verify_revision result=$? - + case $result in $EXIT_SUCCESS) echo "Revision $revision_name is healthy and running" diff --git a/.github/workflows/ci-cd-prod.yml b/.github/workflows/ci-cd-prod.yml index 3fa558c4b..4313c0110 100644 --- a/.github/workflows/ci-cd-prod.yml +++ b/.github/workflows/ci-cd-prod.yml @@ -29,7 +29,7 @@ jobs: get-current-version: name: Get current version uses: ./.github/workflows/workflow-get-current-version.yml - + dry-run-deploy-infra: name: Dry run deploy infra to prod if: ${{ github.event_name == 'workflow_dispatch' || needs.check-for-changes.outputs.hasInfraChanges == 'true' }} @@ -103,7 +103,7 @@ jobs: version: ${{ needs.get-current-version.outputs.version }} dryRun: true runMigration: ${{ github.event_name == 'workflow_dispatch' || needs.check-for-changes.outputs.hasMigrationChanges == 'true' }} - + deploy-apps: name: Deploy apps to prod needs: diff --git a/.github/workflows/workflow-run-k6-performance.yml b/.github/workflows/workflow-run-k6-performance.yml index fdbf9b11a..17ddcadf5 100644 --- a/.github/workflows/workflow-run-k6-performance.yml +++ b/.github/workflows/workflow-run-k6-performance.yml @@ -5,7 +5,7 @@ on: inputs: apiVersion: required: true - type: string + type: string environment: required: true type: string @@ -20,7 +20,7 @@ on: type: string tokens: required: true - type: string + type: string secrets: TOKEN_GENERATOR_USERNAME: required: true @@ -48,11 +48,11 @@ jobs: ./tests/k6/tests/scripts/generate_tokens.sh ./tests/k6/tests/performancetest_data ${{ inputs.tokens }} k6 run ${{ inputs.testSuitePath }} --quiet --log-output=stdout --include-system-env-vars \ --vus=${{ inputs.vus }} --duration=${{ inputs.duration }} --out=cloud --out csv=./results.csv - grep http_req_duration ./results.csv | sort --field-separator=',' --key=3 -nr | head -10 + grep http_req_duration ./results.csv | sort --field-separator=',' --key=3 -nr | head -10 env: API_ENVIRONMENT: ${{ inputs.environment }} API_VERSION: ${{ inputs.apiVersion }} TOKEN_GENERATOR_USERNAME: ${{ secrets.TOKEN_GENERATOR_USERNAME }} - TOKEN_GENERATOR_PASSWORD: ${{ secrets.TOKEN_GENERATOR_PASSWORD }} + TOKEN_GENERATOR_PASSWORD: ${{ secrets.TOKEN_GENERATOR_PASSWORD }} K6_CLOUD_TOKEN: ${{ secrets.K6_CLOUD_TOKEN }} K6_CLOUD_PROJECT_ID: ${{ secrets.K6_CLOUD_PROJECT_ID }} diff --git a/.github/workflows/workflow-run-k6-tests.yml b/.github/workflows/workflow-run-k6-tests.yml index a866ab8c5..b8bea0f3e 100644 --- a/.github/workflows/workflow-run-k6-tests.yml +++ b/.github/workflows/workflow-run-k6-tests.yml @@ -5,7 +5,7 @@ on: inputs: apiVersion: required: true - type: string + type: string environment: required: true type: string @@ -40,7 +40,7 @@ jobs: API_ENVIRONMENT: ${{ inputs.environment }} API_VERSION: ${{ inputs.apiVersion }} TOKEN_GENERATOR_USERNAME: ${{ secrets.TOKEN_GENERATOR_USERNAME }} - TOKEN_GENERATOR_PASSWORD: ${{ secrets.TOKEN_GENERATOR_PASSWORD }} + TOKEN_GENERATOR_PASSWORD: ${{ secrets.TOKEN_GENERATOR_PASSWORD }} - name: Store test summary uses: actions/upload-artifact@v4