From 1d5e4a4b6ab7d2ce663dcf48c04c2fa8cb45ce1e Mon Sep 17 00:00:00 2001 From: KBRauxa Date: Fri, 27 Sep 2019 15:08:14 +0530 Subject: [PATCH 01/11] Add Image Pool - First Commit --- azure-pipelines.yml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 00000000000..5b386089b72 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,3 @@ +pool: + vmImage: 'Ubuntu-16.04' + From 4db8e904c2cd64d6ffcce33158930543fa338cf9 Mon Sep 17 00:00:00 2001 From: KBRauxa Date: Fri, 27 Sep 2019 15:27:45 +0530 Subject: [PATCH 02/11] Second Committ --- azure-pipelines.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5b386089b72..9ebf27dc2fa 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,3 +1,38 @@ pool: vmImage: 'Ubuntu-16.04' + demands: + - npm +steps: +- task: DotNetCoreInstaller@0 + displayName: 'Use .NET Core SDK 2.1.505' + inputs: + version: 2.1.505 + +- task: Npm@1 + displayName: 'Run npm install' + inputs: + verbose: false + +- script: './node_modules/.bin/node-sass Tailspin.SpaceGame.Web/wwwroot --output Tailspin.SpaceGame.Web/wwwroot' + displayName: 'Compile Sass assets' + +- task: gulp@1 + displayName: 'Run gulp tasks' + +- script: 'echo "$(Build.DefinitionName), $(Build.BuildId), $(Build.BuildNumber)" > buildinfo.txt' + displayName: 'Write build info' + workingDirectory: Tailspin.SpaceGame.Web/wwwroot + +- task: DotNetCoreCLI@2 + displayName: 'Restore project dependencies' + inputs: + command: 'restore' + projects: '**/*.csproj' + +- task: DotNetCoreCLI@2 + displayName: 'Build the project - Release' + inputs: + command: 'build' + arguments: '--no-restore --configuration Release' + projects: '**/*.csproj' \ No newline at end of file From 67777d74b9fa293473c18699bbe0068d50f5b155 Mon Sep 17 00:00:00 2001 From: KBRauxa Date: Fri, 27 Sep 2019 16:11:32 +0530 Subject: [PATCH 03/11] Add publish tasks --- azure-pipelines.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 9ebf27dc2fa..45f14f8363e 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -35,4 +35,17 @@ steps: inputs: command: 'build' arguments: '--no-restore --configuration Release' - projects: '**/*.csproj' \ No newline at end of file + projects: '**/*.csproj' + +- task: DotNetCoreCLI@2 + displayName: 'Publish the project - Release' + inputs: + command: 'publish' + projects: '**/*.csproj' + publishWebProjects: false + arguments: '--no-build --configuration Release --output $(Build.ArtifactStagingDirectory)/Release' + zipAfterPublish: true + +- task: PublishBuildArtifacts@1 + displayName: 'Publish Artifact: drop' + condition: succeeded() \ No newline at end of file From 1b92f516f88ed5192bf74c8aff00761a5e8f90ee Mon Sep 17 00:00:00 2001 From: KBRauxa Date: Fri, 27 Sep 2019 16:23:28 +0530 Subject: [PATCH 04/11] Refactor common variables --- azure-pipelines.yml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 45f14f8363e..947142dd8c9 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -3,18 +3,23 @@ pool: demands: - npm +variables: + buildConfiguration: 'Release' + wwwrootDir: 'Tailspin.SpaceGame.Web/wwwroot' + dotnetSdkVersion: '2.1.505 + steps: - task: DotNetCoreInstaller@0 - displayName: 'Use .NET Core SDK 2.1.505' + displayName: 'Use .NET Core SDK $(dotnetSdkVersion)' inputs: - version: 2.1.505 + version: '$(dotnetSdkVersion)'' - task: Npm@1 displayName: 'Run npm install' inputs: verbose: false -- script: './node_modules/.bin/node-sass Tailspin.SpaceGame.Web/wwwroot --output Tailspin.SpaceGame.Web/wwwroot' +- script: './node_modules/.bin/node-sass $(wwwrootDir) --output $(wwwrootDir)' displayName: 'Compile Sass assets' - task: gulp@1 @@ -22,7 +27,7 @@ steps: - script: 'echo "$(Build.DefinitionName), $(Build.BuildId), $(Build.BuildNumber)" > buildinfo.txt' displayName: 'Write build info' - workingDirectory: Tailspin.SpaceGame.Web/wwwroot + workingDirectory: $(wwwrootDir) - task: DotNetCoreCLI@2 displayName: 'Restore project dependencies' @@ -31,19 +36,19 @@ steps: projects: '**/*.csproj' - task: DotNetCoreCLI@2 - displayName: 'Build the project - Release' + displayName: 'Build the project - $(buildConfiguration)' inputs: command: 'build' - arguments: '--no-restore --configuration Release' + arguments: '--no-restore --configuration $(buildConfiguration)' projects: '**/*.csproj' - task: DotNetCoreCLI@2 - displayName: 'Publish the project - Release' + displayName: 'Publish the project - $(buildConfiguration)' inputs: command: 'publish' projects: '**/*.csproj' publishWebProjects: false - arguments: '--no-build --configuration Release --output $(Build.ArtifactStagingDirectory)/Release' + arguments: '--no-build --configuration $(buildConfiguration) --output $(Build.ArtifactStagingDirectory)/$(buildConfiguration)' zipAfterPublish: true - task: PublishBuildArtifacts@1 From 395c049754a2f8179f24078e586dcc61e868e947 Mon Sep 17 00:00:00 2001 From: KBRauxa Date: Fri, 27 Sep 2019 16:25:32 +0530 Subject: [PATCH 05/11] Refactor common variables 1 --- azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 947142dd8c9..8f14f8cfa2e 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -6,13 +6,13 @@ pool: variables: buildConfiguration: 'Release' wwwrootDir: 'Tailspin.SpaceGame.Web/wwwroot' - dotnetSdkVersion: '2.1.505 + dotnetSdkVersion: '2.1.505' steps: - task: DotNetCoreInstaller@0 displayName: 'Use .NET Core SDK $(dotnetSdkVersion)' inputs: - version: '$(dotnetSdkVersion)'' + version: '$(dotnetSdkVersion)' - task: Npm@1 displayName: 'Run npm install' From 15de9e9f508167f033fd3ed0840ca550b82fc2ed Mon Sep 17 00:00:00 2001 From: KBRauxa Date: Fri, 27 Sep 2019 16:36:16 +0530 Subject: [PATCH 06/11] Support build configurations --- azure-pipelines.yml | 8 ++++++++ templates/build.yml | 19 +++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 templates/build.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 8f14f8cfa2e..6820d9b86b0 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -51,6 +51,14 @@ steps: arguments: '--no-build --configuration $(buildConfiguration) --output $(Build.ArtifactStagingDirectory)/$(buildConfiguration)' zipAfterPublish: true +- template: templates/build.yml + parameters: + buildConfiguration: 'Debug' + +- template: templates/build.yml + parameters: + buildConfiguration: 'Release' + - task: PublishBuildArtifacts@1 displayName: 'Publish Artifact: drop' condition: succeeded() \ No newline at end of file diff --git a/templates/build.yml b/templates/build.yml new file mode 100644 index 00000000000..adb464a80a7 --- /dev/null +++ b/templates/build.yml @@ -0,0 +1,19 @@ +parameters: + buildConfiguration: 'Release' + +steps: +- task: DotNetCoreCLI@2 + displayName: 'Build the project - ${{ parameters.buildConfiguration }}' + inputs: + command: 'build' + arguments: '--no-restore --configuration ${{ parameters.buildConfiguration }}' + projects: '**/*.csproj' + +- task: DotNetCoreCLI@2 + displayName: 'Publish the project - ${{ parameters.buildConfiguration }}' + inputs: + command: 'publish' + projects: '**/*.csproj' + publishWebProjects: false + arguments: '--no-build --configuration ${{ parameters.buildConfiguration }} --output $(Build.ArtifactStagingDirectory)/${{ parameters.BuildConfiguration }}' + zipAfterPublish: true \ No newline at end of file From 9b62fbca76da953d785800df1851ef056353638a Mon Sep 17 00:00:00 2001 From: KBRauxa Date: Fri, 27 Sep 2019 17:38:54 +0530 Subject: [PATCH 07/11] Improve the text at the top of the home page --- Tailspin.SpaceGame.Web/Views/Home/Index.cshtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tailspin.SpaceGame.Web/Views/Home/Index.cshtml b/Tailspin.SpaceGame.Web/Views/Home/Index.cshtml index f7c4c886074..de1287f0302 100644 --- a/Tailspin.SpaceGame.Web/Views/Home/Index.cshtml +++ b/Tailspin.SpaceGame.Web/Views/Home/Index.cshtml @@ -5,7 +5,7 @@
Space Game -

