From cc738fdcd3779ba674976778557531c61b495434 Mon Sep 17 00:00:00 2001 From: Kim Zachariassen Date: Sun, 3 Nov 2019 11:00:17 -0500 Subject: [PATCH 01/10] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000..f9553af --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,38 @@ +# ASP.NET +# Build and test ASP.NET projects. +# Add steps that publish symbols, save build artifacts, deploy, and more: +# https://docs.microsoft.com/azure/devops/pipelines/apps/aspnet/build-aspnet-4 + +trigger: +- master + +pool: + vmImage: 'windows-latest' + +variables: + solution: '**/*.sln' + buildPlatform: 'Any CPU' + buildConfiguration: 'Release' + +steps: +- task: NuGetToolInstaller@1 + +- task: NuGetCommand@2 + inputs: + restoreSolution: '$(solution)' + +- task: BatchScript@1 + inputs: + filename: '$(Build.SourcesDirectory)\src\PokerLeagueManager.UI.Web\BuildAngular.bat' + +- task: VSBuild@1 + inputs: + solution: '$(solution)' + msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactStagingDirectory)"' + platform: '$(buildPlatform)' + configuration: '$(buildConfiguration)' + +- task: VSTest@2 + inputs: + platform: '$(buildPlatform)' + configuration: '$(buildConfiguration)' From c574551b072c2e8d149fa56a24d7c7bda072165c Mon Sep 17 00:00:00 2001 From: Kim Zachariassen Date: Sun, 3 Nov 2019 11:11:58 -0500 Subject: [PATCH 02/10] Update navbar.component.html --- .../angular/src/app/navbar/navbar.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PokerLeagueManager.UI.Web/angular/src/app/navbar/navbar.component.html b/src/PokerLeagueManager.UI.Web/angular/src/app/navbar/navbar.component.html index 254481e..bcb10d2 100644 --- a/src/PokerLeagueManager.UI.Web/angular/src/app/navbar/navbar.component.html +++ b/src/PokerLeagueManager.UI.Web/angular/src/app/navbar/navbar.component.html @@ -2,7 +2,7 @@ -

Recent Games - Dylan is Awesome

+

Recent Games - DevOps Iginite 2019

