From 8cbc6c42eca6edf9e4091cf6e1fc8380aa5b098b Mon Sep 17 00:00:00 2001 From: Gabe Stocco <98900+gfs@users.noreply.github.com> Date: Mon, 18 Mar 2024 17:43:36 -0700 Subject: [PATCH 01/23] Try modifying CLI PR pipeline to use new base template --- Changelog.md | 4 + Pipelines/cli/devskim-cli-pr.yml | 140 +++++++++++++++++-------------- 2 files changed, 82 insertions(+), 62 deletions(-) diff --git a/Changelog.md b/Changelog.md index 44e2430c..c5777608 100644 --- a/Changelog.md +++ b/Changelog.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.0.34] - 2024-3-18 +### Pipeline +Pipeline only changes + ## [1.0.33] - 2024-3-13 ### Fix Fixes properly setting the default value for the `OutputFileFormat` and `OutputTextFormat` fields when using the `options-json` argument to the analyze command. diff --git a/Pipelines/cli/devskim-cli-pr.yml b/Pipelines/cli/devskim-cli-pr.yml index 4e30ff47..fc5c19f0 100644 --- a/Pipelines/cli/devskim-cli-pr.yml +++ b/Pipelines/cli/devskim-cli-pr.yml @@ -13,71 +13,87 @@ resources: - repository: templates type: git name: SecurityEngineering/OSS-Tools-Pipeline-Templates - ref: refs/tags/v1.1.1 + # ref: refs/tags/v1.1.1 + ref: refs/heads/gfs/UpdateTemplates + - repository: 1esPipelines + type: git + name: 1ESPipelineTemplates/1ESPipelineTemplates + ref: refs/tags/release variables: BuildConfiguration: 'Release' DotnetVersion: '8.0.x' -stages: -- stage: Test - jobs: - - template: dotnet-test-job.yml@templates - parameters: - jobName: 'dotnet_test_windows' - dotnetVersions: ['6.0.x','7.0.x','8.0.x'] - vmImage: 'win2022-image-base' - projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.Tests/Microsoft.DevSkim.Tests.csproj' - - template: dotnet-test-job.yml@templates - parameters: - jobName: 'dotnet_test_ubuntu' - dotnetVersions: ['6.0.x','7.0.x','8.0.x'] - vmImage: 'ubuntu-22.04-image-base' - projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.Tests/Microsoft.DevSkim.Tests.csproj' - -- stage: SDL - dependsOn: [] - jobs: - - template: sdl-job.yml@templates - parameters: - serviceTreeID: '9792b8d3-bc2c-432c-8fc9-bdb143552208' +extends: + # The pipeline extends the 1ES PT which will inject different SDL and compliance tasks. + # For non-production pipelines, use "Unofficial" as defined below. + # For productions pipelines, use "Official". + template: v1/1ES.Unofficial.PipelineTemplate.yml@1esPipelines + parameters: + # Update the pool with your team's 1ES hosted pool. + pool: + name: MSSecurity-1ES-Build-Agents-Pool # Name of your hosted pool + image: MSSecurity-1ES-Windows-2022 # Name of the image in your pool. If not specified, first image of the pool is used + os: windows # OS of the image. This value cannot be a variable. Allowed values: windows, linux, macOS + stages: + - stage: Test + jobs: + - template: dotnet-test-job.yml@templates + parameters: + jobName: 'dotnet_test_windows' + dotnetVersions: ['6.0.x','7.0.x','8.0.x'] + vmImage: 'MSSecurity-1ES-Windows-2022' + projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.Tests/Microsoft.DevSkim.Tests.csproj' + - template: dotnet-test-job.yml@templates + parameters: + jobName: 'dotnet_test_ubuntu' + dotnetVersions: ['6.0.x','7.0.x','8.0.x'] + vmImage: 'MSSecurity-1ES-Ubuntu-2204' + projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.Tests/Microsoft.DevSkim.Tests.csproj' + + # - stage: SDL + # dependsOn: [] + # jobs: + # - template: sdl-job.yml@templates + # parameters: + # serviceTreeID: '9792b8d3-bc2c-432c-8fc9-bdb143552208' -- stage: Build - dependsOn: - - Test - jobs: - - template: dotnet-publish-linux-mac-job.yml@templates - parameters: - buildConfiguration: 'Release' - dotnetVersion: ${{ variables.DotnetVersion }} - projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.CLI/Microsoft.DevSkim.CLI.csproj' - projectName: 'DevSkim_CLI' - exePath: 'devskim' - preBuild: - - template: nbgv-set-version-steps.yml@templates - - template: dotnet-publish-win-netcore-job.yml@templates - parameters: - buildConfiguration: 'Release' - dotnetVersion: ${{ variables.DotnetVersion }} - projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.CLI/Microsoft.DevSkim.CLI.csproj' - projectName: 'DevSkim_CLI' - preBuild: - - template: nbgv-set-version-steps.yml@templates - - template: nuget-build-job.yml@templates - parameters: - jobName: 'pack_lib' - buildConfiguration: 'Release' - dotnetVersion: ${{ variables.DotnetVersion }} - projectPath: 'DevSkim-DotNet/Microsoft.DevSkim/Microsoft.DevSkim.csproj' - projectName: 'DevSkim_Lib' - preBuild: - - template: nbgv-set-version-steps.yml@templates - - template: nuget-build-job.yml@templates - parameters: - jobName: 'pack_cli' - buildConfiguration: 'Release' - dotnetVersion: ${{ variables.DotnetVersion }} - projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.CLI/Microsoft.DevSkim.CLI.csproj' - projectName: 'DevSkim_CLI' - preBuild: - - template: nbgv-set-version-steps.yml@templates + # - stage: Build + # dependsOn: + # - Test + # jobs: + # - template: dotnet-publish-linux-mac-job.yml@templates + # parameters: + # buildConfiguration: 'Release' + # dotnetVersion: ${{ variables.DotnetVersion }} + # projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.CLI/Microsoft.DevSkim.CLI.csproj' + # projectName: 'DevSkim_CLI' + # exePath: 'devskim' + # preBuild: + # - template: nbgv-set-version-steps.yml@templates + # - template: dotnet-publish-win-netcore-job.yml@templates + # parameters: + # buildConfiguration: 'Release' + # dotnetVersion: ${{ variables.DotnetVersion }} + # projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.CLI/Microsoft.DevSkim.CLI.csproj' + # projectName: 'DevSkim_CLI' + # preBuild: + # - template: nbgv-set-version-steps.yml@templates + # - template: nuget-build-job.yml@templates + # parameters: + # jobName: 'pack_lib' + # buildConfiguration: 'Release' + # dotnetVersion: ${{ variables.DotnetVersion }} + # projectPath: 'DevSkim-DotNet/Microsoft.DevSkim/Microsoft.DevSkim.csproj' + # projectName: 'DevSkim_Lib' + # preBuild: + # - template: nbgv-set-version-steps.yml@templates + # - template: nuget-build-job.yml@templates + # parameters: + # jobName: 'pack_cli' + # buildConfiguration: 'Release' + # dotnetVersion: ${{ variables.DotnetVersion }} + # projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.CLI/Microsoft.DevSkim.CLI.csproj' + # projectName: 'DevSkim_CLI' + # preBuild: + # - template: nbgv-set-version-steps.yml@templates From 0bfbd3c827f098fb8a773fa4963e7345859509fe Mon Sep 17 00:00:00 2001 From: Gabe Stocco <98900+gfs@users.noreply.github.com> Date: Thu, 21 Mar 2024 11:15:48 -0700 Subject: [PATCH 02/23] Remote config updated. no-op change to trigger rerun --- Pipelines/cli/devskim-cli-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Pipelines/cli/devskim-cli-pr.yml b/Pipelines/cli/devskim-cli-pr.yml index fc5c19f0..c387797d 100644 --- a/Pipelines/cli/devskim-cli-pr.yml +++ b/Pipelines/cli/devskim-cli-pr.yml @@ -32,7 +32,7 @@ extends: parameters: # Update the pool with your team's 1ES hosted pool. pool: - name: MSSecurity-1ES-Build-Agents-Pool # Name of your hosted pool + name: MSSecurity-1ES-Build-Agents-Pool # Name of your hosted pool image: MSSecurity-1ES-Windows-2022 # Name of the image in your pool. If not specified, first image of the pool is used os: windows # OS of the image. This value cannot be a variable. Allowed values: windows, linux, macOS stages: From 279e810669611bc621a317bf0c6ed9bc81132013 Mon Sep 17 00:00:00 2001 From: Gabe Stocco <98900+gfs@users.noreply.github.com> Date: Thu, 21 Mar 2024 11:17:44 -0700 Subject: [PATCH 03/23] Use official pool --- Pipelines/cli/devskim-cli-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Pipelines/cli/devskim-cli-pr.yml b/Pipelines/cli/devskim-cli-pr.yml index c387797d..ad95e2b4 100644 --- a/Pipelines/cli/devskim-cli-pr.yml +++ b/Pipelines/cli/devskim-cli-pr.yml @@ -28,7 +28,7 @@ extends: # The pipeline extends the 1ES PT which will inject different SDL and compliance tasks. # For non-production pipelines, use "Unofficial" as defined below. # For productions pipelines, use "Official". - template: v1/1ES.Unofficial.PipelineTemplate.yml@1esPipelines + template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines parameters: # Update the pool with your team's 1ES hosted pool. pool: From 686f9511e928200fa832be5b98c209469db0c103 Mon Sep 17 00:00:00 2001 From: Gabe Stocco <98900+gfs@users.noreply.github.com> Date: Thu, 21 Mar 2024 11:23:59 -0700 Subject: [PATCH 04/23] Update devskim-cli-pr.yml --- Pipelines/cli/devskim-cli-pr.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Pipelines/cli/devskim-cli-pr.yml b/Pipelines/cli/devskim-cli-pr.yml index ad95e2b4..b1827606 100644 --- a/Pipelines/cli/devskim-cli-pr.yml +++ b/Pipelines/cli/devskim-cli-pr.yml @@ -50,6 +50,10 @@ extends: dotnetVersions: ['6.0.x','7.0.x','8.0.x'] vmImage: 'MSSecurity-1ES-Ubuntu-2204' projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.Tests/Microsoft.DevSkim.Tests.csproj' + pool: + name: MSSecurity-1ES-Build-Agents-Pool # Name of your hosted pool + image: MSSecurity-1ES-Ubuntu-2204 # Name of the image in your pool. If not specified, first image of the pool is used + os: linux # OS of the image. This value cannot be a variable. Allowed values: windows, linux, macOS # - stage: SDL # dependsOn: [] From ff25bd319ec77b7289935ab968c435cf5b1c9157 Mon Sep 17 00:00:00 2001 From: Gabe Stocco <98900+gfs@users.noreply.github.com> Date: Thu, 21 Mar 2024 11:34:36 -0700 Subject: [PATCH 05/23] Update devskim-cli-pr.yml --- Pipelines/cli/devskim-cli-pr.yml | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/Pipelines/cli/devskim-cli-pr.yml b/Pipelines/cli/devskim-cli-pr.yml index b1827606..f2498898 100644 --- a/Pipelines/cli/devskim-cli-pr.yml +++ b/Pipelines/cli/devskim-cli-pr.yml @@ -44,17 +44,12 @@ extends: dotnetVersions: ['6.0.x','7.0.x','8.0.x'] vmImage: 'MSSecurity-1ES-Windows-2022' projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.Tests/Microsoft.DevSkim.Tests.csproj' - - template: dotnet-test-job.yml@templates - parameters: - jobName: 'dotnet_test_ubuntu' - dotnetVersions: ['6.0.x','7.0.x','8.0.x'] - vmImage: 'MSSecurity-1ES-Ubuntu-2204' - projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.Tests/Microsoft.DevSkim.Tests.csproj' - pool: - name: MSSecurity-1ES-Build-Agents-Pool # Name of your hosted pool - image: MSSecurity-1ES-Ubuntu-2204 # Name of the image in your pool. If not specified, first image of the pool is used - os: linux # OS of the image. This value cannot be a variable. Allowed values: windows, linux, macOS - + # - template: dotnet-test-job.yml@templates + # parameters: + # jobName: 'dotnet_test_ubuntu' + # dotnetVersions: ['6.0.x','7.0.x','8.0.x'] + # vmImage: 'MSSecurity-1ES-Ubuntu-2204' + # projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.Tests/Microsoft.DevSkim.Tests.csproj' # - stage: SDL # dependsOn: [] # jobs: From 6149d2c93a76ead7522f099e6dbbda99426e4105 Mon Sep 17 00:00:00 2001 From: Gabe Stocco <98900+gfs@users.noreply.github.com> Date: Thu, 21 Mar 2024 11:46:25 -0700 Subject: [PATCH 06/23] Try enable build tasks --- Pipelines/cli/devskim-cli-pr.yml | 85 +++++++++++++++----------------- 1 file changed, 39 insertions(+), 46 deletions(-) diff --git a/Pipelines/cli/devskim-cli-pr.yml b/Pipelines/cli/devskim-cli-pr.yml index f2498898..9dfb3566 100644 --- a/Pipelines/cli/devskim-cli-pr.yml +++ b/Pipelines/cli/devskim-cli-pr.yml @@ -50,49 +50,42 @@ extends: # dotnetVersions: ['6.0.x','7.0.x','8.0.x'] # vmImage: 'MSSecurity-1ES-Ubuntu-2204' # projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.Tests/Microsoft.DevSkim.Tests.csproj' - # - stage: SDL - # dependsOn: [] - # jobs: - # - template: sdl-job.yml@templates - # parameters: - # serviceTreeID: '9792b8d3-bc2c-432c-8fc9-bdb143552208' - - # - stage: Build - # dependsOn: - # - Test - # jobs: - # - template: dotnet-publish-linux-mac-job.yml@templates - # parameters: - # buildConfiguration: 'Release' - # dotnetVersion: ${{ variables.DotnetVersion }} - # projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.CLI/Microsoft.DevSkim.CLI.csproj' - # projectName: 'DevSkim_CLI' - # exePath: 'devskim' - # preBuild: - # - template: nbgv-set-version-steps.yml@templates - # - template: dotnet-publish-win-netcore-job.yml@templates - # parameters: - # buildConfiguration: 'Release' - # dotnetVersion: ${{ variables.DotnetVersion }} - # projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.CLI/Microsoft.DevSkim.CLI.csproj' - # projectName: 'DevSkim_CLI' - # preBuild: - # - template: nbgv-set-version-steps.yml@templates - # - template: nuget-build-job.yml@templates - # parameters: - # jobName: 'pack_lib' - # buildConfiguration: 'Release' - # dotnetVersion: ${{ variables.DotnetVersion }} - # projectPath: 'DevSkim-DotNet/Microsoft.DevSkim/Microsoft.DevSkim.csproj' - # projectName: 'DevSkim_Lib' - # preBuild: - # - template: nbgv-set-version-steps.yml@templates - # - template: nuget-build-job.yml@templates - # parameters: - # jobName: 'pack_cli' - # buildConfiguration: 'Release' - # dotnetVersion: ${{ variables.DotnetVersion }} - # projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.CLI/Microsoft.DevSkim.CLI.csproj' - # projectName: 'DevSkim_CLI' - # preBuild: - # - template: nbgv-set-version-steps.yml@templates + - stage: Build + dependsOn: + - Test + jobs: + - template: dotnet-publish-linux-mac-job.yml@templates + parameters: + buildConfiguration: 'Release' + dotnetVersion: ${{ variables.DotnetVersion }} + projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.CLI/Microsoft.DevSkim.CLI.csproj' + projectName: 'DevSkim_CLI' + exePath: 'devskim' + preBuild: + - template: nbgv-set-version-steps.yml@templates + - template: dotnet-publish-win-netcore-job.yml@templates + parameters: + buildConfiguration: 'Release' + dotnetVersion: ${{ variables.DotnetVersion }} + projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.CLI/Microsoft.DevSkim.CLI.csproj' + projectName: 'DevSkim_CLI' + preBuild: + - template: nbgv-set-version-steps.yml@templates + - template: nuget-build-job.yml@templates + parameters: + jobName: 'pack_lib' + buildConfiguration: 'Release' + dotnetVersion: ${{ variables.DotnetVersion }} + projectPath: 'DevSkim-DotNet/Microsoft.DevSkim/Microsoft.DevSkim.csproj' + projectName: 'DevSkim_Lib' + preBuild: + - template: nbgv-set-version-steps.yml@templates + - template: nuget-build-job.yml@templates + parameters: + jobName: 'pack_cli' + buildConfiguration: 'Release' + dotnetVersion: ${{ variables.DotnetVersion }} + projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.CLI/Microsoft.DevSkim.CLI.csproj' + projectName: 'DevSkim_CLI' + preBuild: + - template: nbgv-set-version-steps.yml@templates From d8b5cab03acc93733ea121ca31e13659b0f54121 Mon Sep 17 00:00:00 2001 From: Gabe Stocco <98900+gfs@users.noreply.github.com> Date: Thu, 21 Mar 2024 11:47:26 -0700 Subject: [PATCH 07/23] Update devskim-cli-pr.yml --- Pipelines/cli/devskim-cli-pr.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/Pipelines/cli/devskim-cli-pr.yml b/Pipelines/cli/devskim-cli-pr.yml index 9dfb3566..162b355e 100644 --- a/Pipelines/cli/devskim-cli-pr.yml +++ b/Pipelines/cli/devskim-cli-pr.yml @@ -42,7 +42,6 @@ extends: parameters: jobName: 'dotnet_test_windows' dotnetVersions: ['6.0.x','7.0.x','8.0.x'] - vmImage: 'MSSecurity-1ES-Windows-2022' projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.Tests/Microsoft.DevSkim.Tests.csproj' # - template: dotnet-test-job.yml@templates # parameters: From b4fbc27ee56c28033fd743fea782cfb3fa601cb9 Mon Sep 17 00:00:00 2001 From: Gabe Stocco <98900+gfs@users.noreply.github.com> Date: Thu, 21 Mar 2024 11:52:06 -0700 Subject: [PATCH 08/23] Update devskim-cli-pr.yml --- Pipelines/cli/devskim-cli-pr.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/Pipelines/cli/devskim-cli-pr.yml b/Pipelines/cli/devskim-cli-pr.yml index 162b355e..3836886b 100644 --- a/Pipelines/cli/devskim-cli-pr.yml +++ b/Pipelines/cli/devskim-cli-pr.yml @@ -43,6 +43,7 @@ extends: jobName: 'dotnet_test_windows' dotnetVersions: ['6.0.x','7.0.x','8.0.x'] projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.Tests/Microsoft.DevSkim.Tests.csproj' + # - template: dotnet-test-job.yml@templates # parameters: # jobName: 'dotnet_test_ubuntu' From 89d91c01f1660e01f0aedc040ca2eb0936dfd31d Mon Sep 17 00:00:00 2001 From: Gabe Stocco <98900+gfs@users.noreply.github.com> Date: Thu, 21 Mar 2024 11:53:26 -0700 Subject: [PATCH 09/23] Update devskim-cli-pr.yml --- Pipelines/cli/devskim-cli-pr.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/Pipelines/cli/devskim-cli-pr.yml b/Pipelines/cli/devskim-cli-pr.yml index 3836886b..162b355e 100644 --- a/Pipelines/cli/devskim-cli-pr.yml +++ b/Pipelines/cli/devskim-cli-pr.yml @@ -43,7 +43,6 @@ extends: jobName: 'dotnet_test_windows' dotnetVersions: ['6.0.x','7.0.x','8.0.x'] projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.Tests/Microsoft.DevSkim.Tests.csproj' - # - template: dotnet-test-job.yml@templates # parameters: # jobName: 'dotnet_test_ubuntu' From 05be2c5a7a739a87272c5de823eb712db505c1d1 Mon Sep 17 00:00:00 2001 From: Gabe Stocco <98900+gfs@users.noreply.github.com> Date: Thu, 21 Mar 2024 12:13:33 -0700 Subject: [PATCH 10/23] Update devskim-cli-pr.yml --- Pipelines/cli/devskim-cli-pr.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Pipelines/cli/devskim-cli-pr.yml b/Pipelines/cli/devskim-cli-pr.yml index 162b355e..427e310c 100644 --- a/Pipelines/cli/devskim-cli-pr.yml +++ b/Pipelines/cli/devskim-cli-pr.yml @@ -60,6 +60,8 @@ extends: projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.CLI/Microsoft.DevSkim.CLI.csproj' projectName: 'DevSkim_CLI' exePath: 'devskim' + artifactName: 'linux-mac-archive' + manifestName: 'linux-mac-manifest' preBuild: - template: nbgv-set-version-steps.yml@templates - template: dotnet-publish-win-netcore-job.yml@templates @@ -68,6 +70,8 @@ extends: dotnetVersion: ${{ variables.DotnetVersion }} projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.CLI/Microsoft.DevSkim.CLI.csproj' projectName: 'DevSkim_CLI' + artifactName: 'win-netcore-archive' + manifestName: 'win-netcore-manifest' preBuild: - template: nbgv-set-version-steps.yml@templates - template: nuget-build-job.yml@templates @@ -77,6 +81,8 @@ extends: dotnetVersion: ${{ variables.DotnetVersion }} projectPath: 'DevSkim-DotNet/Microsoft.DevSkim/Microsoft.DevSkim.csproj' projectName: 'DevSkim_Lib' + artifactName: 'nuget-lib-archive' + manifestName: 'nuget-lib-manifest' preBuild: - template: nbgv-set-version-steps.yml@templates - template: nuget-build-job.yml@templates @@ -86,5 +92,7 @@ extends: dotnetVersion: ${{ variables.DotnetVersion }} projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.CLI/Microsoft.DevSkim.CLI.csproj' projectName: 'DevSkim_CLI' + artifactName: 'nuget-cli-archive' + manifestName: 'nuget-cli-manifest' preBuild: - template: nbgv-set-version-steps.yml@templates From 932536844561a3d2b6a6415e84b977898d7d62cf Mon Sep 17 00:00:00 2001 From: Gabe Stocco <98900+gfs@users.noreply.github.com> Date: Thu, 21 Mar 2024 12:20:30 -0700 Subject: [PATCH 11/23] Update devskim-cli-pr.yml --- Pipelines/cli/devskim-cli-pr.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/Pipelines/cli/devskim-cli-pr.yml b/Pipelines/cli/devskim-cli-pr.yml index 427e310c..a1d0a982 100644 --- a/Pipelines/cli/devskim-cli-pr.yml +++ b/Pipelines/cli/devskim-cli-pr.yml @@ -43,12 +43,17 @@ extends: jobName: 'dotnet_test_windows' dotnetVersions: ['6.0.x','7.0.x','8.0.x'] projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.Tests/Microsoft.DevSkim.Tests.csproj' - # - template: dotnet-test-job.yml@templates - # parameters: - # jobName: 'dotnet_test_ubuntu' - # dotnetVersions: ['6.0.x','7.0.x','8.0.x'] - # vmImage: 'MSSecurity-1ES-Ubuntu-2204' - # projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.Tests/Microsoft.DevSkim.Tests.csproj' + pool-name: MSSecurity-1ES-Build-Agents-Pool # Name of your hosted pool + pool-image: MSSecurity-1ES-Windows-2022 # Name of the image in your pool. If not specified, first image of the pool is used + pool-os: windows # OS of the image. This value cannot be a variable. Allowed values: windows, linux, macOS + - template: dotnet-test-job.yml@templates + parameters: + jobName: 'dotnet_test_ubuntu' + dotnetVersions: ['6.0.x','7.0.x','8.0.x'] + pool-name: MSSecurity-1ES-Build-Agents-Pool # Name of your hosted pool + pool-image: MSSecurity-1ES-Ubuntu-2204 # Name of the image in your pool. If not specified, first image of the pool is used + pool-os: linux # OS of the image. This value cannot be a variable. Allowed values: windows, linux, macOS + projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.Tests/Microsoft.DevSkim.Tests.csproj' - stage: Build dependsOn: - Test From ac4e01053f40e6dc4fc55ca543ed29deda044aed Mon Sep 17 00:00:00 2001 From: Gabe Stocco <98900+gfs@users.noreply.github.com> Date: Thu, 21 Mar 2024 12:23:30 -0700 Subject: [PATCH 12/23] Update devskim-cli-pr.yml --- Pipelines/cli/devskim-cli-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Pipelines/cli/devskim-cli-pr.yml b/Pipelines/cli/devskim-cli-pr.yml index a1d0a982..eb388fab 100644 --- a/Pipelines/cli/devskim-cli-pr.yml +++ b/Pipelines/cli/devskim-cli-pr.yml @@ -43,7 +43,7 @@ extends: jobName: 'dotnet_test_windows' dotnetVersions: ['6.0.x','7.0.x','8.0.x'] projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.Tests/Microsoft.DevSkim.Tests.csproj' - pool-name: MSSecurity-1ES-Build-Agents-Pool # Name of your hosted pool + pool-name: MSSecurity-1ES-Build-Agents-Pool pool-image: MSSecurity-1ES-Windows-2022 # Name of the image in your pool. If not specified, first image of the pool is used pool-os: windows # OS of the image. This value cannot be a variable. Allowed values: windows, linux, macOS - template: dotnet-test-job.yml@templates From 32163143bcc66877fb50868c0ce90ccf6a2aeeba Mon Sep 17 00:00:00 2001 From: Gabe Stocco <98900+gfs@users.noreply.github.com> Date: Thu, 21 Mar 2024 12:39:57 -0700 Subject: [PATCH 13/23] Update devskim-cli-pr.yml --- Pipelines/cli/devskim-cli-pr.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Pipelines/cli/devskim-cli-pr.yml b/Pipelines/cli/devskim-cli-pr.yml index eb388fab..c8106196 100644 --- a/Pipelines/cli/devskim-cli-pr.yml +++ b/Pipelines/cli/devskim-cli-pr.yml @@ -43,16 +43,16 @@ extends: jobName: 'dotnet_test_windows' dotnetVersions: ['6.0.x','7.0.x','8.0.x'] projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.Tests/Microsoft.DevSkim.Tests.csproj' - pool-name: MSSecurity-1ES-Build-Agents-Pool - pool-image: MSSecurity-1ES-Windows-2022 # Name of the image in your pool. If not specified, first image of the pool is used - pool-os: windows # OS of the image. This value cannot be a variable. Allowed values: windows, linux, macOS + poolName: MSSecurity-1ES-Build-Agents-Pool + poolImage: MSSecurity-1ES-Windows-2022 # Name of the image in your pool. If not specified, first image of the pool is used + poolOs: windows # OS of the image. This value cannot be a variable. Allowed values: windows, linux, macOS - template: dotnet-test-job.yml@templates parameters: jobName: 'dotnet_test_ubuntu' dotnetVersions: ['6.0.x','7.0.x','8.0.x'] - pool-name: MSSecurity-1ES-Build-Agents-Pool # Name of your hosted pool - pool-image: MSSecurity-1ES-Ubuntu-2204 # Name of the image in your pool. If not specified, first image of the pool is used - pool-os: linux # OS of the image. This value cannot be a variable. Allowed values: windows, linux, macOS + poolName: MSSecurity-1ES-Build-Agents-Pool # Name of your hosted pool + poolImage: MSSecurity-1ES-Ubuntu-2204 # Name of the image in your pool. If not specified, first image of the pool is used + poolOs: linux # OS of the image. This value cannot be a variable. Allowed values: windows, linux, macOS projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.Tests/Microsoft.DevSkim.Tests.csproj' - stage: Build dependsOn: From 0bd3caa42a9d0bd2931243d5f4ef5ac8fd266f6b Mon Sep 17 00:00:00 2001 From: Gabe Stocco <98900+gfs@users.noreply.github.com> Date: Thu, 21 Mar 2024 14:41:17 -0700 Subject: [PATCH 14/23] Update VS build pipeline --- Pipelines/cli/devskim-cli-pr.yml | 20 +++++++--------- Pipelines/vs/devskim-visualstudio-pr.yml | 30 +++++++++++++----------- 2 files changed, 24 insertions(+), 26 deletions(-) diff --git a/Pipelines/cli/devskim-cli-pr.yml b/Pipelines/cli/devskim-cli-pr.yml index c8106196..3a26a1df 100644 --- a/Pipelines/cli/devskim-cli-pr.yml +++ b/Pipelines/cli/devskim-cli-pr.yml @@ -25,16 +25,12 @@ variables: DotnetVersion: '8.0.x' extends: - # The pipeline extends the 1ES PT which will inject different SDL and compliance tasks. - # For non-production pipelines, use "Unofficial" as defined below. - # For productions pipelines, use "Official". template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines parameters: - # Update the pool with your team's 1ES hosted pool. pool: - name: MSSecurity-1ES-Build-Agents-Pool # Name of your hosted pool - image: MSSecurity-1ES-Windows-2022 # Name of the image in your pool. If not specified, first image of the pool is used - os: windows # OS of the image. This value cannot be a variable. Allowed values: windows, linux, macOS + name: MSSecurity-1ES-Build-Agents-Pool + image: MSSecurity-1ES-Windows-2022 + os: windows stages: - stage: Test jobs: @@ -44,15 +40,15 @@ extends: dotnetVersions: ['6.0.x','7.0.x','8.0.x'] projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.Tests/Microsoft.DevSkim.Tests.csproj' poolName: MSSecurity-1ES-Build-Agents-Pool - poolImage: MSSecurity-1ES-Windows-2022 # Name of the image in your pool. If not specified, first image of the pool is used - poolOs: windows # OS of the image. This value cannot be a variable. Allowed values: windows, linux, macOS + poolImage: MSSecurity-1ES-Windows-2022 + poolOs: windows - template: dotnet-test-job.yml@templates parameters: jobName: 'dotnet_test_ubuntu' dotnetVersions: ['6.0.x','7.0.x','8.0.x'] - poolName: MSSecurity-1ES-Build-Agents-Pool # Name of your hosted pool - poolImage: MSSecurity-1ES-Ubuntu-2204 # Name of the image in your pool. If not specified, first image of the pool is used - poolOs: linux # OS of the image. This value cannot be a variable. Allowed values: windows, linux, macOS + poolName: MSSecurity-1ES-Build-Agents-Pool + poolImage: MSSecurity-1ES-Ubuntu-2204 + poolOs: linux projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.Tests/Microsoft.DevSkim.Tests.csproj' - stage: Build dependsOn: diff --git a/Pipelines/vs/devskim-visualstudio-pr.yml b/Pipelines/vs/devskim-visualstudio-pr.yml index f7dc7757..4961a5b5 100644 --- a/Pipelines/vs/devskim-visualstudio-pr.yml +++ b/Pipelines/vs/devskim-visualstudio-pr.yml @@ -13,20 +13,23 @@ resources: - repository: templates type: git name: SecurityEngineering/OSS-Tools-Pipeline-Templates - ref: refs/tags/v1.1.1 + # ref: refs/tags/v1.1.1 + ref: refs/heads/gfs/UpdateTemplates + - repository: 1esPipelines + type: git + name: 1ESPipelineTemplates/1ESPipelineTemplates + ref: refs/tags/release stages: -- stage: SDL - dependsOn: [] - jobs: - - template: sdl-job.yml@templates - parameters: - serviceTreeID: '9792b8d3-bc2c-432c-8fc9-bdb143552208' - - stage: Build dependsOn: [] jobs: - template: dotnet-build-job.yml@templates + templateContext: + outputs: + - output: pipelineArtifact + targetPath: $(Build.StagingDirectory)/extension + artifactName: 'Unsigned_Extension' parameters: buildTool: 'msbuild' buildConfiguration: 'Release' @@ -34,6 +37,11 @@ stages: targetFramework: 'net47' projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.VisualStudio/Microsoft.DevSkim.VisualStudio.csproj' projectName: 'DevSkim_VS' + poolName: MSSecurity-1ES-Build-Agents-Pool + poolImage: MSSecurity-1ES-Windows-2022 + poolOs: windows + artifactName: 'vs-archive' + manifestName: 'vs-manifest' preBuild: - template: nbgv-set-version-steps.yml@templates # Workaround: Using the .NET 8 SDK doesn't install the right version of MSBuild for .NET 8 @@ -56,9 +64,3 @@ stages: inputs: targetType: 'inline' script: 'mv $env:BUILD_STAGINGDIRECTORY/bin/dotnetapp/DevSkim_VS_dotnetapp_$(ReleaseVersion)/*.vsix $env:BUILD_STAGINGDIRECTORY/extension' - - task: PublishBuildArtifacts@1 - displayName: Pipeline Publish Extension - inputs: - PathtoPublish: '$(Build.StagingDirectory)/extension' - ArtifactName: 'Unsigned_Extension' - publishLocation: 'Container' From 409635c9ba0793deb0f56b4f0835e0e46bacb64e Mon Sep 17 00:00:00 2001 From: Gabe Stocco <98900+gfs@users.noreply.github.com> Date: Thu, 21 Mar 2024 14:42:20 -0700 Subject: [PATCH 15/23] Update devskim-visualstudio-pr.yml --- Pipelines/vs/devskim-visualstudio-pr.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Pipelines/vs/devskim-visualstudio-pr.yml b/Pipelines/vs/devskim-visualstudio-pr.yml index 4961a5b5..38d758d7 100644 --- a/Pipelines/vs/devskim-visualstudio-pr.yml +++ b/Pipelines/vs/devskim-visualstudio-pr.yml @@ -23,13 +23,13 @@ resources: stages: - stage: Build dependsOn: [] + templateContext: + outputs: + - output: pipelineArtifact + targetPath: $(Build.StagingDirectory)/extension + artifactName: 'Unsigned_Extension' jobs: - template: dotnet-build-job.yml@templates - templateContext: - outputs: - - output: pipelineArtifact - targetPath: $(Build.StagingDirectory)/extension - artifactName: 'Unsigned_Extension' parameters: buildTool: 'msbuild' buildConfiguration: 'Release' From 998db6db77c25f54338bd514ec2c8a40c3b4a86c Mon Sep 17 00:00:00 2001 From: Gabe Stocco <98900+gfs@users.noreply.github.com> Date: Thu, 21 Mar 2024 14:45:06 -0700 Subject: [PATCH 16/23] Update devskim-visualstudio-pr.yml --- Pipelines/vs/devskim-visualstudio-pr.yml | 95 +++++++++++++----------- 1 file changed, 51 insertions(+), 44 deletions(-) diff --git a/Pipelines/vs/devskim-visualstudio-pr.yml b/Pipelines/vs/devskim-visualstudio-pr.yml index 38d758d7..1365d820 100644 --- a/Pipelines/vs/devskim-visualstudio-pr.yml +++ b/Pipelines/vs/devskim-visualstudio-pr.yml @@ -20,47 +20,54 @@ resources: name: 1ESPipelineTemplates/1ESPipelineTemplates ref: refs/tags/release -stages: -- stage: Build - dependsOn: [] - templateContext: - outputs: - - output: pipelineArtifact - targetPath: $(Build.StagingDirectory)/extension - artifactName: 'Unsigned_Extension' - jobs: - - template: dotnet-build-job.yml@templates - parameters: - buildTool: 'msbuild' - buildConfiguration: 'Release' - dotnetVersion: '8.0.x' - targetFramework: 'net47' - projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.VisualStudio/Microsoft.DevSkim.VisualStudio.csproj' - projectName: 'DevSkim_VS' - poolName: MSSecurity-1ES-Build-Agents-Pool - poolImage: MSSecurity-1ES-Windows-2022 - poolOs: windows - artifactName: 'vs-archive' - manifestName: 'vs-manifest' - preBuild: - - template: nbgv-set-version-steps.yml@templates - # Workaround: Using the .NET 8 SDK doesn't install the right version of MSBuild for .NET 8 - # Using the .NET 7 SDK doesn't include the .NET 8 SDK so it can't build the project - # Install both for now until the right version of MSBuild is included with .NET 8 - - task: UseDotNet@2 - displayName: Install Dotnet 7 SDK - inputs: - packageType: 'sdk' - version: '7.0.x' - onEnd: - - task: PowerShell@2 - displayName: Mkdir for Extension - inputs: - targetType: 'inline' - script: mkdir extension - workingDirectory: '$(Build.StagingDirectory)' - - task: PowerShell@2 - displayName: Move Extension File - inputs: - targetType: 'inline' - script: 'mv $env:BUILD_STAGINGDIRECTORY/bin/dotnetapp/DevSkim_VS_dotnetapp_$(ReleaseVersion)/*.vsix $env:BUILD_STAGINGDIRECTORY/extension' +extends: + template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines + parameters: + pool: + name: MSSecurity-1ES-Build-Agents-Pool + image: MSSecurity-1ES-Windows-2022 + os: windows + stages: + - stage: Build + dependsOn: [] + templateContext: + outputs: + - output: pipelineArtifact + targetPath: $(Build.StagingDirectory)/extension + artifactName: 'Unsigned_Extension' + jobs: + - template: dotnet-build-job.yml@templates + parameters: + buildTool: 'msbuild' + buildConfiguration: 'Release' + dotnetVersion: '8.0.x' + targetFramework: 'net47' + projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.VisualStudio/Microsoft.DevSkim.VisualStudio.csproj' + projectName: 'DevSkim_VS' + poolName: MSSecurity-1ES-Build-Agents-Pool + poolImage: MSSecurity-1ES-Windows-2022 + poolOs: windows + artifactName: 'vs-archive' + manifestName: 'vs-manifest' + preBuild: + - template: nbgv-set-version-steps.yml@templates + # Workaround: Using the .NET 8 SDK doesn't install the right version of MSBuild for .NET 8 + # Using the .NET 7 SDK doesn't include the .NET 8 SDK so it can't build the project + # Install both for now until the right version of MSBuild is included with .NET 8 + - task: UseDotNet@2 + displayName: Install Dotnet 7 SDK + inputs: + packageType: 'sdk' + version: '7.0.x' + onEnd: + - task: PowerShell@2 + displayName: Mkdir for Extension + inputs: + targetType: 'inline' + script: mkdir extension + workingDirectory: '$(Build.StagingDirectory)' + - task: PowerShell@2 + displayName: Move Extension File + inputs: + targetType: 'inline' + script: 'mv $env:BUILD_STAGINGDIRECTORY/bin/dotnetapp/DevSkim_VS_dotnetapp_$(ReleaseVersion)/*.vsix $env:BUILD_STAGINGDIRECTORY/extension' From abe85470a57976e8a947d18d6f1d34f80813718c Mon Sep 17 00:00:00 2001 From: Gabe Stocco <98900+gfs@users.noreply.github.com> Date: Thu, 21 Mar 2024 15:03:27 -0700 Subject: [PATCH 17/23] Update VS Code Pipeline --- Pipelines/vscode/devskim-vscode-pr.yml | 181 +++++++++++-------------- 1 file changed, 78 insertions(+), 103 deletions(-) diff --git a/Pipelines/vscode/devskim-vscode-pr.yml b/Pipelines/vscode/devskim-vscode-pr.yml index 2b06a8b5..ef0abf0b 100644 --- a/Pipelines/vscode/devskim-vscode-pr.yml +++ b/Pipelines/vscode/devskim-vscode-pr.yml @@ -13,108 +13,83 @@ resources: - repository: templates type: git name: SecurityEngineering/OSS-Tools-Pipeline-Templates - ref: refs/tags/v1.1.1 - -stages: -- stage: SDL - jobs: - - template: sdl-job.yml@templates - parameters: - serviceTreeID: '9792b8d3-bc2c-432c-8fc9-bdb143552208' + # ref: refs/tags/v1.1.1 + ref: refs/heads/gfs/UpdateTemplates + - repository: 1esPipelines + type: git + name: 1ESPipelineTemplates/1ESPipelineTemplates + ref: refs/tags/release -- stage: Build - dependsOn: [] - jobs: - - job: build_vscode_plugin - displayName: Build VS Code Plugin +extends: + template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines + parameters: pool: - name: 'CSPA' - vmImage: 'win2022-image-base' - steps: - - task: UseDotNet@2 - displayName: Install Dotnet SDK - inputs: - packageType: 'sdk' - version: '8.0.x' - - task: CodeQL3000Init@0 - - task: Npm@1 - displayName: Build VS Code Plugin - inputs: - command: 'custom' - workingDir: 'DevSkim-VSCode-Plugin/' - customCommand: 'run build' - - task: CodeQL3000Finalize@0 - - task: AntiMalware@4 - displayName: Anti-Malware Scan - inputs: - InputType: 'Basic' - ScanType: 'CustomScan' - FileDirPath: 'DevSkim-VSCode-Plugin/' - EnableServices: true - SupportLogOnError: false - TreatSignatureUpdateFailureAs: 'Warning' - SignatureFreshness: 'UpToDate' - TreatStaleSignatureAs: 'Warning' - - template: nbgv-set-version-steps.yml@templates - - task: PowerShell@2 - displayName: Mkdir for Manifests and Packages - inputs: - targetType: 'inline' - script: mkdir sbom/vscode/ ; mkdir sbom/langserver/ ; mkdir packages - workingDirectory: '$(Build.StagingDirectory)' - - task: ManifestGeneratorTask@0 - displayName: Generate VS Code Plugin Manifest - inputs: - BuildDropPath: '$(Build.SourcesDirectory)/DevSkim-VSCode-Plugin/client/out/' - ManifestDirPath: '$(Build.StagingDirectory)/sbom/vscode/' - PackageName: 'DevSkim VS Code Plugin' - PackageVersion: '$(ReleaseVersion)' - - task: ManifestGeneratorTask@0 - displayName: Generate DevSkim Language Server Manifest - inputs: - BuildDropPath: '$(Build.SourcesDirectory)/DevSkim-VSCode-Plugin/devskimBinaries/' - ManifestDirPath: '$(Build.StagingDirectory)/sbom/langserver/' - PackageName: 'DevSkim Language Server' - PackageVersion: '$(ReleaseVersion)' - - task: ArchiveFiles@2 - displayName: Archive Manifests - inputs: - rootFolderOrFile: '$(Build.StagingDirectory)/sbom/' - includeRootFolder: false - archiveType: 'zip' - archiveFile: '$(Build.StagingDirectory)/Manifests/DevSkim_VSCode_Manifests.zip' - replaceExistingArchive: true - - task: PublishBuildArtifacts@1 - displayName: Pipeline Publish Manifest Archive - inputs: - PathtoPublish: '$(Build.StagingDirectory)/Manifests' - ArtifactName: 'Manifests' - publishLocation: 'Container' - - task: Npm@1 - displayName: Package VS Code Plugin - inputs: - command: 'custom' - workingDir: 'DevSkim-VSCode-Plugin/' - customCommand: 'run pack-ext' - - task: AntiMalware@4 - displayName: Anti-Malware Scan - inputs: - InputType: 'Basic' - ScanType: 'CustomScan' - FileDirPath: 'DevSkim-VSCode-Plugin/' - EnableServices: true - SupportLogOnError: false - TreatSignatureUpdateFailureAs: 'Warning' - SignatureFreshness: 'UpToDate' - TreatStaleSignatureAs: 'Warning' - - task: PowerShell@2 - displayName: Move Plugin File - inputs: - targetType: 'inline' - script: 'mv DevSkim-VSCode-Plugin/*.vsix $env:BUILD_STAGINGDIRECTORY/packages/' - - task: PublishBuildArtifacts@1 - displayName: Pipeline Publish Unsigned Artifact - inputs: - PathtoPublish: '$(Build.StagingDirectory)/packages/' - ArtifactName: 'Unsigned_Plugin' - publishLocation: 'Container' + name: MSSecurity-1ES-Build-Agents-Pool + image: MSSecurity-1ES-Windows-2022 + os: windows + stages: + - stage: Build + templateContext: + outputs: + - output: pipelineArtifact + targetPath: $(Build.StagingDirectory)/packages + artifactName: 'Unsigned_Plugin' + - output: pipelineArtifact + targetPath: $(Build.StagingDirectory)/Manifests + artifactName: 'VSCode_Manifests' + dependsOn: [] + jobs: + - job: build_vscode_plugin + displayName: Build VS Code Plugin + steps: + - task: UseDotNet@2 + displayName: Install Dotnet SDK + inputs: + packageType: 'sdk' + version: '8.0.x' + - task: Npm@1 + displayName: Build VS Code Plugin + inputs: + command: 'custom' + workingDir: 'DevSkim-VSCode-Plugin/' + customCommand: 'run build' + - template: nbgv-set-version-steps.yml@templates + - task: PowerShell@2 + displayName: Mkdir for Manifests and Packages + inputs: + targetType: 'inline' + script: mkdir sbom/vscode/ ; mkdir sbom/langserver/ ; mkdir packages + workingDirectory: '$(Build.StagingDirectory)' + - task: ManifestGeneratorTask@0 + displayName: Generate VS Code Plugin Manifest + inputs: + BuildDropPath: '$(Build.SourcesDirectory)/DevSkim-VSCode-Plugin/client/out/' + ManifestDirPath: '$(Build.StagingDirectory)/sbom/vscode/' + PackageName: 'DevSkim VS Code Plugin' + PackageVersion: '$(ReleaseVersion)' + - task: ManifestGeneratorTask@0 + displayName: Generate DevSkim Language Server Manifest + inputs: + BuildDropPath: '$(Build.SourcesDirectory)/DevSkim-VSCode-Plugin/devskimBinaries/' + ManifestDirPath: '$(Build.StagingDirectory)/sbom/langserver/' + PackageName: 'DevSkim Language Server' + PackageVersion: '$(ReleaseVersion)' + - task: ArchiveFiles@2 + displayName: Archive Manifests + inputs: + rootFolderOrFile: '$(Build.StagingDirectory)/sbom/' + includeRootFolder: false + archiveType: 'zip' + archiveFile: '$(Build.StagingDirectory)/Manifests/DevSkim_VSCode_Manifests.zip' + replaceExistingArchive: true + - task: Npm@1 + displayName: Package VS Code Plugin + inputs: + command: 'custom' + workingDir: 'DevSkim-VSCode-Plugin/' + customCommand: 'run pack-ext' + - task: PowerShell@2 + displayName: Move Plugin File + inputs: + targetType: 'inline' + script: 'mv DevSkim-VSCode-Plugin/*.vsix $env:BUILD_STAGINGDIRECTORY/packages/' From 929a12893e2743c05186798e618509eab96a05f6 Mon Sep 17 00:00:00 2001 From: Gabe Stocco <98900+gfs@users.noreply.github.com> Date: Thu, 21 Mar 2024 15:18:40 -0700 Subject: [PATCH 18/23] Update template contexts --- Pipelines/vs/devskim-visualstudio-pr.yml | 10 +++++----- Pipelines/vscode/devskim-vscode-pr.yml | 16 ++++++++-------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Pipelines/vs/devskim-visualstudio-pr.yml b/Pipelines/vs/devskim-visualstudio-pr.yml index 1365d820..b24b06c1 100644 --- a/Pipelines/vs/devskim-visualstudio-pr.yml +++ b/Pipelines/vs/devskim-visualstudio-pr.yml @@ -30,13 +30,13 @@ extends: stages: - stage: Build dependsOn: [] - templateContext: - outputs: - - output: pipelineArtifact - targetPath: $(Build.StagingDirectory)/extension - artifactName: 'Unsigned_Extension' jobs: - template: dotnet-build-job.yml@templates + templateContext: + outputs: + - output: pipelineArtifact + targetPath: $(Build.StagingDirectory)/extension + artifactName: 'Unsigned_Extension' parameters: buildTool: 'msbuild' buildConfiguration: 'Release' diff --git a/Pipelines/vscode/devskim-vscode-pr.yml b/Pipelines/vscode/devskim-vscode-pr.yml index ef0abf0b..42b45a8b 100644 --- a/Pipelines/vscode/devskim-vscode-pr.yml +++ b/Pipelines/vscode/devskim-vscode-pr.yml @@ -29,18 +29,18 @@ extends: os: windows stages: - stage: Build - templateContext: - outputs: - - output: pipelineArtifact - targetPath: $(Build.StagingDirectory)/packages - artifactName: 'Unsigned_Plugin' - - output: pipelineArtifact - targetPath: $(Build.StagingDirectory)/Manifests - artifactName: 'VSCode_Manifests' dependsOn: [] jobs: - job: build_vscode_plugin displayName: Build VS Code Plugin + templateContext: + outputs: + - output: pipelineArtifact + targetPath: $(Build.StagingDirectory)/packages + artifactName: 'Unsigned_Plugin' + - output: pipelineArtifact + targetPath: $(Build.StagingDirectory)/Manifests + artifactName: 'VSCode_Manifests' steps: - task: UseDotNet@2 displayName: Install Dotnet SDK From e4819930a3526ddf1103e8ddd225940deb773753 Mon Sep 17 00:00:00 2001 From: Gabe Stocco <98900+gfs@users.noreply.github.com> Date: Thu, 21 Mar 2024 15:27:45 -0700 Subject: [PATCH 19/23] Update devskim-visualstudio-pr.yml --- Pipelines/vs/devskim-visualstudio-pr.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Pipelines/vs/devskim-visualstudio-pr.yml b/Pipelines/vs/devskim-visualstudio-pr.yml index b24b06c1..b578b13a 100644 --- a/Pipelines/vs/devskim-visualstudio-pr.yml +++ b/Pipelines/vs/devskim-visualstudio-pr.yml @@ -32,11 +32,6 @@ extends: dependsOn: [] jobs: - template: dotnet-build-job.yml@templates - templateContext: - outputs: - - output: pipelineArtifact - targetPath: $(Build.StagingDirectory)/extension - artifactName: 'Unsigned_Extension' parameters: buildTool: 'msbuild' buildConfiguration: 'Release' @@ -49,6 +44,8 @@ extends: poolOs: windows artifactName: 'vs-archive' manifestName: 'vs-manifest' + extraArtifactName: 'Unsigned_Extension' + extraArtifactLocation: 'extension' preBuild: - template: nbgv-set-version-steps.yml@templates # Workaround: Using the .NET 8 SDK doesn't install the right version of MSBuild for .NET 8 From f1d7a5708ba04fad52f65f251741ca7ee8e849b4 Mon Sep 17 00:00:00 2001 From: Gabe Stocco <98900+gfs@users.noreply.github.com> Date: Thu, 21 Mar 2024 15:28:44 -0700 Subject: [PATCH 20/23] Update devskim-visualstudio-pr.yml --- Pipelines/vs/devskim-visualstudio-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Pipelines/vs/devskim-visualstudio-pr.yml b/Pipelines/vs/devskim-visualstudio-pr.yml index b578b13a..3da241b1 100644 --- a/Pipelines/vs/devskim-visualstudio-pr.yml +++ b/Pipelines/vs/devskim-visualstudio-pr.yml @@ -50,7 +50,7 @@ extends: - template: nbgv-set-version-steps.yml@templates # Workaround: Using the .NET 8 SDK doesn't install the right version of MSBuild for .NET 8 # Using the .NET 7 SDK doesn't include the .NET 8 SDK so it can't build the project - # Install both for now until the right version of MSBuild is included with .NET 8 + # Install both for now until the right version of MSBuild is included with .NET 8 - task: UseDotNet@2 displayName: Install Dotnet 7 SDK inputs: From bd02ccfec04eb519f96a0aaba30971d0e8d91a52 Mon Sep 17 00:00:00 2001 From: Gabe Stocco <98900+gfs@users.noreply.github.com> Date: Thu, 21 Mar 2024 15:44:19 -0700 Subject: [PATCH 21/23] Remove manifest generation references Automatically done by the template --- Pipelines/cli/devskim-cli-pr.yml | 4 ---- Pipelines/vs/devskim-visualstudio-pr.yml | 1 - Pipelines/vscode/devskim-vscode-pr.yml | 25 ------------------------ 3 files changed, 30 deletions(-) diff --git a/Pipelines/cli/devskim-cli-pr.yml b/Pipelines/cli/devskim-cli-pr.yml index 3a26a1df..ebf79b0b 100644 --- a/Pipelines/cli/devskim-cli-pr.yml +++ b/Pipelines/cli/devskim-cli-pr.yml @@ -62,7 +62,6 @@ extends: projectName: 'DevSkim_CLI' exePath: 'devskim' artifactName: 'linux-mac-archive' - manifestName: 'linux-mac-manifest' preBuild: - template: nbgv-set-version-steps.yml@templates - template: dotnet-publish-win-netcore-job.yml@templates @@ -72,7 +71,6 @@ extends: projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.CLI/Microsoft.DevSkim.CLI.csproj' projectName: 'DevSkim_CLI' artifactName: 'win-netcore-archive' - manifestName: 'win-netcore-manifest' preBuild: - template: nbgv-set-version-steps.yml@templates - template: nuget-build-job.yml@templates @@ -83,7 +81,6 @@ extends: projectPath: 'DevSkim-DotNet/Microsoft.DevSkim/Microsoft.DevSkim.csproj' projectName: 'DevSkim_Lib' artifactName: 'nuget-lib-archive' - manifestName: 'nuget-lib-manifest' preBuild: - template: nbgv-set-version-steps.yml@templates - template: nuget-build-job.yml@templates @@ -94,6 +91,5 @@ extends: projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.CLI/Microsoft.DevSkim.CLI.csproj' projectName: 'DevSkim_CLI' artifactName: 'nuget-cli-archive' - manifestName: 'nuget-cli-manifest' preBuild: - template: nbgv-set-version-steps.yml@templates diff --git a/Pipelines/vs/devskim-visualstudio-pr.yml b/Pipelines/vs/devskim-visualstudio-pr.yml index 3da241b1..b41d5c41 100644 --- a/Pipelines/vs/devskim-visualstudio-pr.yml +++ b/Pipelines/vs/devskim-visualstudio-pr.yml @@ -43,7 +43,6 @@ extends: poolImage: MSSecurity-1ES-Windows-2022 poolOs: windows artifactName: 'vs-archive' - manifestName: 'vs-manifest' extraArtifactName: 'Unsigned_Extension' extraArtifactLocation: 'extension' preBuild: diff --git a/Pipelines/vscode/devskim-vscode-pr.yml b/Pipelines/vscode/devskim-vscode-pr.yml index 42b45a8b..5793ff85 100644 --- a/Pipelines/vscode/devskim-vscode-pr.yml +++ b/Pipelines/vscode/devskim-vscode-pr.yml @@ -38,9 +38,6 @@ extends: - output: pipelineArtifact targetPath: $(Build.StagingDirectory)/packages artifactName: 'Unsigned_Plugin' - - output: pipelineArtifact - targetPath: $(Build.StagingDirectory)/Manifests - artifactName: 'VSCode_Manifests' steps: - task: UseDotNet@2 displayName: Install Dotnet SDK @@ -60,28 +57,6 @@ extends: targetType: 'inline' script: mkdir sbom/vscode/ ; mkdir sbom/langserver/ ; mkdir packages workingDirectory: '$(Build.StagingDirectory)' - - task: ManifestGeneratorTask@0 - displayName: Generate VS Code Plugin Manifest - inputs: - BuildDropPath: '$(Build.SourcesDirectory)/DevSkim-VSCode-Plugin/client/out/' - ManifestDirPath: '$(Build.StagingDirectory)/sbom/vscode/' - PackageName: 'DevSkim VS Code Plugin' - PackageVersion: '$(ReleaseVersion)' - - task: ManifestGeneratorTask@0 - displayName: Generate DevSkim Language Server Manifest - inputs: - BuildDropPath: '$(Build.SourcesDirectory)/DevSkim-VSCode-Plugin/devskimBinaries/' - ManifestDirPath: '$(Build.StagingDirectory)/sbom/langserver/' - PackageName: 'DevSkim Language Server' - PackageVersion: '$(ReleaseVersion)' - - task: ArchiveFiles@2 - displayName: Archive Manifests - inputs: - rootFolderOrFile: '$(Build.StagingDirectory)/sbom/' - includeRootFolder: false - archiveType: 'zip' - archiveFile: '$(Build.StagingDirectory)/Manifests/DevSkim_VSCode_Manifests.zip' - replaceExistingArchive: true - task: Npm@1 displayName: Package VS Code Plugin inputs: From 89d8aeb8899685d8de8f068286d42f8874edc97d Mon Sep 17 00:00:00 2001 From: Gabe Stocco <98900+gfs@users.noreply.github.com> Date: Wed, 27 Mar 2024 11:27:24 -0700 Subject: [PATCH 22/23] Update devskim-cli-pr.yml --- Pipelines/cli/devskim-cli-pr.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Pipelines/cli/devskim-cli-pr.yml b/Pipelines/cli/devskim-cli-pr.yml index ebf79b0b..3334911b 100644 --- a/Pipelines/cli/devskim-cli-pr.yml +++ b/Pipelines/cli/devskim-cli-pr.yml @@ -13,8 +13,7 @@ resources: - repository: templates type: git name: SecurityEngineering/OSS-Tools-Pipeline-Templates - # ref: refs/tags/v1.1.1 - ref: refs/heads/gfs/UpdateTemplates + ref: refs/tags/v2.0.0 - repository: 1esPipelines type: git name: 1ESPipelineTemplates/1ESPipelineTemplates From 84a42b006872ad6584e363f7863c384ad2fb97d7 Mon Sep 17 00:00:00 2001 From: Gabe Stocco <98900+gfs@users.noreply.github.com> Date: Wed, 27 Mar 2024 11:45:06 -0700 Subject: [PATCH 23/23] Update tag reference --- Pipelines/vs/devskim-visualstudio-pr.yml | 3 +-- Pipelines/vscode/devskim-vscode-pr.yml | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Pipelines/vs/devskim-visualstudio-pr.yml b/Pipelines/vs/devskim-visualstudio-pr.yml index b41d5c41..3e51e2d2 100644 --- a/Pipelines/vs/devskim-visualstudio-pr.yml +++ b/Pipelines/vs/devskim-visualstudio-pr.yml @@ -13,8 +13,7 @@ resources: - repository: templates type: git name: SecurityEngineering/OSS-Tools-Pipeline-Templates - # ref: refs/tags/v1.1.1 - ref: refs/heads/gfs/UpdateTemplates + ref: refs/tags/v2.0.0 - repository: 1esPipelines type: git name: 1ESPipelineTemplates/1ESPipelineTemplates diff --git a/Pipelines/vscode/devskim-vscode-pr.yml b/Pipelines/vscode/devskim-vscode-pr.yml index 5793ff85..2a406338 100644 --- a/Pipelines/vscode/devskim-vscode-pr.yml +++ b/Pipelines/vscode/devskim-vscode-pr.yml @@ -13,8 +13,7 @@ resources: - repository: templates type: git name: SecurityEngineering/OSS-Tools-Pipeline-Templates - # ref: refs/tags/v1.1.1 - ref: refs/heads/gfs/UpdateTemplates + ref: refs/tags/v2.0.0 - repository: 1esPipelines type: git name: 1ESPipelineTemplates/1ESPipelineTemplates