An example site for learning

+

Welcome to the official Space Game Site!

From cb74809f7ebb4c42936baa47a45782ab7ab3febd Mon Sep 17 00:00:00 2001 From: ksbhatt1107 Date: Fri, 27 Sep 2019 17:49:20 +0530 Subject: [PATCH 08/11] Add Build Badge --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 80ef5ab6193..358447d8987 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ +[![Build Status](https://dev.azure.com/AddactTech/SpaceGameGIT/_apis/build/status/ksbhatt1107.mslearn-tailspin-spacegame-web?branchName=master)](https://dev.azure.com/AddactTech/SpaceGameGIT/_build/latest?definitionId=3&branchName=master) + # Contributing This project welcomes contributions and suggestions. Most contributions require you to agree to a From 360f65e783137455491f7dcbddfb47d70a352b77 Mon Sep 17 00:00:00 2001 From: ksbhatt1107 Date: Tue, 1 Oct 2019 18:42:57 +0530 Subject: [PATCH 09/11] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6820d9b86b0..67e19d31c13 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,5 +1,5 @@ pool: - vmImage: 'Ubuntu-16.04' + vmImage: 'MyAgentPool' demands: - npm From c2d6133681aa67e7972ea3ffb12a06d479be0669 Mon Sep 17 00:00:00 2001 From: ksbhatt1107 Date: Tue, 1 Oct 2019 18:44:24 +0530 Subject: [PATCH 10/11] 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 67e19d31c13..c25575d1ae1 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,5 +1,5 @@ pool: - vmImage: 'MyAgentPool' + vmImage: 'MyLinuxAgent' demands: - npm From e3adbf8c1724709cec1986ff55b8bc6deba16b63 Mon Sep 17 00:00:00 2001 From: ksbhatt1107 Date: Tue, 1 Oct 2019 18:45:38 +0530 Subject: [PATCH 11/11] 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 c25575d1ae1..67e19d31c13 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,5 +1,5 @@ pool: - vmImage: 'MyLinuxAgent' + vmImage: 'MyAgentPool' demands: - npm