Sign In From 6ee6c9607c25d6f90922d4d7405ef273f61c606f Mon Sep 17 00:00:00 2001 From: Kim Zachariassen Date: Sun, 3 Nov 2019 11:23:22 -0500 Subject: [PATCH 03/10] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f9553af..cd5975c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -36,3 +36,9 @@ steps: inputs: platform: '$(buildPlatform)' configuration: '$(buildConfiguration)' + +- task: PublishBuildArtifacts@1 + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)' + ArtifactName: 'drop' + publishLocation: 'Container' \ No newline at end of file From 0db07b2ff5ececb3673172ab12265ed6e8a19ebc Mon Sep 17 00:00:00 2001 From: Kim Zachariassen Date: Sun, 3 Nov 2019 11:51:47 -0500 Subject: [PATCH 04/10] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index cd5975c..2cb026d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -28,10 +28,30 @@ steps: - task: VSBuild@1 inputs: solution: '$(solution)' - msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactStagingDirectory)"' + msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true' platform: '$(buildPlatform)' configuration: '$(buildConfiguration)' +- task: CopyFiles@1 + inputs: + SourceFolder: '$(Build.SourcesDirectory)\deploy' + Contents: '**\*' + TargetFolder: '$(Build.ArtifactStagingDirectory)' + flattenFolders: true + +- task: CopyFiles@2 + inputs: + SourceFolder: '$(Build.SourcesDirectory)\src\PokerLeagueManager.DB.EventStore\bin\Release\' + Contents: '**\*.dacpac' + TargetFolder: '$(Build.ArtifactStagingDirectory)' + flattenFolders: true + +- task: CopyFiles@2 + inputs: + SourceFolder: '$(Build.SourcesDirectory)' + Contents: '*.zip' + TargetFolder: '$(Build.ArtifactStagingDirectory)' + - task: VSTest@2 inputs: platform: '$(buildPlatform)' From 2a50201842fbeacdc6fca5912d65c9ba5611756a Mon Sep 17 00:00:00 2001 From: Kim Zachariassen Date: Sun, 3 Nov 2019 12:04:56 -0500 Subject: [PATCH 05/10] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 2cb026d..eea6539 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -36,22 +36,18 @@ steps: inputs: SourceFolder: '$(Build.SourcesDirectory)\deploy' Contents: '**\*' - TargetFolder: '$(Build.ArtifactStagingDirectory)' + TargetFolder: '$(Build.ArtifactStagingDirectory)\deploy' flattenFolders: true - task: CopyFiles@2 inputs: - SourceFolder: '$(Build.SourcesDirectory)\src\PokerLeagueManager.DB.EventStore\bin\Release\' - Contents: '**\*.dacpac' + SourceFolder: '$(Build.SourcesDirectory)\src' + Contents: | + **\*.dacpac + **\*.zip TargetFolder: '$(Build.ArtifactStagingDirectory)' flattenFolders: true -- task: CopyFiles@2 - inputs: - SourceFolder: '$(Build.SourcesDirectory)' - Contents: '*.zip' - TargetFolder: '$(Build.ArtifactStagingDirectory)' - - task: VSTest@2 inputs: platform: '$(buildPlatform)' From b75cbd4007ddf5aea9757c04ad81a80d9c37eb5d Mon Sep 17 00:00:00 2001 From: Kim Zachariassen Date: Sun, 3 Nov 2019 12:12:08 -0500 Subject: [PATCH 06/10] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index eea6539..e913551 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -44,7 +44,7 @@ steps: SourceFolder: '$(Build.SourcesDirectory)\src' Contents: | **\*.dacpac - **\*.zip + **\PokerLeagueManager*.zip TargetFolder: '$(Build.ArtifactStagingDirectory)' flattenFolders: true From ede7faeaa0def9436d4b6e76ff9240d4a87f1329 Mon Sep 17 00:00:00 2001 From: Kim Zachariassen Date: Sun, 3 Nov 2019 13:08:34 -0500 Subject: [PATCH 07/10] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e913551..0f6be89 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -48,6 +48,12 @@ steps: TargetFolder: '$(Build.ArtifactStagingDirectory)' flattenFolders: true +- task: CopyFiles@2 + inputs: + SourceFolder: '$(Build.SourcesDirectory)\src\PokerLeagueManager.Utilities\obj\Release' + Contents: '**\*' + TargetFolder: '$(Build.ArtifactStagingDirectory)\utilities' + - task: VSTest@2 inputs: platform: '$(buildPlatform)' From ecff8420ff6ecb131fda51f31cd0ccb06cbc43a2 Mon Sep 17 00:00:00 2001 From: Kim Zachariassen Date: Sun, 3 Nov 2019 13:21:52 -0500 Subject: [PATCH 08/10] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 0f6be89..1d82c55 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -50,7 +50,7 @@ steps: - task: CopyFiles@2 inputs: - SourceFolder: '$(Build.SourcesDirectory)\src\PokerLeagueManager.Utilities\obj\Release' + SourceFolder: '$(Build.SourcesDirectory)\src\PokerLeagueManager.Utilities\obj\$(buildConfiguration)' Contents: '**\*' TargetFolder: '$(Build.ArtifactStagingDirectory)\utilities' From b970fd904a86bce0f8076ed4711259e1fcdc718d Mon Sep 17 00:00:00 2001 From: Kim Zachariassen Date: Sun, 3 Nov 2019 15:41:17 -0500 Subject: [PATCH 09/10] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 1d82c55..c9ff650 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -50,7 +50,7 @@ steps: - task: CopyFiles@2 inputs: - SourceFolder: '$(Build.SourcesDirectory)\src\PokerLeagueManager.Utilities\obj\$(buildConfiguration)' + SourceFolder: '$(Build.SourcesDirectory)\src\PokerLeagueManager.Utilities\bin\$(buildConfiguration)' Contents: '**\*' TargetFolder: '$(Build.ArtifactStagingDirectory)\utilities' From 9dca380156c5d778c36d3ad844b4dc6ffc6d5feb Mon Sep 17 00:00:00 2001 From: Kim Zachariassen Date: Sun, 3 Nov 2019 16:11:47 -0500 Subject: [PATCH 10/10] Update ArmTemplate.json --- deploy/Azure ARM/ArmTemplate.json | 36 +++++++++++++++---------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/deploy/Azure ARM/ArmTemplate.json b/deploy/Azure ARM/ArmTemplate.json index 4d23a79..0e62bba 100644 --- a/deploy/Azure ARM/ArmTemplate.json +++ b/deploy/Azure ARM/ArmTemplate.json @@ -22,20 +22,20 @@ { "type": "Microsoft.Sql/servers", "apiVersion": "2015-05-01-preview", - "name": "foo", - "location": "foo", + "name": "[parameters('appname')]", + "location": "[resourceGroup().location]", "kind": "v12.0", "properties": { - "administratorLogin": "foo", - "administratorLoginPassword": "foo", + "administratorLogin": "dylan", + "administratorLoginPassword": "P2ssw0rd", "version": "12.0" } }, { "type": "Microsoft.Web/serverfarms", "apiVersion": "2016-09-01", - "name": "foo", - "location": "foo", + "name": "[parameters('appname')]", + "location": "[resourceGroup().location]", "sku": { "name": "B1", "tier": "Basic", @@ -49,7 +49,7 @@ "type": "Microsoft.Sql/servers/databases", "apiVersion": "2017-10-01-preview", "name": "[concat(parameters('appname'), '/Events')]", - "location": "foo", + "location": "[resourceGroup().location]", "dependsOn": [ "[resourceId('Microsoft.Sql/servers', parameters('appname'))]" ], @@ -68,10 +68,10 @@ { "type": "Microsoft.Sql/servers/databases", "apiVersion": "2017-10-01-preview", - "name": "foo", - "location": "foo", + "name": "[concat(parameters('appname'), '/Queries')]", + "location": "[resourceGroup().location]", "dependsOn": [ - "[resourceId('Microsoft.Sql/servers', foo)]" + "[resourceId('Microsoft.Sql/servers', parameters('appname'))]" ], "sku": { "name": "Standard", @@ -100,10 +100,10 @@ { "type": "Microsoft.Web/sites", "apiVersion": "2016-08-01", - "name": "foo", - "location": "foo", + "name": "[parameters('appname')]", + "location": "[resourceGroup().location]", "dependsOn": [ - "[resourceId('Microsoft.Web/serverfarms', foo)]" + "[resourceId('Microsoft.Web/serverfarms', parameters('appname'))]" ], "kind": "app", "properties": { @@ -120,8 +120,8 @@ "[concat('Microsoft.Insights/components/', parameters('appname'))]" ], "properties": { - "QueryServiceUrl": "[concat('http://', foo, '.azurewebsites.net')]", - "CommandServiceUrl": "[concat('http://', foo, '.azurewebsites.net')]", + "QueryServiceUrl": "[concat('http://', parameters('appname'), '-queries.azurewebsites.net')]", + "CommandServiceUrl": "[concat('http://', parameters('appname'), '-commands.azurewebsites.net')]", "AppInsightsKey": "[reference(resourceId('Microsoft.Insights/components', parameters('appname')), '2014-04-01').InstrumentationKey]" } } @@ -138,7 +138,7 @@ "kind": "app", "properties": { "enabled": true, - "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', foo)]" + "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', parameters('appname'))]" }, "resources": [ { @@ -148,7 +148,7 @@ "dependsOn": [ "[concat('Microsoft.Web/sites/', parameters('appname'), '-commands')]" ], "properties": { "default": { - "value": "[concat('Data Source=tcp:', reference(concat('Microsoft.Sql/servers/', foo)).fullyQualifiedDomainName, ',1433;Initial Catalog=foo;User Id=foo;Password=foo;')]", + "value": "[concat('Data Source=tcp:', reference(concat('Microsoft.Sql/servers/', parameters('appname'))).fullyQualifiedDomainName, ',1433;Initial Catalog=Events;User Id=dylan;Password=P2ssw0rd;')]", "type": "SQLAzure" } } @@ -162,7 +162,7 @@ "[concat('Microsoft.Insights/components/', parameters('appname'))]" ], "properties": { - "QueryServiceUrl": "[concat('http://', foo, '-queries.azurewebsites.net')]", + "QueryServiceUrl": "[concat('http://', parameters('appname'), '-queries.azurewebsites.net')]", "AppInsightsKey": "[reference(resourceId('Microsoft.Insights/components', parameters('appname')), '2014-04-01').InstrumentationKey]" } }