This file contains hidden or 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
| param location string = resourceGroup().location | |
| param clusteruser string = 'clusteradmin' | |
| param sshuser string = 'sshadmin' | |
| @secure() | |
| param clusterpassword string = 'ChangeMe12345' | |
| @secure() | |
| param sshpassword string = '12345ChangeMe' | |
| resource storage 'Microsoft.Storage/storageAccounts@2021-02-01' = { | |
| name: 'storhdi${uniqueString(resourceGroup().id)}' |
This file contains hidden or 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
| // The following will create an Azure Function app on | |
| // a consumption plan, along with a storage account | |
| // and application insights. | |
| param location string = resourceGroup().location | |
| param appNamePrefix string = uniqueString(resourceGroup().id) | |
| param workspaceResourceId string | |
| var functionAppName = '${appNamePrefix}-functionapp' |
This file contains hidden or 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
| { | |
| "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", | |
| "contentVersion": "1.0.0.0", | |
| "parameters": { | |
| "appName": { | |
| "type": "string" | |
| }, | |
| "sku": { | |
| "type": "string", | |
| "defaultValue": "F1", |
This file contains hidden or 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
| name: "Terraform Plan" | |
| on: pull_request | |
| jobs: | |
| terraform: | |
| name: "Run Terraform Plan" | |
| runs-on: ubuntu-latest | |
| # Add env variables for service principal | |
| env: | |
| ARM_CLIENT_ID: ${{ secrets.TF_VAR_ARM_CLIENT_ID }} | |
| ARM_CLIENT_SECRET: ${{ secrets.TF_VAR_ARM_CLIENT_SECRET }} |
This file contains hidden or 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
| jobs: | |
| terraform: | |
| name: "Run Terraform Plan" | |
| runs-on: ubuntu-latest | |
| # Add env variables for service principal | |
| env: | |
| ARM_CLIENT_ID: ${{ secrets.TF_VAR_ARM_CLIENT_ID }} | |
| ARM_CLIENT_SECRET: ${{ secrets.TF_VAR_ARM_CLIENT_SECRET }} | |
| ARM_SUBSCRIPTION_ID: ${{ secrets.TF_VAR_ARM_SUBSCRIPTION_ID }} | |
| ARM_TENANT_ID: ${{ secrets.TF_VAR_ARM_TENANT_ID }} |
This file contains hidden or 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
| name: $(Major).$(Minor).$(Patch) | |
| variables: | |
| buildConfiguration: 'Release' | |
| dotnetSdkVersion: '2.1.505' | |
| serviceConnection: 'tailspin-space-game-rg' | |
| appName: 'tailspin-space-game-web' | |
| appID: '26178' | |
| SITE_URL: 'https://$(appName)-$(System.StageName)-$(appID).azurewebsites.net' | |
| wwwrootDir: 'Tailspin.SpaceGame.Web/wwwroot' | |
| Major: '1' |
This file contains hidden or 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
| steps: | |
| - ${{ if eq(resources.repositories['self'].ref, resources.repositories['self'].defaultBranch) }}: | |
| - task: SonarQubeAnalyze@4 | |
| displayName: 'Run Code Analysis (injected from decorator)' |
This file contains hidden or 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
| steps: | |
| - ${{ if eq(resources.repositories['self'].ref, resources.repositories['self'].defaultBranch) }}: | |
| - task: SonarQubePrepare@4 | |
| displayName: 'Prepare Code Analysis (injected from decorator)' | |
| inputs: | |
| SonarQube: 'My SonarQube Server' | |
| scannerMode: 'MSBuild' | |
| projectKey: '$(Build.DefinitionName)' | |
| projectName: '$(Build.DefinitionName)' | |
| projectVersion: '$(Build.BuildId)' |
This file contains hidden or 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
| { | |
| "manifestVersion": 1, | |
| "id": "pipelinedecorator", | |
| "name": "SonarQube Decorator Example", | |
| "version": "1.0.2", | |
| "publisher": "MarcusFelling-Blog", | |
| "targets": [ | |
| { | |
| "id": "Microsoft.VisualStudio.Services" | |
| } |
This file contains hidden or 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
| using namespace System.Net | |
| # Input bindings are passed in via param block. | |
| param($Request, $TriggerMetadata) | |
| # Write to the Azure Functions log stream. | |
| "PowerShell HTTP trigger function processed a request." | |
| # Get Personal Access Token (PAT) from query parameter of the request. | |
| $PAT = $Request.Query.PAT |