Skip to content

Commit 6091cf6

Browse files
authored
Pipeline Updates (#611)
* Migrate Pipelines to new Templates
1 parent 9dba5c6 commit 6091cf6

File tree

4 files changed

+182
-214
lines changed

4 files changed

+182
-214
lines changed

Changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [1.0.34] - 2024-3-18
8+
### Pipeline
9+
Pipeline only changes
10+
711
## [1.0.33] - 2024-3-13
812
### Fix
913
Fixes properly setting the default value for the `OutputFileFormat` and `OutputTextFormat` fields when using the `options-json` argument to the analyze command.

Pipelines/cli/devskim-cli-pr.yml

Lines changed: 74 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -13,71 +13,82 @@ resources:
1313
- repository: templates
1414
type: git
1515
name: SecurityEngineering/OSS-Tools-Pipeline-Templates
16-
ref: refs/tags/v1.1.1
16+
ref: refs/tags/v2.0.0
17+
- repository: 1esPipelines
18+
type: git
19+
name: 1ESPipelineTemplates/1ESPipelineTemplates
20+
ref: refs/tags/release
1721

1822
variables:
1923
BuildConfiguration: 'Release'
2024
DotnetVersion: '8.0.x'
2125

22-
stages:
23-
- stage: Test
24-
jobs:
25-
- template: dotnet-test-job.yml@templates
26-
parameters:
27-
jobName: 'dotnet_test_windows'
28-
dotnetVersions: ['6.0.x','7.0.x','8.0.x']
29-
vmImage: 'win2022-image-base'
30-
projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.Tests/Microsoft.DevSkim.Tests.csproj'
31-
- template: dotnet-test-job.yml@templates
32-
parameters:
33-
jobName: 'dotnet_test_ubuntu'
34-
dotnetVersions: ['6.0.x','7.0.x','8.0.x']
35-
vmImage: 'ubuntu-22.04-image-base'
36-
projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.Tests/Microsoft.DevSkim.Tests.csproj'
37-
38-
- stage: SDL
39-
dependsOn: []
40-
jobs:
41-
- template: sdl-job.yml@templates
42-
parameters:
43-
serviceTreeID: '9792b8d3-bc2c-432c-8fc9-bdb143552208'
44-
45-
- stage: Build
46-
dependsOn:
47-
- Test
48-
jobs:
49-
- template: dotnet-publish-linux-mac-job.yml@templates
50-
parameters:
51-
buildConfiguration: 'Release'
52-
dotnetVersion: ${{ variables.DotnetVersion }}
53-
projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.CLI/Microsoft.DevSkim.CLI.csproj'
54-
projectName: 'DevSkim_CLI'
55-
exePath: 'devskim'
56-
preBuild:
57-
- template: nbgv-set-version-steps.yml@templates
58-
- template: dotnet-publish-win-netcore-job.yml@templates
59-
parameters:
60-
buildConfiguration: 'Release'
61-
dotnetVersion: ${{ variables.DotnetVersion }}
62-
projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.CLI/Microsoft.DevSkim.CLI.csproj'
63-
projectName: 'DevSkim_CLI'
64-
preBuild:
65-
- template: nbgv-set-version-steps.yml@templates
66-
- template: nuget-build-job.yml@templates
67-
parameters:
68-
jobName: 'pack_lib'
69-
buildConfiguration: 'Release'
70-
dotnetVersion: ${{ variables.DotnetVersion }}
71-
projectPath: 'DevSkim-DotNet/Microsoft.DevSkim/Microsoft.DevSkim.csproj'
72-
projectName: 'DevSkim_Lib'
73-
preBuild:
74-
- template: nbgv-set-version-steps.yml@templates
75-
- template: nuget-build-job.yml@templates
76-
parameters:
77-
jobName: 'pack_cli'
78-
buildConfiguration: 'Release'
79-
dotnetVersion: ${{ variables.DotnetVersion }}
80-
projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.CLI/Microsoft.DevSkim.CLI.csproj'
81-
projectName: 'DevSkim_CLI'
82-
preBuild:
83-
- template: nbgv-set-version-steps.yml@templates
26+
extends:
27+
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
28+
parameters:
29+
pool:
30+
name: MSSecurity-1ES-Build-Agents-Pool
31+
image: MSSecurity-1ES-Windows-2022
32+
os: windows
33+
stages:
34+
- stage: Test
35+
jobs:
36+
- template: dotnet-test-job.yml@templates
37+
parameters:
38+
jobName: 'dotnet_test_windows'
39+
dotnetVersions: ['6.0.x','7.0.x','8.0.x']
40+
projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.Tests/Microsoft.DevSkim.Tests.csproj'
41+
poolName: MSSecurity-1ES-Build-Agents-Pool
42+
poolImage: MSSecurity-1ES-Windows-2022
43+
poolOs: windows
44+
- template: dotnet-test-job.yml@templates
45+
parameters:
46+
jobName: 'dotnet_test_ubuntu'
47+
dotnetVersions: ['6.0.x','7.0.x','8.0.x']
48+
poolName: MSSecurity-1ES-Build-Agents-Pool
49+
poolImage: MSSecurity-1ES-Ubuntu-2204
50+
poolOs: linux
51+
projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.Tests/Microsoft.DevSkim.Tests.csproj'
52+
- stage: Build
53+
dependsOn:
54+
- Test
55+
jobs:
56+
- template: dotnet-publish-linux-mac-job.yml@templates
57+
parameters:
58+
buildConfiguration: 'Release'
59+
dotnetVersion: ${{ variables.DotnetVersion }}
60+
projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.CLI/Microsoft.DevSkim.CLI.csproj'
61+
projectName: 'DevSkim_CLI'
62+
exePath: 'devskim'
63+
artifactName: 'linux-mac-archive'
64+
preBuild:
65+
- template: nbgv-set-version-steps.yml@templates
66+
- template: dotnet-publish-win-netcore-job.yml@templates
67+
parameters:
68+
buildConfiguration: 'Release'
69+
dotnetVersion: ${{ variables.DotnetVersion }}
70+
projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.CLI/Microsoft.DevSkim.CLI.csproj'
71+
projectName: 'DevSkim_CLI'
72+
artifactName: 'win-netcore-archive'
73+
preBuild:
74+
- template: nbgv-set-version-steps.yml@templates
75+
- template: nuget-build-job.yml@templates
76+
parameters:
77+
jobName: 'pack_lib'
78+
buildConfiguration: 'Release'
79+
dotnetVersion: ${{ variables.DotnetVersion }}
80+
projectPath: 'DevSkim-DotNet/Microsoft.DevSkim/Microsoft.DevSkim.csproj'
81+
projectName: 'DevSkim_Lib'
82+
artifactName: 'nuget-lib-archive'
83+
preBuild:
84+
- template: nbgv-set-version-steps.yml@templates
85+
- template: nuget-build-job.yml@templates
86+
parameters:
87+
jobName: 'pack_cli'
88+
buildConfiguration: 'Release'
89+
dotnetVersion: ${{ variables.DotnetVersion }}
90+
projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.CLI/Microsoft.DevSkim.CLI.csproj'
91+
projectName: 'DevSkim_CLI'
92+
artifactName: 'nuget-cli-archive'
93+
preBuild:
94+
- template: nbgv-set-version-steps.yml@templates

Pipelines/vs/devskim-visualstudio-pr.yml

Lines changed: 52 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -13,52 +13,56 @@ resources:
1313
- repository: templates
1414
type: git
1515
name: SecurityEngineering/OSS-Tools-Pipeline-Templates
16-
ref: refs/tags/v1.1.1
17-
18-
stages:
19-
- stage: SDL
20-
dependsOn: []
21-
jobs:
22-
- template: sdl-job.yml@templates
23-
parameters:
24-
serviceTreeID: '9792b8d3-bc2c-432c-8fc9-bdb143552208'
16+
ref: refs/tags/v2.0.0
17+
- repository: 1esPipelines
18+
type: git
19+
name: 1ESPipelineTemplates/1ESPipelineTemplates
20+
ref: refs/tags/release
2521

26-
- stage: Build
27-
dependsOn: []
28-
jobs:
29-
- template: dotnet-build-job.yml@templates
30-
parameters:
31-
buildTool: 'msbuild'
32-
buildConfiguration: 'Release'
33-
dotnetVersion: '8.0.x'
34-
targetFramework: 'net47'
35-
projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.VisualStudio/Microsoft.DevSkim.VisualStudio.csproj'
36-
projectName: 'DevSkim_VS'
37-
preBuild:
38-
- template: nbgv-set-version-steps.yml@templates
39-
# Workaround: Using the .NET 8 SDK doesn't install the right version of MSBuild for .NET 8
40-
# Using the .NET 7 SDK doesn't include the .NET 8 SDK so it can't build the project
41-
# Install both for now until the right version of MSBuild is included with .NET 8
42-
- task: UseDotNet@2
43-
displayName: Install Dotnet 7 SDK
44-
inputs:
45-
packageType: 'sdk'
46-
version: '7.0.x'
47-
onEnd:
48-
- task: PowerShell@2
49-
displayName: Mkdir for Extension
50-
inputs:
51-
targetType: 'inline'
52-
script: mkdir extension
53-
workingDirectory: '$(Build.StagingDirectory)'
54-
- task: PowerShell@2
55-
displayName: Move Extension File
56-
inputs:
57-
targetType: 'inline'
58-
script: 'mv $env:BUILD_STAGINGDIRECTORY/bin/dotnetapp/DevSkim_VS_dotnetapp_$(ReleaseVersion)/*.vsix $env:BUILD_STAGINGDIRECTORY/extension'
59-
- task: PublishBuildArtifacts@1
60-
displayName: Pipeline Publish Extension
61-
inputs:
62-
PathtoPublish: '$(Build.StagingDirectory)/extension'
63-
ArtifactName: 'Unsigned_Extension'
64-
publishLocation: 'Container'
22+
extends:
23+
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
24+
parameters:
25+
pool:
26+
name: MSSecurity-1ES-Build-Agents-Pool
27+
image: MSSecurity-1ES-Windows-2022
28+
os: windows
29+
stages:
30+
- stage: Build
31+
dependsOn: []
32+
jobs:
33+
- template: dotnet-build-job.yml@templates
34+
parameters:
35+
buildTool: 'msbuild'
36+
buildConfiguration: 'Release'
37+
dotnetVersion: '8.0.x'
38+
targetFramework: 'net47'
39+
projectPath: 'DevSkim-DotNet/Microsoft.DevSkim.VisualStudio/Microsoft.DevSkim.VisualStudio.csproj'
40+
projectName: 'DevSkim_VS'
41+
poolName: MSSecurity-1ES-Build-Agents-Pool
42+
poolImage: MSSecurity-1ES-Windows-2022
43+
poolOs: windows
44+
artifactName: 'vs-archive'
45+
extraArtifactName: 'Unsigned_Extension'
46+
extraArtifactLocation: 'extension'
47+
preBuild:
48+
- template: nbgv-set-version-steps.yml@templates
49+
# Workaround: Using the .NET 8 SDK doesn't install the right version of MSBuild for .NET 8
50+
# Using the .NET 7 SDK doesn't include the .NET 8 SDK so it can't build the project
51+
# Install both for now until the right version of MSBuild is included with .NET 8
52+
- task: UseDotNet@2
53+
displayName: Install Dotnet 7 SDK
54+
inputs:
55+
packageType: 'sdk'
56+
version: '7.0.x'
57+
onEnd:
58+
- task: PowerShell@2
59+
displayName: Mkdir for Extension
60+
inputs:
61+
targetType: 'inline'
62+
script: mkdir extension
63+
workingDirectory: '$(Build.StagingDirectory)'
64+
- task: PowerShell@2
65+
displayName: Move Extension File
66+
inputs:
67+
targetType: 'inline'
68+
script: 'mv $env:BUILD_STAGINGDIRECTORY/bin/dotnetapp/DevSkim_VS_dotnetapp_$(ReleaseVersion)/*.vsix $env:BUILD_STAGINGDIRECTORY/extension'

0 commit comments

Comments
 (0)