Skip to content

Commit d3c4055

Browse files
authored
Switch to 1es template (#416)
* Remove Codeql3000 * Switch to 1es templates * Fix publish * Fix nuget.config * ^ * BL * public stage * No binlog * params * Fix it again
1 parent 4844a3c commit d3c4055

34 files changed

+124
-2440
lines changed

.codeql.yml

Lines changed: 0 additions & 64 deletions
This file was deleted.

.config/tsaoptions.json

Lines changed: 0 additions & 12 deletions
This file was deleted.

azure-pipelines-public.yml

Lines changed: 7 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -23,78 +23,11 @@ variables:
2323
trigger: [main]
2424
pr: ['*']
2525

26-
jobs:
27-
- job: build
26+
stages:
27+
- stage: build
2828
displayName: Build
29-
pool:
30-
${{ if eq(variables['System.TeamProject'], 'public') }}:
31-
name: NetCore-Svc-Public
32-
demands: ImageOverride -equals windows.vs2019.amd64.open
33-
${{ else }}:
34-
name: NetCore1ESPool-Svc-Internal
35-
demands: ImageOverride -equals windows.vs2019.amd64
36-
timeoutInMinutes: 30
37-
38-
strategy:
39-
matrix:
40-
Release:
41-
_BuildTarget: ${{ parameters.ReleaseBuildTarget }}
42-
_Configuration: Release
43-
_StyleCopEnabled: true
44-
# Do CG work only in internal pipelines.
45-
skipComponentGovernanceDetection: ${{ eq(variables['System.TeamProject'], 'public') }}
46-
Debug:
47-
_BuildTarget: ${{ parameters.OtherBuildTarget }}
48-
_Configuration: Debug
49-
_StyleCopEnabled: false
50-
# Do not redo CG work. Configuration changes in this part of the matrix are not relevant to CG.
51-
skipComponentGovernanceDetection: true
52-
CodeAnalysis:
53-
_BuildTarget: ${{ parameters.OtherBuildTarget }}
54-
_Configuration: CodeAnalysis
55-
_StyleCopEnabled: false
56-
# Do not redo CG work. Configuration changes in this part of the matrix are not relevant to CG.
57-
skipComponentGovernanceDetection: true
58-
59-
steps:
60-
- checkout: self
61-
clean: true
62-
displayName: Checkout
63-
64-
- task: UseDotNet@2
65-
displayName: Get .NET SDK
66-
inputs:
67-
useGlobalJson: true
68-
- task: UseDotNet@2
69-
displayName: Get .NET 2.1 runtime
70-
inputs:
71-
packageType: runtime
72-
version: '2.1.x'
73-
74-
- script: .\build.cmd EnableSkipStrongNames
75-
displayName: Enable SkipStrongNames
76-
- script: .\build.cmd $(_BuildTarget) ^
77-
/binaryLogger:artifacts/msbuild.binlog /p:Configuration=$(_Configuration) /p:StyleCopEnabled=$(_StyleCopEnabled) ^
78-
/fileLoggerParameters:LogFile=artifacts/msbuild.log;Summary;Verbosity=minimal
79-
displayName: Build
80-
81-
- publish: ./bin/$(_Configuration)/Test/TestResults/
82-
artifact: $(_Configuration) Test Results $(System.JobId)
83-
condition: and(always(), ne(variables._BuildTarget, 'Build'))
84-
continueOnError: true
85-
displayName: Upload test results
86-
- task: PublishTestResults@2
87-
condition: and(always(), ne(variables._BuildTarget, 'Build'))
88-
continueOnError: true
89-
displayName: Publish test results
90-
inputs:
91-
mergeTestResults: true
92-
searchFolder: ./bin/$(_Configuration)/Test/TestResults/
93-
testResultsFiles: '*.xml'
94-
testRunner: xUnit
95-
testRunTitle: $(_Configuration)
96-
97-
- publish: ./artifacts/
98-
artifact: $(_Configuration) Logs $(System.JobId)
99-
condition: always()
100-
displayName: Upload logs
29+
jobs:
30+
- template: /eng/templates/default-build.yml
31+
parameters:
32+
ReleaseBuildTarget: ${{ parameters.ReleaseBuildTarget }}
33+
OtherBuildTarget: ${{ parameters.OtherBuildTarget }}

azure-pipelines.yml

Lines changed: 22 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -23,78 +23,26 @@ variables:
2323
trigger: [main]
2424
pr: ['*']
2525

26-
jobs:
27-
- job: build
28-
displayName: Build
29-
pool:
30-
${{ if eq(variables['System.TeamProject'], 'public') }}:
31-
name: NetCore-Svc-Public
32-
demands: ImageOverride -equals windows.vs2019.amd64.open
33-
${{ else }}:
26+
resources:
27+
repositories:
28+
# Repo: 1ESPipelineTemplates/1ESPipelineTemplates
29+
- repository: 1esPipelines
30+
type: git
31+
name: 1ESPipelineTemplates/1ESPipelineTemplates
32+
ref: refs/tags/release
33+
34+
extends:
35+
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
36+
parameters:
37+
pool:
3438
name: NetCore1ESPool-Svc-Internal
35-
demands: ImageOverride -equals windows.vs2019.amd64
36-
timeoutInMinutes: 30
37-
38-
strategy:
39-
matrix:
40-
Release:
41-
_BuildTarget: ${{ parameters.ReleaseBuildTarget }}
42-
_Configuration: Release
43-
_StyleCopEnabled: true
44-
# Do CG work only in internal pipelines.
45-
skipComponentGovernanceDetection: ${{ eq(variables['System.TeamProject'], 'public') }}
46-
Debug:
47-
_BuildTarget: ${{ parameters.OtherBuildTarget }}
48-
_Configuration: Debug
49-
_StyleCopEnabled: false
50-
# Do not redo CG work. Configuration changes in this part of the matrix are not relevant to CG.
51-
skipComponentGovernanceDetection: true
52-
CodeAnalysis:
53-
_BuildTarget: ${{ parameters.OtherBuildTarget }}
54-
_Configuration: CodeAnalysis
55-
_StyleCopEnabled: false
56-
# Do not redo CG work. Configuration changes in this part of the matrix are not relevant to CG.
57-
skipComponentGovernanceDetection: true
58-
59-
steps:
60-
- checkout: self
61-
clean: true
62-
displayName: Checkout
63-
64-
- task: UseDotNet@2
65-
displayName: Get .NET SDK
66-
inputs:
67-
useGlobalJson: true
68-
- task: UseDotNet@2
69-
displayName: Get .NET 2.1 runtime
70-
inputs:
71-
packageType: runtime
72-
version: '2.1.x'
73-
74-
- script: .\build.cmd EnableSkipStrongNames
75-
displayName: Enable SkipStrongNames
76-
- script: .\build.cmd $(_BuildTarget) ^
77-
/binaryLogger:artifacts/msbuild.binlog /p:Configuration=$(_Configuration) /p:StyleCopEnabled=$(_StyleCopEnabled) ^
78-
/fileLoggerParameters:LogFile=artifacts/msbuild.log;Summary;Verbosity=minimal
79-
displayName: Build
80-
81-
- publish: ./bin/$(_Configuration)/Test/TestResults/
82-
artifact: $(_Configuration) Test Results $(System.JobId)
83-
condition: and(always(), ne(variables._BuildTarget, 'Build'))
84-
continueOnError: true
85-
displayName: Upload test results
86-
- task: PublishTestResults@2
87-
condition: and(always(), ne(variables._BuildTarget, 'Build'))
88-
continueOnError: true
89-
displayName: Publish test results
90-
inputs:
91-
mergeTestResults: true
92-
searchFolder: ./bin/$(_Configuration)/Test/TestResults/
93-
testResultsFiles: '*.xml'
94-
testRunner: xUnit
95-
testRunTitle: $(_Configuration)
96-
97-
- publish: ./artifacts/
98-
artifact: $(_Configuration) Logs $(System.JobId)
99-
condition: always()
100-
displayName: Upload logs
39+
image: 1es-windows-2019-pt
40+
os: windows
41+
stages:
42+
- stage: build
43+
displayName: Build
44+
jobs:
45+
- template: /eng/templates/default-build.yml@self
46+
parameters:
47+
ReleaseBuildTarget: ${{ parameters.ReleaseBuildTarget }}
48+
OtherBuildTarget: ${{ parameters.OtherBuildTarget }}

0 commit comments

Comments
 (0)