{"id":7384,"date":"2025-08-27T09:19:59","date_gmt":"2025-08-27T09:19:59","guid":{"rendered":"https:\/\/techhub.saworks.io\/docs\/tutoriel-github-intermediaire\/creer-des-applications-avec-azure-devops\/exercice-creer-plusieurs-configurations-en-utilisant-des-modeles\/"},"modified":"2025-09-24T12:02:34","modified_gmt":"2025-09-24T12:02:34","slug":"exercice-creer-plusieurs-configurations-en-utilisant-des-modeles","status":"publish","type":"docs","link":"https:\/\/techhub.saworks.io\/fr\/docs\/tutoriel-github-intermediaire\/creer-des-applications-avec-azure-devops\/exercice-creer-plusieurs-configurations-en-utilisant-des-modeles\/","title":{"rendered":"Exercice \u2013 Cr\u00e9er plusieurs configurations en utilisant des mod\u00e8les"},"content":{"rendered":"\n<div class=\"wp-block-group is-layout-constrained wp-block-group-is-layout-constrained\">\n<p><strong>Choisissez votre environnement de d\u00e9veloppement pour le module de formation.<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Environnement de d\u00e9veloppement local utilisant un agent h\u00e9berg\u00e9 par Microsoft<\/strong><\/li>\n\n\n\n<li><strong>Environnement de d\u00e9veloppement GitHub Codespaces utilisant un agent auto-h\u00e9berg\u00e9.<\/strong><\/li>\n<\/ul>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Dans les exercices pr\u00e9c\u00e9dents, vous avez mis en place un pipeline qui compile le site web du jeu <em>Space Game<\/em>. Vous avez commenc\u00e9 avec un script qui ex\u00e9cutait chaque action de compilation et vous avez associ\u00e9 chaque action \u00e0 sa t\u00e2che correspondante dans le pipeline. Le r\u00e9sultat du pipeline est un fichier <code>.zip<\/code> contenant l\u2019application web compil\u00e9e.<\/p>\n\n\n\n<p>Dans cet exercice, vous allez utiliser un <strong>mod\u00e8le<\/strong> pour d\u00e9finir des t\u00e2ches de compilation capables de compiler n\u2019importe quelle configuration d\u00e9finie dans le fichier de projet. Les <strong>mod\u00e8les<\/strong> permettent de d\u00e9finir une logique une seule fois et de la r\u00e9utiliser plusieurs fois. Ils combinent le contenu de plusieurs fichiers YAML en un seul pipeline.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-group has-light-green-cyan-background-color has-background is-layout-constrained wp-block-group-is-layout-constrained\" style=\"border-width:1px;border-radius:20px\">\n<h3 class=\"wp-block-heading\">\ud83d\udca1 <strong>Conseil<\/strong><\/h3>\n\n\n\n<p>Cette \u00e9tape du module est <strong>optionnelle<\/strong>. Si vous ne souhaitez pas apprendre les mod\u00e8les pour le moment, passez \u00e0 l\u2019\u00e9tape suivante : <strong>Nettoyer votre environnement Azure DevOps<\/strong>.<br>Pour en savoir plus sur les mod\u00e8les, consultez : <strong>Types de mod\u00e8les et leur utilisation<\/strong>.<\/p>\n<\/div>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Commen\u00e7ons par retrouver Mara et Amita.<\/strong><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>La d\u00e9monstration<\/strong><\/h4>\n\n\n\n<p>Mara, enthousiaste \u00e0 l\u2019id\u00e9e de partager ses r\u00e9sultats, retrouve Amita pour lui montrer le pipeline de compilation.<\/p>\n\n\n\n<p><strong>Amita<\/strong> : Je suis impressionn\u00e9e que tu aies r\u00e9ussi \u00e0 faire fonctionner \u00e7a aussi vite ! En fait, je venais justement te voir parce que j\u2019ai re\u00e7u un e-mail m\u2019informant que la compilation \u00e9tait pr\u00eate. Merci ! Je vois que le pipeline compile uniquement la configuration <em>Release<\/em>. Nous utilisons aussi des compilations <em>Debug<\/em> pour capturer des informations suppl\u00e9mentaires en cas de crash de l\u2019application. Peut-on l\u2019ajouter ?<\/p>\n\n\n\n<p><strong>Mara<\/strong> : Absolument. J\u2019ai oubli\u00e9 de prendre en compte les compilations <em>Debug<\/em> quand j\u2019ai mis \u00e7a en place. Et si on s\u2019asseyait ensemble pour l\u2019ajouter ?<\/p>\n\n\n\n<p><strong>Amita<\/strong> : Tu m\u2019as montr\u00e9 le fichier YAML qui d\u00e9finit les \u00e9tapes de compilation, mais je ne suis pas s\u00fbre de savoir comment le modifier.<\/p>\n\n\n\n<p><strong>Mara<\/strong> : Pas de souci. Tu peux regarder pendant que je tape. On peut y r\u00e9fl\u00e9chir ensemble.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Comment pourriez-vous d\u00e9finir les deux configurations de compilation ?<\/strong><\/h3>\n\n\n\n<p>Voici les t\u00e2ches qui compilent et publient la configuration <em>Release<\/em> du projet web <em>Space Game<\/em>.<br>(<strong>Ne copiez pas ce code dans votre fichier <code>azure-pipelines.yml<\/code> pour l\u2019instant.<\/strong>)<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#24292e;--cbp-line-number-width:calc(2 * 0.6 * .75rem);line-height:1rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#f2f2f2;color:#2f363c\">YAML<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#24292e;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>- task: DotNetCoreCLI@2\n  displayName: 'Build the project - Release'\n  inputs:\n    command: 'build'\n    arguments: '--no-restore --configuration Release'\n    projects: '**\/*.csproj'\n\n- task: DotNetCoreCLI@2\n  displayName: 'Publish the project - Release'\n  inputs:\n    command: 'publish'\n    projects: '**\/*.csproj'\n    publishWebProjects: false\n    arguments: '--no-build --configuration Release --output $(Build.ArtifactStagingDirectory)\/Release'\n    zipAfterPublish: true<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-light\" style=\"background-color: #fff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #24292E\">- <\/span><span style=\"color: #22863A\">task<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #032F62\">DotNetCoreCLI@2<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">  <\/span><span style=\"color: #22863A\">displayName<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #032F62\">&#39;Build the project - Release&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">  <\/span><span style=\"color: #22863A\">inputs<\/span><span style=\"color: #24292E\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">    <\/span><span style=\"color: #22863A\">command<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #032F62\">&#39;build&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">    <\/span><span style=\"color: #22863A\">arguments<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #032F62\">&#39;--no-restore --configuration Release&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">    <\/span><span style=\"color: #22863A\">projects<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #032F62\">&#39;**\/*.csproj&#39;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">- <\/span><span style=\"color: #22863A\">task<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #032F62\">DotNetCoreCLI@2<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">  <\/span><span style=\"color: #22863A\">displayName<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #032F62\">&#39;Publish the project - Release&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">  <\/span><span style=\"color: #22863A\">inputs<\/span><span style=\"color: #24292E\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">    <\/span><span style=\"color: #22863A\">command<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #032F62\">&#39;publish&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">    <\/span><span style=\"color: #22863A\">projects<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #032F62\">&#39;**\/*.csproj&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">    <\/span><span style=\"color: #22863A\">publishWebProjects<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #005CC5\">false<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">    <\/span><span style=\"color: #22863A\">arguments<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #032F62\">&#39;--no-build --configuration Release --output $(Build.ArtifactStagingDirectory)\/Release&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">    <\/span><span style=\"color: #22863A\">zipAfterPublish<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #005CC5\">true<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Pour compiler la configuration Debug<\/strong>, vous pourriez r\u00e9p\u00e9ter ces deux t\u00e2ches, mais en rempla\u00e7ant <strong>Release<\/strong> par <strong>Debug<\/strong>.<\/h3>\n\n\n\n<p>Cela vous donnerait le r\u00e9sultat souhait\u00e9, mais que se passe-t-il si votre processus de compilation devient plus complexe ou si vos exigences \u00e9voluent ?<br>Vous devrez alors localiser et modifier manuellement <strong>chaque variante<\/strong> de chaque t\u00e2che de compilation.<br>Et apr\u00e8s avoir ajout\u00e9 de nouvelles exigences de compilation, vous devrez cr\u00e9er <strong>deux t\u00e2ches suppl\u00e9mentaires<\/strong>, une pour la configuration <strong>Debug<\/strong> et une pour <strong>Release<\/strong>, afin de r\u00e9pondre \u00e0 ces nouvelles exigences.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Une meilleure solution consiste \u00e0 utiliser un mod\u00e8le.<\/strong><\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Qu\u2019est-ce qu\u2019un mod\u00e8le ?<\/strong><\/h4>\n\n\n\n<p>Un <strong>mod\u00e8le<\/strong> vous permet de d\u00e9finir une fois des t\u00e2ches de compilation communes et de les r\u00e9utiliser plusieurs fois.<\/p>\n\n\n\n<p>Vous appelez un mod\u00e8le depuis le pipeline parent comme une \u00e9tape de compilation. Vous pouvez \u00e9galement <strong>passer des param\u00e8tres<\/strong> au mod\u00e8le depuis le pipeline parent.<\/p>\n\n\n\n<p>Mara peut d\u00e9finir les t\u00e2ches de compilation et de publication de l\u2019application sous forme de mod\u00e8le, puis appliquer ce mod\u00e8le \u00e0 chaque configuration dont elle a besoin.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>D\u00e9finir le mod\u00e8le<\/strong><\/h3>\n\n\n\n<p>Rappelez-vous qu\u2019un mod\u00e8le permet de d\u00e9finir une fois des t\u00e2ches de compilation communes et de les r\u00e9utiliser plusieurs fois.<br>Vous appelez un mod\u00e8le depuis son pipeline parent comme une \u00e9tape de compilation, et vous pouvez lui transmettre des param\u00e8tres.<\/p>\n\n\n\n<p>Vous allez maintenant cr\u00e9er un mod\u00e8le capable de compiler <strong>n\u2019importe quelle configuration<\/strong> d\u00e9finie dans le fichier de projet.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Depuis la console int\u00e9gr\u00e9e de Visual Studio Code<\/strong>, \u00e0 la racine de votre projet, cr\u00e9ez un r\u00e9pertoire nomm\u00e9 <code>templates<\/code>.<\/h3>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#24292e;--cbp-line-number-width:calc(1 * 0.6 * .75rem);line-height:1rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#f2f2f2;color:#2f363c\">Bash<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#24292e;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>mkdir templates<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-light\" style=\"background-color: #fff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #6F42C1\">mkdir<\/span><span style=\"color: #24292E\"> <\/span><span style=\"color: #032F62\">templates<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>En pratique<\/strong>, vous pouvez placer un fichier de mod\u00e8le (<strong>template<\/strong>) \u00e0 n\u2019importe quel emplacement.<\/h3>\n\n\n\n<p>Il n\u2019est <strong>pas obligatoire<\/strong> de le mettre dans le r\u00e9pertoire <code>templates<\/code>.<\/p>\n\n\n\n<p>Dans <strong>Visual Studio Code<\/strong>, s\u00e9lectionnez <strong>Fichier &gt; Nouveau fichier<\/strong>.<br>Ensuite, pour enregistrer ce fichier vierge sous le nom <strong><code>build.yml<\/code><\/strong> dans le r\u00e9pertoire <code>templates<\/code> de votre projet, s\u00e9lectionnez <strong>Fichier &gt; Enregistrer<\/strong>.<br>Un exemple de chemin serait : <code>~\/mslearn-tailspin-spacegame-web\/templates<\/code>.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-group has-light-gray-background-color has-background is-layout-constrained wp-block-group-is-layout-constrained\" style=\"border-width:1px;border-radius:20px\">\n<h3 class=\"wp-block-heading\"><strong>Important<\/strong><\/h3>\n\n\n\n<p>Comme pr\u00e9c\u00e9demment, sous Windows, dans la liste <strong>Type d\u2019enregistrement<\/strong>, s\u00e9lectionnez <strong>YAML<\/strong>.<\/p>\n<\/div>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Dans <strong>Visual Studio Code<\/strong>, ajoutez le code suivant dans le fichier <code>build.yml<\/code> :<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#24292e;--cbp-line-number-width:calc(2 * 0.6 * .75rem);line-height:1rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#f2f2f2;color:#2f363c\">YAML<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#24292e;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>parameters:\n  buildConfiguration: 'Release'\n\nsteps:\n- task: DotNetCoreCLI@2\n  displayName: 'Build the project - ${{ parameters.buildConfiguration }}'\n  inputs:\n    command: 'build'\n    arguments: '--no-restore --configuration ${{ parameters.buildConfiguration }}'\n    projects: '**\/*.csproj'\n\n- task: DotNetCoreCLI@2\n  displayName: 'Publish the project - ${{ parameters.buildConfiguration }}'\n  inputs:\n    command: 'publish'\n    projects: '**\/*.csproj'\n    publishWebProjects: false\n    arguments: '--no-build --configuration ${{ parameters.buildConfiguration }} --output $(Build.ArtifactStagingDirectory)\/${{ parameters.buildConfiguration }}'\n    zipAfterPublish: true<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-light\" style=\"background-color: #fff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #22863A\">parameters<\/span><span style=\"color: #24292E\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">  <\/span><span style=\"color: #22863A\">buildConfiguration<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #032F62\">&#39;Release&#39;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #22863A\">steps<\/span><span style=\"color: #24292E\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">- <\/span><span style=\"color: #22863A\">task<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #032F62\">DotNetCoreCLI@2<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">  <\/span><span style=\"color: #22863A\">displayName<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #032F62\">&#39;Build the project - ${{ parameters.buildConfiguration }}&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">  <\/span><span style=\"color: #22863A\">inputs<\/span><span style=\"color: #24292E\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">    <\/span><span style=\"color: #22863A\">command<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #032F62\">&#39;build&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">    <\/span><span style=\"color: #22863A\">arguments<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #032F62\">&#39;--no-restore --configuration ${{ parameters.buildConfiguration }}&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">    <\/span><span style=\"color: #22863A\">projects<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #032F62\">&#39;**\/*.csproj&#39;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">- <\/span><span style=\"color: #22863A\">task<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #032F62\">DotNetCoreCLI@2<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">  <\/span><span style=\"color: #22863A\">displayName<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #032F62\">&#39;Publish the project - ${{ parameters.buildConfiguration }}&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">  <\/span><span style=\"color: #22863A\">inputs<\/span><span style=\"color: #24292E\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">    <\/span><span style=\"color: #22863A\">command<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #032F62\">&#39;publish&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">    <\/span><span style=\"color: #22863A\">projects<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #032F62\">&#39;**\/*.csproj&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">    <\/span><span style=\"color: #22863A\">publishWebProjects<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #005CC5\">false<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">    <\/span><span style=\"color: #22863A\">arguments<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #032F62\">&#39;--no-build --configuration ${{ parameters.buildConfiguration }} --output $(Build.ArtifactStagingDirectory)\/${{ parameters.buildConfiguration }}&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">    <\/span><span style=\"color: #22863A\">zipAfterPublish<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #005CC5\">true<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Ces t\u00e2ches ressemblent \u00e0 celles que vous avez d\u00e9finies pr\u00e9c\u00e9demment pour compiler et publier l\u2019application ; mais dans un <strong>mod\u00e8le<\/strong>, vous travaillez avec des <strong>param\u00e8tres d\u2019entr\u00e9e<\/strong> diff\u00e9remment des variables classiques. Voici deux diff\u00e9rences importantes :<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Dans un fichier de mod\u00e8le, utilisez la section <strong><code>parameters<\/code><\/strong> au lieu de <strong><code>variables<\/code><\/strong> pour d\u00e9finir les entr\u00e9es.<\/li>\n\n\n\n<li>Dans un fichier de mod\u00e8le, utilisez la syntaxe <strong><code>${{ }}<\/code><\/strong> au lieu de <strong><code>$()<\/code><\/strong> pour lire la valeur d\u2019un param\u00e8tre.<br>Lorsque vous lisez la valeur d\u2019un param\u00e8tre, vous devez inclure la section <code>parameters<\/code> dans son nom.<br>Par exemple : <strong><code>${{ parameters.buildConfiguration }}<\/code><\/strong><\/li>\n<\/ol>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Appeler le mod\u00e8le depuis le pipeline<\/strong><\/h3>\n\n\n\n<p>Vous allez maintenant <strong>appeler le mod\u00e8le<\/strong> que vous venez de cr\u00e9er depuis le pipeline.<br>Vous le ferez une fois pour la configuration <strong>Debug<\/strong>, puis vous r\u00e9p\u00e9terez le processus pour la configuration <strong>Release<\/strong>.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Dans <strong>Visual Studio Code<\/strong>, modifiez le fichier <strong><code>azure-pipelines.yml<\/code><\/strong> comme indiqu\u00e9 ici :<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#24292e;--cbp-line-number-width:calc(2 * 0.6 * .75rem);line-height:1rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#f2f2f2;color:#2f363c\">YAML<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#24292e;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>trigger:\n- '*'\n\npool:\n  name: 'Default' #replace if needed with name of your agent pool\n\nvariables:\n  buildConfiguration: 'Release'\n  wwwrootDir: 'Tailspin.SpaceGame.Web\/wwwroot'\n  dotnetSdkVersion: '6.x'\n\nsteps:\n- task: UseDotNet@2\n  displayName: 'Use .NET SDK $(dotnetSdkVersion)'\n  inputs:\n    version: '$(dotnetSdkVersion)'\n\n- task: Npm@1\n  displayName: 'Run npm install'\n  inputs:\n    verbose: false\n\n- script: '.\/node_modules\/.bin\/node-sass $(wwwrootDir) --output $(wwwrootDir)'\n  displayName: 'Compile Sass assets'\n\n- task: gulp@1\n  displayName: 'Run gulp tasks'\n\n- script: 'echo \"$(Build.DefinitionName), $(Build.BuildId), $(Build.BuildNumber)\" > buildinfo.txt'\n  displayName: 'Write build info'\n  workingDirectory: $(wwwrootDir)\n\n- task: DotNetCoreCLI@2\n  displayName: 'Restore project dependencies'\n  inputs:\n    command: 'restore'\n    projects: '**\/*.csproj'\n\n- template: templates\/build.yml\n  parameters:\n    buildConfiguration: 'Debug'\n\n- template: templates\/build.yml\n  parameters:\n    buildConfiguration: 'Release'\n\n- task: PublishBuildArtifacts@1\n  displayName: 'Publish Artifact: drop'\n  condition: succeeded()<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-light\" style=\"background-color: #fff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #22863A\">trigger<\/span><span style=\"color: #24292E\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">- <\/span><span style=\"color: #032F62\">&#39;*&#39;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #22863A\">pool<\/span><span style=\"color: #24292E\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">  <\/span><span style=\"color: #22863A\">name<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #032F62\">&#39;Default&#39;<\/span><span style=\"color: #24292E\"> <\/span><span style=\"color: #6A737D\">#replace if needed with name of your agent pool<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #22863A\">variables<\/span><span style=\"color: #24292E\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">  <\/span><span style=\"color: #22863A\">buildConfiguration<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #032F62\">&#39;Release&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">  <\/span><span style=\"color: #22863A\">wwwrootDir<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #032F62\">&#39;Tailspin.SpaceGame.Web\/wwwroot&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">  <\/span><span style=\"color: #22863A\">dotnetSdkVersion<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #032F62\">&#39;6.x&#39;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #22863A\">steps<\/span><span style=\"color: #24292E\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">- <\/span><span style=\"color: #22863A\">task<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #032F62\">UseDotNet@2<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">  <\/span><span style=\"color: #22863A\">displayName<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #032F62\">&#39;Use .NET SDK $(dotnetSdkVersion)&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">  <\/span><span style=\"color: #22863A\">inputs<\/span><span style=\"color: #24292E\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">    <\/span><span style=\"color: #22863A\">version<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #032F62\">&#39;$(dotnetSdkVersion)&#39;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">- <\/span><span style=\"color: #22863A\">task<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #032F62\">Npm@1<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">  <\/span><span style=\"color: #22863A\">displayName<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #032F62\">&#39;Run npm install&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">  <\/span><span style=\"color: #22863A\">inputs<\/span><span style=\"color: #24292E\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">    <\/span><span style=\"color: #22863A\">verbose<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #005CC5\">false<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">- <\/span><span style=\"color: #22863A\">script<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #032F62\">&#39;.\/node_modules\/.bin\/node-sass $(wwwrootDir) --output $(wwwrootDir)&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">  <\/span><span style=\"color: #22863A\">displayName<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #032F62\">&#39;Compile Sass assets&#39;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">- <\/span><span style=\"color: #22863A\">task<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #032F62\">gulp@1<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">  <\/span><span style=\"color: #22863A\">displayName<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #032F62\">&#39;Run gulp tasks&#39;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">- <\/span><span style=\"color: #22863A\">script<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #032F62\">&#39;echo &quot;$(Build.DefinitionName), $(Build.BuildId), $(Build.BuildNumber)&quot; &gt; buildinfo.txt&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">  <\/span><span style=\"color: #22863A\">displayName<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #032F62\">&#39;Write build info&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">  <\/span><span style=\"color: #22863A\">workingDirectory<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #032F62\">$(wwwrootDir)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">- <\/span><span style=\"color: #22863A\">task<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #032F62\">DotNetCoreCLI@2<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">  <\/span><span style=\"color: #22863A\">displayName<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #032F62\">&#39;Restore project dependencies&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">  <\/span><span style=\"color: #22863A\">inputs<\/span><span style=\"color: #24292E\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">    <\/span><span style=\"color: #22863A\">command<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #032F62\">&#39;restore&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">    <\/span><span style=\"color: #22863A\">projects<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #032F62\">&#39;**\/*.csproj&#39;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">- <\/span><span style=\"color: #22863A\">template<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #032F62\">templates\/build.yml<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">  <\/span><span style=\"color: #22863A\">parameters<\/span><span style=\"color: #24292E\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">    <\/span><span style=\"color: #22863A\">buildConfiguration<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #032F62\">&#39;Debug&#39;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">- <\/span><span style=\"color: #22863A\">template<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #032F62\">templates\/build.yml<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">  <\/span><span style=\"color: #22863A\">parameters<\/span><span style=\"color: #24292E\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">    <\/span><span style=\"color: #22863A\">buildConfiguration<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #032F62\">&#39;Release&#39;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">- <\/span><span style=\"color: #22863A\">task<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #032F62\">PublishBuildArtifacts@1<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">  <\/span><span style=\"color: #22863A\">displayName<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #032F62\">&#39;Publish Artifact: drop&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #24292E\">  <\/span><span style=\"color: #22863A\">condition<\/span><span style=\"color: #24292E\">: <\/span><span style=\"color: #032F62\">succeeded()<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Ce fichier ressemble \u00e0 l\u2019original, sauf qu\u2019il <strong>remplace les t\u00e2ches de compilation et de publication<\/strong> par des <strong>appels au mod\u00e8le<\/strong> qui effectue les m\u00eames t\u00e2ches.<\/p>\n\n\n\n<p>Vous verrez que le mod\u00e8le est appel\u00e9 <strong>une fois pour chaque configuration<\/strong>.<br>Pour transmettre le nom de la configuration au mod\u00e8le, chaque t\u00e2che du mod\u00e8le utilise l\u2019argument <strong><code>parameters<\/code><\/strong>.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Ex\u00e9cuter le pipeline<\/strong><\/h3>\n\n\n\n<p>Vous allez maintenant <strong>pousser vos modifications sur GitHub<\/strong> et observer l\u2019ex\u00e9cution du pipeline.<\/p>\n\n\n\n<p>Depuis le <strong>terminal int\u00e9gr\u00e9<\/strong>, ajoutez les fichiers <code>azure-pipelines.yml<\/code> et <code>templates\/build.yml<\/code> \u00e0 l\u2019index, validez les modifications (<strong>commit<\/strong>) et poussez-les sur GitHub.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.75rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#24292e;--cbp-line-number-width:calc(1 * 0.6 * .75rem);line-height:1rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#f2f2f2;color:#2f363c\">Bash<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#24292e;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>git add azure-pipelines.yml templates\/build.yml\ngit commit -m \"Support build configurations\"\ngit push origin build-pipeline<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-light\" style=\"background-color: #fff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #6F42C1\">git<\/span><span style=\"color: #24292E\"> <\/span><span style=\"color: #032F62\">add<\/span><span style=\"color: #24292E\"> <\/span><span style=\"color: #032F62\">azure-pipelines.yml<\/span><span style=\"color: #24292E\"> <\/span><span style=\"color: #032F62\">templates\/build.yml<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6F42C1\">git<\/span><span style=\"color: #24292E\"> <\/span><span style=\"color: #032F62\">commit<\/span><span style=\"color: #24292E\"> <\/span><span style=\"color: #005CC5\">-m<\/span><span style=\"color: #24292E\"> <\/span><span style=\"color: #032F62\">&quot;Support build configurations&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #6F42C1\">git<\/span><span style=\"color: #24292E\"> <\/span><span style=\"color: #032F62\">push<\/span><span style=\"color: #24292E\"> <\/span><span style=\"color: #032F62\">origin<\/span><span style=\"color: #24292E\"> <\/span><span style=\"color: #032F62\">build-pipeline<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Depuis <strong>Azure Pipelines<\/strong>, suivez l\u2019ex\u00e9cution de la compilation \u00e9tape par \u00e9tape, comme vous l\u2019avez fait pr\u00e9c\u00e9demment.<\/p>\n\n\n\n<p>Pendant l\u2019ex\u00e9cution du pipeline, vous verrez que le processus <strong>d\u00e9ploie les t\u00e2ches contenues dans le mod\u00e8le<\/strong>.<br>Les t\u00e2ches de compilation et de publication du projet sont ex\u00e9cut\u00e9es <strong>deux fois<\/strong> : une fois pour chaque configuration de compilation (<strong>Debug<\/strong> et <strong>Release<\/strong>).<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"256\" height=\"481\" data-src=\"https:\/\/techhub.saworks.io\/wp-content\/uploads\/2025\/08\/8-template-tasks.png\" alt=\"\" class=\"wp-image-7388 lazyload\" data-srcset=\"https:\/\/techhub.saworks.io\/wp-content\/uploads\/2025\/08\/8-template-tasks.png 256w, https:\/\/techhub.saworks.io\/wp-content\/uploads\/2025\/08\/8-template-tasks-160x300.png 160w\" data-sizes=\"(max-width: 256px) 100vw, 256px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 256px; --smush-placeholder-aspect-ratio: 256\/481;\" \/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Une fois la compilation termin\u00e9e, retournez \u00e0 la <strong>page de r\u00e9sum\u00e9<\/strong> et s\u00e9lectionnez l\u2019<strong>artefact publi\u00e9<\/strong>, comme vous l\u2019avez fait pr\u00e9c\u00e9demment.<br>D\u00e9veloppez le dossier <strong>drop<\/strong>.<\/p>\n\n\n\n<p>Vous verrez que le pipeline a produit un fichier <strong><code>.zip<\/code><\/strong> pour la configuration <strong>Debug<\/strong> et un autre pour la configuration <strong>Release<\/strong>.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"391\" height=\"335\" data-src=\"https:\/\/techhub.saworks.io\/wp-content\/uploads\/2025\/08\/8-artifacts-explorer.png\" alt=\"\" class=\"wp-image-7390 lazyload\" data-srcset=\"https:\/\/techhub.saworks.io\/wp-content\/uploads\/2025\/08\/8-artifacts-explorer.png 391w, https:\/\/techhub.saworks.io\/wp-content\/uploads\/2025\/08\/8-artifacts-explorer-300x257.png 300w\" data-sizes=\"(max-width: 391px) 100vw, 391px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 391px; --smush-placeholder-aspect-ratio: 391\/335;\" \/><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Fusionner la branche dans <code>main<\/code><\/strong><\/h3>\n\n\n\n<p>\u00c0 ce stade, vous avez un pipeline de compilation fonctionnel qui r\u00e9pond \u00e0 tous les besoins actuels de Mara.<\/p>\n\n\n\n<p>En pratique, vous soumettriez une <strong>pull request<\/strong> pour fusionner votre branche <code>build-pipeline<\/code> dans la branche <code>main<\/code>.<\/p>\n\n\n\n<p>Nous allons <strong>passer cette \u00e9tape pour le moment<\/strong>.<br>Dans le prochain module, vous apprendrez diff\u00e9rentes fa\u00e7ons de <strong>collaborer avec votre \u00e9quipe sur GitHub<\/strong>, notamment comment <strong>soumettre<\/strong>, <strong>examiner<\/strong> et <strong>fusionner<\/strong> des pull requests.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Choisissez votre environnement de d\u00e9veloppement pour le module de formation. Dans les exercices pr\u00e9c\u00e9dents, vous avez mis en place un pipeline qui compile [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":7024,"menu_order":39,"template":"","doc_tag":[],"doc_badge":[],"class_list":["post-7384","docs","type-docs","status-publish","hentry"],"author_avatar":"https:\/\/secure.gravatar.com\/avatar\/6a70e7c73db9f245e650948d09d74f61?s=96&d=mm&r=g","author_name":"Annick N'dri","_links":{"self":[{"href":"https:\/\/techhub.saworks.io\/fr\/wp-json\/wp\/v2\/docs\/7384"}],"collection":[{"href":"https:\/\/techhub.saworks.io\/fr\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/techhub.saworks.io\/fr\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/techhub.saworks.io\/fr\/wp-json\/wp\/v2\/users\/2"}],"version-history":[{"count":0,"href":"https:\/\/techhub.saworks.io\/fr\/wp-json\/wp\/v2\/docs\/7384\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/techhub.saworks.io\/fr\/wp-json\/wp\/v2\/docs\/7024"}],"wp:attachment":[{"href":"https:\/\/techhub.saworks.io\/fr\/wp-json\/wp\/v2\/media?parent=7384"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/techhub.saworks.io\/fr\/wp-json\/wp\/v2\/doc_tag?post=7384"},{"taxonomy":"doc_badge","embeddable":true,"href":"https:\/\/techhub.saworks.io\/fr\/wp-json\/wp\/v2\/doc_badge?post=7384"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}