Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure #15

Closed
wants to merge 21 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Build
on:
push:
branches:
- master # or the name of your main branch
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: sonarsource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
# If you wish to fail your job when the Quality Gate is red, uncomment the
# following lines. This would typically be used to fail a deployment.
# - uses: sonarsource/sonarqube-quality-gate-action@master
# timeout-minutes: 5
# env:
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This is a basic workflow to help you get started with Actions

name: Sample App deploy

######
# Controls when the workflow will run
on:
push:
Expand Down
36 changes: 18 additions & 18 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ pool:
vmImage: ubuntu-latest

variables:
webAppName: '<Name of your webapp>'
serviceConnection: '<Name of your webARM Service connection>'
azureSubscriptionId: '<Azure subscriptionId>'
loadTestResource: '<Name of your load test resource>'
loadTestResourceGroup: '<Name of your load test resource group>'
webAppName: 'hafiq-webapp'
serviceConnection: 'MyAzureLoadTestingRG'
azureSubscriptionId: 'ea9f37fa-15b5-4f77-95c0-80a03e0ef32a'
loadTestResource: 'Hafiq-EA-LT01'
loadTestResourceGroup: 'Hafiq-EA-LT01'
location: 'EAST US'


Expand Down Expand Up @@ -55,11 +55,11 @@ stages:
- task: AzureResourceManagerTemplateDeployment@3
inputs:
deploymentScope: 'Resource Group'
azureResourceManagerConnection: $(serviceConnection)
subscriptionId: $(azureSubscriptionId)
azureResourceManagerConnection: 'AJ-MPN-DEV2 (ea9f37fa-15b5-4f77-95c0-80a03e0ef32a)'
subscriptionId: '$(azureSubscriptionId)'
action: 'Create Or Update Resource Group'
resourceGroupName: '$(webAppName)-rg'
location: $(location)
location: '$(location)'
templateLocation: 'Linked artifact'
csmFile: '$(System.DefaultWorkingDirectory)/windows-webapp-template.json'
overrideParameters: '-webAppName $(webAppName) -hostingPlanName $(webAppName)-host -appInsightsLocation "$(location)" -databaseAccountId $(webAppName)db -databaseAccountLocation "$(location)"'
Expand All @@ -76,7 +76,7 @@ stages:

- task: AzureAppServiceSettings@1
inputs:
azureSubscription: $(serviceConnection)
azureSubscription: 'AJ-MPN-DEV2 (ea9f37fa-15b5-4f77-95c0-80a03e0ef32a)'
appName: '$(webAppName)'
resourceGroupName: '$(webAppName)-rg'
appSettings: |
Expand Down Expand Up @@ -110,9 +110,9 @@ stages:
- task: AzureRmWebAppDeployment@4
inputs:
ConnectionType: 'AzureRM'
azureSubscription: $(serviceConnection)
azureSubscription: 'AJ-MPN-DEV2 (ea9f37fa-15b5-4f77-95c0-80a03e0ef32a)'
appType: 'webApp'
WebAppName: $(webAppName)
WebAppName: '$(webAppName)'
packageForLinux: '$(Pipeline.Workspace)/$(Build.BuildId).zip'
ScriptType: 'Inline Script'
InlineScript: 'npm install'
Expand All @@ -131,23 +131,23 @@ stages:
- task: AzureResourceManagerTemplateDeployment@3
inputs:
deploymentScope: 'Resource Group'
azureResourceManagerConnection: $(serviceConnection)
subscriptionId: $(azureSubscriptionId)
azureResourceManagerConnection: 'AJ-MPN-DEV2 (ea9f37fa-15b5-4f77-95c0-80a03e0ef32a)'
subscriptionId: '$(azureSubscriptionId)'
action: 'Create Or Update Resource Group'
resourceGroupName: $(loadTestResourceGroup)
resourceGroupName: '$(loadTestResourceGroup)'
location: '$(location)'
templateLocation: 'Linked artifact'
csmFile: '$(System.DefaultWorkingDirectory)/ARMTemplate/template.json'
csmParametersFile: '$(System.DefaultWorkingDirectory)/ARMTemplate/parameters.json'
overrideParameters: '-name $(loadTestResource) -location "$(location)"'
deploymentMode: 'Incremental'
deploymentMode: 'Incremental'

- task: AzureLoadTest@1
inputs:
azureSubscription: $(serviceConnection)
azureSubscription: 'AJ-MPN-DEV2 (ea9f37fa-15b5-4f77-95c0-80a03e0ef32a)'
loadTestConfigFile: 'SampleApp.yaml'
resourceGroup: $(loadTestResourceGroup)
loadTestResource: $(loadTestResource)
resourceGroup: '$(loadTestResourceGroup)'
loadTestResource: '$(loadTestResource)'
env: |
[
{
Expand Down
3 changes: 3 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
sonar.projectKey=LoadTesting

##