From bf89f6bff030399290fe934e3bb7488bb2b918c9 Mon Sep 17 00:00:00 2001 From: Julius Ryan QUIAMBAO Date: Wed, 19 Mar 2025 12:18:34 +0800 Subject: [PATCH 01/12] bumped the .net version from 6.0 to 8.0 --- Tailspin.SpaceGame.Web/Tailspin.SpaceGame.Web.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tailspin.SpaceGame.Web/Tailspin.SpaceGame.Web.csproj b/Tailspin.SpaceGame.Web/Tailspin.SpaceGame.Web.csproj index 99f378f7a40..a3696867955 100644 --- a/Tailspin.SpaceGame.Web/Tailspin.SpaceGame.Web.csproj +++ b/Tailspin.SpaceGame.Web/Tailspin.SpaceGame.Web.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 {A0C4E31E-AC75-4F39-9F59-0AA19D9B8F46} From 613a70237ff5dfe16f229fee1897298f663ed23d Mon Sep 17 00:00:00 2001 From: jquiamba-coder <84034461+jquiamba-coder@users.noreply.github.com> Date: Wed, 19 Mar 2025 12:23:29 +0800 Subject: [PATCH 02/12] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines-1.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 azure-pipelines-1.yml diff --git a/azure-pipelines-1.yml b/azure-pipelines-1.yml new file mode 100644 index 00000000000..4786113a48b --- /dev/null +++ b/azure-pipelines-1.yml @@ -0,0 +1,17 @@ +# ASP.NET Core +# Build and test ASP.NET Core projects targeting .NET Core. +# Add steps that run tests, create a NuGet package, deploy, and more: +# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core + +trigger: +- main + +pool: + vmImage: ubuntu-latest + +variables: + buildConfiguration: 'Release' + +steps: +- script: dotnet build --configuration $(buildConfiguration) + displayName: 'dotnet build $(buildConfiguration)' From 561a4c883787dd157644b30bcd353fcc9c8da47e Mon Sep 17 00:00:00 2001 From: jquiamba-coder <84034461+jquiamba-coder@users.noreply.github.com> Date: Wed, 19 Mar 2025 12:26:25 +0800 Subject: [PATCH 03/12] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines-2.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 azure-pipelines-2.yml diff --git a/azure-pipelines-2.yml b/azure-pipelines-2.yml new file mode 100644 index 00000000000..4786113a48b --- /dev/null +++ b/azure-pipelines-2.yml @@ -0,0 +1,17 @@ +# ASP.NET Core +# Build and test ASP.NET Core projects targeting .NET Core. +# Add steps that run tests, create a NuGet package, deploy, and more: +# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core + +trigger: +- main + +pool: + vmImage: ubuntu-latest + +variables: + buildConfiguration: 'Release' + +steps: +- script: dotnet build --configuration $(buildConfiguration) + displayName: 'dotnet build $(buildConfiguration)' From 7c3900c308ade2433a8946edae68ad6406e4b034 Mon Sep 17 00:00:00 2001 From: jquiamba-coder <84034461+jquiamba-coder@users.noreply.github.com> Date: Wed, 19 Mar 2025 12:33:14 +0800 Subject: [PATCH 04/12] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines-3.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 azure-pipelines-3.yml diff --git a/azure-pipelines-3.yml b/azure-pipelines-3.yml new file mode 100644 index 00000000000..4786113a48b --- /dev/null +++ b/azure-pipelines-3.yml @@ -0,0 +1,17 @@ +# ASP.NET Core +# Build and test ASP.NET Core projects targeting .NET Core. +# Add steps that run tests, create a NuGet package, deploy, and more: +# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core + +trigger: +- main + +pool: + vmImage: ubuntu-latest + +variables: + buildConfiguration: 'Release' + +steps: +- script: dotnet build --configuration $(buildConfiguration) + displayName: 'dotnet build $(buildConfiguration)' From 1ec2cb770472ba886b4d2394dae4d7f7e60f40a8 Mon Sep 17 00:00:00 2001 From: jquiamba-coder <84034461+jquiamba-coder@users.noreply.github.com> Date: Thu, 20 Mar 2025 08:04:02 +0800 Subject: [PATCH 05/12] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines-4.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 azure-pipelines-4.yml diff --git a/azure-pipelines-4.yml b/azure-pipelines-4.yml new file mode 100644 index 00000000000..4786113a48b --- /dev/null +++ b/azure-pipelines-4.yml @@ -0,0 +1,17 @@ +# ASP.NET Core +# Build and test ASP.NET Core projects targeting .NET Core. +# Add steps that run tests, create a NuGet package, deploy, and more: +# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core + +trigger: +- main + +pool: + vmImage: ubuntu-latest + +variables: + buildConfiguration: 'Release' + +steps: +- script: dotnet build --configuration $(buildConfiguration) + displayName: 'dotnet build $(buildConfiguration)' From 50d31aee54fe12d83dc9ec7532f414815a5e1328 Mon Sep 17 00:00:00 2001 From: Julius Ryan QUIAMBAO Date: Sat, 22 Mar 2025 08:21:18 +0800 Subject: [PATCH 06/12] Add build tasks --- azure-pipelines.yml | 44 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 23402e427df..61d860ac9a6 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,3 +1,43 @@ -pool: MyAgentPool +trigger: +- '*' + +pool: + name: 'Default' # Replace Default with the name of your agent pool if you used a different pool + +variables: + buildConfiguration: 'Release' + steps: -- bash: echo hello world \ No newline at end of file +- task: UseDotNet@2 + displayName: 'Use .NET SDK 6.x' + inputs: + packageType: sdk + version: '6.x' + +- 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 0d11dfae485e703a88d090d81ea48c6be2d5b775 Mon Sep 17 00:00:00 2001 From: Julius Ryan QUIAMBAO Date: Sat, 22 Mar 2025 08:29:09 +0800 Subject: [PATCH 07/12] Add publish tasks --- azure-pipelines.yml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 61d860ac9a6..0170aa599b2 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -2,16 +2,12 @@ trigger: - '*' pool: - name: 'Default' # Replace Default with the name of your agent pool if you used a different pool - -variables: - buildConfiguration: 'Release' + name: 'Default' #replace if needed with name of your agent pool steps: - task: UseDotNet@2 displayName: 'Use .NET SDK 6.x' inputs: - packageType: sdk version: '6.x' - task: Npm@1 @@ -40,4 +36,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 5561e27e9b93c1bf0e2f6e43ade359436b40a913 Mon Sep 17 00:00:00 2001 From: Julius Ryan QUIAMBAO Date: Sat, 22 Mar 2025 09:08:03 +0800 Subject: [PATCH 08/12] Refactor common variables --- azure-pipelines.yml | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 0170aa599b2..fd2397915f2 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -4,18 +4,23 @@ trigger: pool: name: 'Default' #replace if needed with name of your agent pool +variables: + buildConfiguration: 'Release' + wwwrootDir: 'Tailspin.SpaceGame.Web/wwwroot' + dotnetSdkVersion: '6.x' + steps: - task: UseDotNet@2 - displayName: 'Use .NET SDK 6.x' + displayName: 'Use .NET SDK $(dotnetSdkVersion)' inputs: - version: '6.x' + 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 @@ -23,7 +28,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' @@ -32,21 +37,24 @@ 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 displayName: 'Publish Artifact: drop' - condition: succeeded() \ No newline at end of file + condition: succeeded() + +- script: './node_modules/.bin/node-sass $(wwwrootDir) --output $(wwwrootDir)' + displayName: 'Compile Sass assets' \ No newline at end of file From cacd82988e468abdf72b92d5eb66dbba29c64731 Mon Sep 17 00:00:00 2001 From: Julius Ryan QUIAMBAO Date: Sat, 22 Mar 2025 09:16:57 +0800 Subject: [PATCH 09/12] Support build configurations --- azure-pipelines.yml | 25 +++++++------------------ templates/build.yml | 19 +++++++++++++++++++ 2 files changed, 26 insertions(+), 18 deletions(-) create mode 100644 templates/build.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml index fd2397915f2..cb112e8e8c4 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -36,25 +36,14 @@ steps: command: 'restore' projects: '**/*.csproj' -- task: DotNetCoreCLI@2 - displayName: 'Build the project - $(buildConfiguration)' - inputs: - command: 'build' - arguments: '--no-restore --configuration $(buildConfiguration)' - projects: '**/*.csproj' +- template: templates/build.yml + parameters: + buildConfiguration: 'Debug' -- task: DotNetCoreCLI@2 - displayName: 'Publish the project - $(buildConfiguration)' - inputs: - command: 'publish' - projects: '**/*.csproj' - publishWebProjects: false - arguments: '--no-build --configuration $(buildConfiguration) --output $(Build.ArtifactStagingDirectory)/$(buildConfiguration)' - zipAfterPublish: true +- template: templates/build.yml + parameters: + buildConfiguration: 'Release' - task: PublishBuildArtifacts@1 displayName: 'Publish Artifact: drop' - condition: succeeded() - -- script: './node_modules/.bin/node-sass $(wwwrootDir) --output $(wwwrootDir)' - displayName: 'Compile Sass assets' \ No newline at end of file + condition: succeeded() \ No newline at end of file diff --git a/templates/build.yml b/templates/build.yml new file mode 100644 index 00000000000..15ca39ca575 --- /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 3a57dd525144c5df25ae9c8200f3c57010af2be9 Mon Sep 17 00:00:00 2001 From: Julius Ryan QUIAMBAO Date: Sat, 22 Mar 2025 09:35:12 +0800 Subject: [PATCH 10/12] Support build configurations --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index cb112e8e8c4..b18daf2a277 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -2,7 +2,7 @@ trigger: - '*' pool: - name: 'Default' #replace if needed with name of your agent pool + vmImage: 'ubuntu-latest' variables: buildConfiguration: 'Release' From 492f2157dc3524379bba986fa9cd8f3b696bd82d Mon Sep 17 00:00:00 2001 From: Julius Ryan QUIAMBAO Date: Sat, 22 Mar 2025 09:46:56 +0800 Subject: [PATCH 11/12] Support build configurations --- Tailspin.SpaceGame.Web/Tailspin.SpaceGame.Web.csproj | 2 +- azure-pipelines.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Tailspin.SpaceGame.Web/Tailspin.SpaceGame.Web.csproj b/Tailspin.SpaceGame.Web/Tailspin.SpaceGame.Web.csproj index a3696867955..99f378f7a40 100644 --- a/Tailspin.SpaceGame.Web/Tailspin.SpaceGame.Web.csproj +++ b/Tailspin.SpaceGame.Web/Tailspin.SpaceGame.Web.csproj @@ -1,7 +1,7 @@ - net8.0 + net6.0 {A0C4E31E-AC75-4F39-9F59-0AA19D9B8F46} diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b18daf2a277..76df5c9eb3c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -7,7 +7,7 @@ pool: variables: buildConfiguration: 'Release' wwwrootDir: 'Tailspin.SpaceGame.Web/wwwroot' - dotnetSdkVersion: '6.x' + dotnetSdkVersion: '6.0' steps: - task: UseDotNet@2 From 91b8b00471ae2ecad7334a366db1539da69d5475 Mon Sep 17 00:00:00 2001 From: Julius Ryan QUIAMBAO Date: Sat, 22 Mar 2025 09:48:44 +0800 Subject: [PATCH 12/12] Support build configurations --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 76df5c9eb3c..b18daf2a277 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -7,7 +7,7 @@ pool: variables: buildConfiguration: 'Release' wwwrootDir: 'Tailspin.SpaceGame.Web/wwwroot' - dotnetSdkVersion: '6.0' + dotnetSdkVersion: '6.x' steps: - task: UseDotNet@2