From 52b6055fe9a4b93e3cd675a98e6798b59aa05fe1 Mon Sep 17 00:00:00 2001 From: Calvin Bourdet <143567950+BouCal2335296@users.noreply.github.com> Date: Mon, 1 Sep 2025 11:36:34 -0400 Subject: [PATCH 1/9] test --- azure-pipelines.yml | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index 23402e427df..00000000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,3 +0,0 @@ -pool: MyAgentPool -steps: -- bash: echo hello world \ No newline at end of file From 0a82972a29c4bf25d8cd3dcc9cfbf4f06a80036a Mon Sep 17 00:00:00 2001 From: Calvin Bourdet <143567950+BouCal2335296@users.noreply.github.com> Date: Mon, 1 Sep 2025 11:38:00 -0400 Subject: [PATCH 2/9] Set up CI with Azure Pipelines [skip ci] --- azure-pipelines.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 00000000000..4786113a48b --- /dev/null +++ b/azure-pipelines.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 ca8d5245a3bdb688b46397b3494c147cb2798a40 Mon Sep 17 00:00:00 2001 From: Calvin Bourdet <143567950+BouCal2335296@users.noreply.github.com> Date: Sun, 5 Oct 2025 21:14:34 -0400 Subject: [PATCH 3/9] 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 6acdb8b8aad43616910b21d60e6605382f13932b Mon Sep 17 00:00:00 2001 From: Calvin Bourdet <143567950+BouCal2335296@users.noreply.github.com> Date: Sun, 5 Oct 2025 21:44:24 -0400 Subject: [PATCH 4/9] modif pipeline --- azure-pipelines.yml | 37 +++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 4786113a48b..1f0e0b5a1d0 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,8 +1,4 @@ # 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 @@ -13,5 +9,38 @@ variables: buildConfiguration: 'Release' steps: +# 1) Restore (si nécessaire) +- task: DotNetCoreCLI@2 + displayName: 'dotnet restore' + inputs: + command: 'restore' + projects: '**/*.csproj' + +# 2) Build - script: dotnet build --configuration $(buildConfiguration) displayName: 'dotnet build $(buildConfiguration)' + +# 3) Publish (génère les fichiers publiés + zip) +- task: DotNetCoreCLI@2 + displayName: 'dotnet publish and zip' + inputs: + command: 'publish' # -> IMPORTANT : 'command' (pas 'commands') + publishWebProjects: true # publie les projets web trouvés + arguments: '--configuration $(buildConfiguration) --output $(Build.ArtifactStagingDirectory)' + zipAfterPublish: true # produit un .zip des résultats publiés + +# 4) Publier l'artifact (ancienne façon : PublishBuildArtifacts@1) +- task: PublishBuildArtifacts@1 + displayName: 'Publish build artifacts (legacy)' + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)' # dossier contenant les .zip ou les fichiers publiés + ArtifactName: 'drop' # nom de l'artifact dans l'interface Azure DevOps + publishLocation: 'Container' + +# -- OU (recommandé pour Azure DevOps Services) utiliser PublishPipelineArtifact (meilleure perf) +# - task: PublishPipelineArtifact@1 +# displayName: 'Publish pipeline artifact (recommended)' +# inputs: +# targetPath: '$(Build.ArtifactStagingDirectory)' +# artifact: 'drop' +# publishLocation: 'pipeline' From e3bb82f226c65d2f28bdf0eaf96f3f577b079689 Mon Sep 17 00:00:00 2001 From: Calvin Bourdet <143567950+BouCal2335296@users.noreply.github.com> Date: Sun, 5 Oct 2025 21:45:42 -0400 Subject: [PATCH 5/9] modif pipeline2 --- azure-pipelines-1.yml | 37 +++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/azure-pipelines-1.yml b/azure-pipelines-1.yml index 4786113a48b..1f0e0b5a1d0 100644 --- a/azure-pipelines-1.yml +++ b/azure-pipelines-1.yml @@ -1,8 +1,4 @@ # 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 @@ -13,5 +9,38 @@ variables: buildConfiguration: 'Release' steps: +# 1) Restore (si nécessaire) +- task: DotNetCoreCLI@2 + displayName: 'dotnet restore' + inputs: + command: 'restore' + projects: '**/*.csproj' + +# 2) Build - script: dotnet build --configuration $(buildConfiguration) displayName: 'dotnet build $(buildConfiguration)' + +# 3) Publish (génère les fichiers publiés + zip) +- task: DotNetCoreCLI@2 + displayName: 'dotnet publish and zip' + inputs: + command: 'publish' # -> IMPORTANT : 'command' (pas 'commands') + publishWebProjects: true # publie les projets web trouvés + arguments: '--configuration $(buildConfiguration) --output $(Build.ArtifactStagingDirectory)' + zipAfterPublish: true # produit un .zip des résultats publiés + +# 4) Publier l'artifact (ancienne façon : PublishBuildArtifacts@1) +- task: PublishBuildArtifacts@1 + displayName: 'Publish build artifacts (legacy)' + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)' # dossier contenant les .zip ou les fichiers publiés + ArtifactName: 'drop' # nom de l'artifact dans l'interface Azure DevOps + publishLocation: 'Container' + +# -- OU (recommandé pour Azure DevOps Services) utiliser PublishPipelineArtifact (meilleure perf) +# - task: PublishPipelineArtifact@1 +# displayName: 'Publish pipeline artifact (recommended)' +# inputs: +# targetPath: '$(Build.ArtifactStagingDirectory)' +# artifact: 'drop' +# publishLocation: 'pipeline' From 838778074c2df129240043ec6b63c92f6be23e01 Mon Sep 17 00:00:00 2001 From: Calvin Bourdet <143567950+BouCal2335296@users.noreply.github.com> Date: Sun, 5 Oct 2025 21:51:20 -0400 Subject: [PATCH 6/9] pipeline test --- azure-pipelines-1.yml | 38 ++++++++------------- azure-pipelines.yml | 77 +++++++++++++++++++------------------------ 2 files changed, 46 insertions(+), 69 deletions(-) diff --git a/azure-pipelines-1.yml b/azure-pipelines-1.yml index 1f0e0b5a1d0..a7f77d99560 100644 --- a/azure-pipelines-1.yml +++ b/azure-pipelines-1.yml @@ -1,4 +1,8 @@ # 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 @@ -9,38 +13,22 @@ variables: buildConfiguration: 'Release' steps: -# 1) Restore (si nécessaire) -- task: DotNetCoreCLI@2 - displayName: 'dotnet restore' - inputs: - command: 'restore' - projects: '**/*.csproj' - -# 2) Build - script: dotnet build --configuration $(buildConfiguration) displayName: 'dotnet build $(buildConfiguration)' -# 3) Publish (génère les fichiers publiés + zip) +# 1️⃣ Tâche pour publier et empaqueter les résultats dans un .zip - task: DotNetCoreCLI@2 - displayName: 'dotnet publish and zip' + displayName: 'dotnet publish' inputs: - command: 'publish' # -> IMPORTANT : 'command' (pas 'commands') - publishWebProjects: true # publie les projets web trouvés + command: 'publish' + publishWebProjects: true arguments: '--configuration $(buildConfiguration) --output $(Build.ArtifactStagingDirectory)' - zipAfterPublish: true # produit un .zip des résultats publiés + zipAfterPublish: true -# 4) Publier l'artifact (ancienne façon : PublishBuildArtifacts@1) +# 2️⃣ Tâche pour publier le .zip comme artefact de build - task: PublishBuildArtifacts@1 - displayName: 'Publish build artifacts (legacy)' + condition: succeeded() inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)' # dossier contenant les .zip ou les fichiers publiés - ArtifactName: 'drop' # nom de l'artifact dans l'interface Azure DevOps + PathtoPublish: '$(Build.ArtifactStagingDirectory)' + ArtifactName: 'drop' publishLocation: 'Container' - -# -- OU (recommandé pour Azure DevOps Services) utiliser PublishPipelineArtifact (meilleure perf) -# - task: PublishPipelineArtifact@1 -# displayName: 'Publish pipeline artifact (recommended)' -# inputs: -# targetPath: '$(Build.ArtifactStagingDirectory)' -# artifact: 'drop' -# publishLocation: 'pipeline' diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 1f0e0b5a1d0..42b20e1746f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,46 +1,35 @@ # ASP.NET Core -trigger: -- main - -pool: - vmImage: ubuntu-latest - -variables: - buildConfiguration: 'Release' - -steps: -# 1) Restore (si nécessaire) -- task: DotNetCoreCLI@2 - displayName: 'dotnet restore' - inputs: - command: 'restore' - projects: '**/*.csproj' +# 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 -# 2) Build -- script: dotnet build --configuration $(buildConfiguration) - displayName: 'dotnet build $(buildConfiguration)' - -# 3) Publish (génère les fichiers publiés + zip) -- task: DotNetCoreCLI@2 - displayName: 'dotnet publish and zip' - inputs: - command: 'publish' # -> IMPORTANT : 'command' (pas 'commands') - publishWebProjects: true # publie les projets web trouvés - arguments: '--configuration $(buildConfiguration) --output $(Build.ArtifactStagingDirectory)' - zipAfterPublish: true # produit un .zip des résultats publiés - -# 4) Publier l'artifact (ancienne façon : PublishBuildArtifacts@1) -- task: PublishBuildArtifacts@1 - displayName: 'Publish build artifacts (legacy)' - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)' # dossier contenant les .zip ou les fichiers publiés - ArtifactName: 'drop' # nom de l'artifact dans l'interface Azure DevOps - publishLocation: 'Container' - -# -- OU (recommandé pour Azure DevOps Services) utiliser PublishPipelineArtifact (meilleure perf) -# - task: PublishPipelineArtifact@1 -# displayName: 'Publish pipeline artifact (recommended)' -# inputs: -# targetPath: '$(Build.ArtifactStagingDirectory)' -# artifact: 'drop' -# publishLocation: 'pipeline' +trigger: + - main + + pool: + vmImage: ubuntu-latest + + variables: + buildConfiguration: 'Release' + + steps: + - script: dotnet build --configuration $(buildConfiguration) + displayName: 'dotnet build $(buildConfiguration)' + + # 1️⃣ Tâche pour publier et empaqueter les résultats dans un .zip + - task: DotNetCoreCLI@2 + displayName: 'dotnet publish' + inputs: + command: 'publish' + publishWebProjects: true + arguments: '--configuration $(buildConfiguration) --output $(Build.ArtifactStagingDirectory)' + zipAfterPublish: true + + # 2️⃣ Tâche pour publier le .zip comme artefact de build + - task: PublishBuildArtifacts@1 + condition: succeeded() + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)' + ArtifactName: 'drop' + publishLocation: 'Container' + \ No newline at end of file From 2a35a4129c736066404567b5e4f16b3190001ee1 Mon Sep 17 00:00:00 2001 From: Calvin Bourdet <143567950+BouCal2335296@users.noreply.github.com> Date: Sun, 5 Oct 2025 21:54:56 -0400 Subject: [PATCH 7/9] ewc --- azure-pipelines-1.yml | 3 +-- azure-pipelines.yml | 54 +++++++++++++++++++++---------------------- 2 files changed, 27 insertions(+), 30 deletions(-) diff --git a/azure-pipelines-1.yml b/azure-pipelines-1.yml index a7f77d99560..ed4051efe75 100644 --- a/azure-pipelines-1.yml +++ b/azure-pipelines-1.yml @@ -4,8 +4,7 @@ # https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core trigger: -- main - + - main pool: vmImage: ubuntu-latest diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 42b20e1746f..ed4051efe75 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -5,31 +5,29 @@ trigger: - main - - pool: - vmImage: ubuntu-latest - - variables: - buildConfiguration: 'Release' - - steps: - - script: dotnet build --configuration $(buildConfiguration) - displayName: 'dotnet build $(buildConfiguration)' - - # 1️⃣ Tâche pour publier et empaqueter les résultats dans un .zip - - task: DotNetCoreCLI@2 - displayName: 'dotnet publish' - inputs: - command: 'publish' - publishWebProjects: true - arguments: '--configuration $(buildConfiguration) --output $(Build.ArtifactStagingDirectory)' - zipAfterPublish: true - - # 2️⃣ Tâche pour publier le .zip comme artefact de build - - task: PublishBuildArtifacts@1 - condition: succeeded() - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)' - ArtifactName: 'drop' - publishLocation: 'Container' - \ No newline at end of file +pool: + vmImage: ubuntu-latest + +variables: + buildConfiguration: 'Release' + +steps: +- script: dotnet build --configuration $(buildConfiguration) + displayName: 'dotnet build $(buildConfiguration)' + +# 1️⃣ Tâche pour publier et empaqueter les résultats dans un .zip +- task: DotNetCoreCLI@2 + displayName: 'dotnet publish' + inputs: + command: 'publish' + publishWebProjects: true + arguments: '--configuration $(buildConfiguration) --output $(Build.ArtifactStagingDirectory)' + zipAfterPublish: true + +# 2️⃣ Tâche pour publier le .zip comme artefact de build +- task: PublishBuildArtifacts@1 + condition: succeeded() + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)' + ArtifactName: 'drop' + publishLocation: 'Container' From b7c26569455b397ecca87b8414ccb43e2afd7161 Mon Sep 17 00:00:00 2001 From: Calvin Bourdet <143567950+BouCal2335296@users.noreply.github.com> Date: Sun, 5 Oct 2025 22:01:22 -0400 Subject: [PATCH 8/9] dwed --- azure-pipelines-1.yml | 51 +++++++++++++++++++++++++++---------------- azure-pipelines.yml | 51 +++++++++++++++++++++++++++---------------- 2 files changed, 64 insertions(+), 38 deletions(-) diff --git a/azure-pipelines-1.yml b/azure-pipelines-1.yml index ed4051efe75..70207a48067 100644 --- a/azure-pipelines-1.yml +++ b/azure-pipelines-1.yml @@ -1,32 +1,45 @@ -# 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 +- main + pool: - vmImage: ubuntu-latest + vmImage: 'windows-latest' variables: buildConfiguration: 'Release' + wwwrootDir: 'Tailspin.SpaceGame.Web/wwwroot' + dotnetSdkVersion: '6.x' steps: -- script: dotnet build --configuration $(buildConfiguration) - displayName: 'dotnet build $(buildConfiguration)' - -# 1️⃣ Tâche pour publier et empaqueter les résultats dans un .zip -- task: DotNetCoreCLI@2 - displayName: 'dotnet publish' +# Étape 1 : Installation du SDK .NET +- task: UseDotNet@2 + displayName: 'Install .NET SDK $(dotnetSdkVersion)' inputs: - command: 'publish' - publishWebProjects: true - arguments: '--configuration $(buildConfiguration) --output $(Build.ArtifactStagingDirectory)' - zipAfterPublish: true + packageType: 'sdk' + version: '$(dotnetSdkVersion)' + +# Étape 2 : Restauration des dépendances +- script: dotnet restore + displayName: 'Restore dependencies' + +# Étape 3 : Build du projet avec la configuration spécifiée +- script: dotnet build --configuration $(buildConfiguration) --no-restore + displayName: 'Build project ($(buildConfiguration))' + +# Étape 4 : Exécution des tests +- script: dotnet test --configuration $(buildConfiguration) --no-build --verbosity normal + displayName: 'Run unit tests' + +# Étape 5 : Compilation des fichiers Sass en CSS +- script: './node_modules/.bin/node-sass $(wwwrootDir) --output $(wwwrootDir)' + displayName: 'Compile Sass assets ($(wwwrootDir))' + +# Étape 6 : Publication des artefacts +- script: dotnet publish --configuration $(buildConfiguration) --output $(Build.ArtifactStagingDirectory) + displayName: 'Publish project ($(buildConfiguration))' -# 2️⃣ Tâche pour publier le .zip comme artefact de build +# Étape 7 : Téléversement de l’artefact de build - task: PublishBuildArtifacts@1 - condition: succeeded() + displayName: 'Upload artifact' inputs: PathtoPublish: '$(Build.ArtifactStagingDirectory)' ArtifactName: 'drop' diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ed4051efe75..70207a48067 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,32 +1,45 @@ -# 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 +- main + pool: - vmImage: ubuntu-latest + vmImage: 'windows-latest' variables: buildConfiguration: 'Release' + wwwrootDir: 'Tailspin.SpaceGame.Web/wwwroot' + dotnetSdkVersion: '6.x' steps: -- script: dotnet build --configuration $(buildConfiguration) - displayName: 'dotnet build $(buildConfiguration)' - -# 1️⃣ Tâche pour publier et empaqueter les résultats dans un .zip -- task: DotNetCoreCLI@2 - displayName: 'dotnet publish' +# Étape 1 : Installation du SDK .NET +- task: UseDotNet@2 + displayName: 'Install .NET SDK $(dotnetSdkVersion)' inputs: - command: 'publish' - publishWebProjects: true - arguments: '--configuration $(buildConfiguration) --output $(Build.ArtifactStagingDirectory)' - zipAfterPublish: true + packageType: 'sdk' + version: '$(dotnetSdkVersion)' + +# Étape 2 : Restauration des dépendances +- script: dotnet restore + displayName: 'Restore dependencies' + +# Étape 3 : Build du projet avec la configuration spécifiée +- script: dotnet build --configuration $(buildConfiguration) --no-restore + displayName: 'Build project ($(buildConfiguration))' + +# Étape 4 : Exécution des tests +- script: dotnet test --configuration $(buildConfiguration) --no-build --verbosity normal + displayName: 'Run unit tests' + +# Étape 5 : Compilation des fichiers Sass en CSS +- script: './node_modules/.bin/node-sass $(wwwrootDir) --output $(wwwrootDir)' + displayName: 'Compile Sass assets ($(wwwrootDir))' + +# Étape 6 : Publication des artefacts +- script: dotnet publish --configuration $(buildConfiguration) --output $(Build.ArtifactStagingDirectory) + displayName: 'Publish project ($(buildConfiguration))' -# 2️⃣ Tâche pour publier le .zip comme artefact de build +# Étape 7 : Téléversement de l’artefact de build - task: PublishBuildArtifacts@1 - condition: succeeded() + displayName: 'Upload artifact' inputs: PathtoPublish: '$(Build.ArtifactStagingDirectory)' ArtifactName: 'drop' From 070e3eafb16fb6670ae1da26df3261c1b3f272ea Mon Sep 17 00:00:00 2001 From: Calvin Bourdet <143567950+BouCal2335296@users.noreply.github.com> Date: Sun, 5 Oct 2025 22:09:28 -0400 Subject: [PATCH 9/9] Crate build.yml --- templates/build.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 templates/build.yml 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