Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pipeline Updates #611

Merged
merged 23 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
137 changes: 74 additions & 63 deletions Pipelines/cli/devskim-cli-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,71 +13,82 @@ resources:
- repository: templates
type: git
name: SecurityEngineering/OSS-Tools-Pipeline-Templates
ref: refs/tags/v1.1.1
ref: refs/tags/v2.0.0
- 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'

- 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
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: Test
jobs:
- template: dotnet-test-job.yml@templates
parameters:
jobName: 'dotnet_test_windows'
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
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
poolImage: MSSecurity-1ES-Ubuntu-2204
poolOs: linux
projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.Tests/Microsoft.DevSkim.Tests.csproj'
- 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'
artifactName: 'linux-mac-archive'
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'
artifactName: 'win-netcore-archive'
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'
artifactName: 'nuget-lib-archive'
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'
artifactName: 'nuget-cli-archive'
preBuild:
- template: nbgv-set-version-steps.yml@templates
100 changes: 52 additions & 48 deletions Pipelines/vs/devskim-visualstudio-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,52 +13,56 @@ resources:
- repository: templates
type: git
name: SecurityEngineering/OSS-Tools-Pipeline-Templates
ref: refs/tags/v1.1.1

stages:
- stage: SDL
dependsOn: []
jobs:
- template: sdl-job.yml@templates
parameters:
serviceTreeID: '9792b8d3-bc2c-432c-8fc9-bdb143552208'
ref: refs/tags/v2.0.0
- repository: 1esPipelines
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release

- stage: Build
dependsOn: []
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'
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'
- task: PublishBuildArtifacts@1
displayName: Pipeline Publish Extension
inputs:
PathtoPublish: '$(Build.StagingDirectory)/extension'
ArtifactName: 'Unsigned_Extension'
publishLocation: 'Container'
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: []
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'
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
# 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'
Loading
Loading