Skip to content

Commit 3641d18

Browse files
authored
Add pipauth to more ADO pipelines and enable CSV (#22612)
### Description 1. Add pipauth to more ADO pipeline. (We will use a private ADO feed to fetch python packages in these pipeline, to improve security) 2. Enforce codeSignValidation(CSV). ### Motivation and Context Fulfill some internal compliance requirements.
1 parent dcf9126 commit 3641d18

10 files changed

+70
-12
lines changed

tools/ci_build/github/azure-pipelines/nuget-windows-ai.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ extends:
1919
sdl:
2020
tsa:
2121
enabled: true
22+
codeSignValidation:
23+
enabled: true
24+
break: true
2225
policheck:
2326
enabled: true
2427
exclusionsFile: '$(Build.SourcesDirectory)\tools\ci_build\policheck_exclusions.xml'

tools/ci_build/github/azure-pipelines/py-cuda-alt-packaging-pipeline.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,15 @@ extends:
2828
# For productions pipelines, use "Official".
2929
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
3030
parameters:
31-
# Update the pool with your team's 1ES hosted pool.
31+
sdl:
32+
tsa:
33+
enabled: true
34+
codeSignValidation:
35+
enabled: true
36+
break: true
37+
policheck:
38+
enabled: true
39+
exclusionsFile: '$(Build.SourcesDirectory)\tools\ci_build\policheck_exclusions.xml'
3240
pool:
3341
name: 'onnxruntime-Win-CPU-2022' # Name of your hosted pool
3442
os: windows # OS of the image. This value cannot be a variable. Allowed values: windows, linux, macOS

tools/ci_build/github/azure-pipelines/py-cuda-packaging-pipeline.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,15 @@ extends:
3030
# For productions pipelines, use "Official".
3131
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
3232
parameters:
33-
# Update the pool with your team's 1ES hosted pool.
33+
sdl:
34+
tsa:
35+
enabled: true
36+
codeSignValidation:
37+
enabled: true
38+
break: true
39+
policheck:
40+
enabled: true
41+
exclusionsFile: '$(Build.SourcesDirectory)\tools\ci_build\policheck_exclusions.xml'
3442
pool:
3543
name: 'onnxruntime-Win-CPU-2022' # Name of your hosted pool
3644
os: windows # OS of the image. This value cannot be a variable. Allowed values: windows, linux, macOS

tools/ci_build/github/azure-pipelines/py-dml-packaging-pipeline.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,16 @@ extends:
2020
# For productions pipelines, use "Official".
2121
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
2222
parameters:
23-
# Update the pool with your team's 1ES hosted pool.
23+
sdl:
24+
tsa:
25+
enabled: true
26+
codeSignValidation:
27+
enabled: true
28+
break: true
29+
policheck:
30+
enabled: true
31+
exclusionsFile: '$(Build.SourcesDirectory)\tools\ci_build\policheck_exclusions.xml'
32+
2433
pool:
2534
name: 'onnxruntime-Win-CPU-2022' # Name of your hosted pool
2635
os: windows # OS of the image. This value cannot be a variable. Allowed values: windows, linux, macOS

tools/ci_build/github/azure-pipelines/stages/py-win-gpu-stage.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,12 @@ stages:
8585
addToPath: true
8686
architecture: 'x64'
8787

88+
- task: PipAuthenticate@1
89+
displayName: 'Pip Authenticate'
90+
inputs:
91+
artifactFeeds: 'Lotus'
92+
93+
8894
- template: ../templates/download-deps.yml
8995

9096
- ${{ if ne(parameters.ENV_SETUP_SCRIPT, '') }}:

tools/ci_build/github/azure-pipelines/templates/py-win-arm64-qnn.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ jobs:
5959
addToPath: true
6060
architecture: 'arm64'
6161

62+
- task: PipAuthenticate@1
63+
displayName: 'Pip Authenticate'
64+
inputs:
65+
artifactFeeds: 'Lotus'
66+
6267
- task: onebranch.pipeline.tsaoptions@1
6368
displayName: 'OneBranch TSAOptions'
6469
inputs:

tools/ci_build/github/azure-pipelines/templates/py-win-arm64ec-qnn.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ jobs:
5050
addToPath: true
5151
architecture: 'x64'
5252

53+
- task: PipAuthenticate@1
54+
displayName: 'Pip Authenticate'
55+
inputs:
56+
artifactFeeds: 'Lotus'
57+
5358
- task: onebranch.pipeline.tsaoptions@1
5459
displayName: 'OneBranch TSAOptions'
5560
inputs:

tools/ci_build/github/azure-pipelines/templates/py-win-x64-qnn.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ jobs:
5050
addToPath: true
5151
architecture: 'x64'
5252

53+
- task: PipAuthenticate@1
54+
displayName: 'Pip Authenticate'
55+
inputs:
56+
artifactFeeds: 'Lotus'
57+
5358
- task: onebranch.pipeline.tsaoptions@1
5459
displayName: 'OneBranch TSAOptions'
5560
inputs:

tools/ci_build/github/azure-pipelines/templates/win-ci.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,20 +118,26 @@ stages:
118118
clean: true
119119
submodules: none
120120

121+
- task: UsePythonVersion@0
122+
inputs:
123+
versionSpec: '3.12'
124+
addToPath: true
125+
architecture: ${{ parameters.buildArch }}
126+
121127
- template: telemetry-steps.yml
122128

129+
- task: PipAuthenticate@1
130+
displayName: 'Pip Authenticate'
131+
inputs:
132+
artifactFeeds: 'Lotus'
133+
123134
- ${{ if eq(parameters['buildJava'], 'true') }}:
124135
- task: JavaToolInstaller@0
125136
inputs:
126137
versionSpec: "11"
127138
jdkArchitectureOption: ${{ parameters.buildArch }}
128139
jdkSourceOption: 'PreInstalled'
129140

130-
- task: UsePythonVersion@0
131-
inputs:
132-
versionSpec: '3.12'
133-
addToPath: true
134-
architecture: ${{ parameters.buildArch }}
135141

136142
- task: NodeTool@0
137143
condition: and(succeeded(), eq('${{ parameters.buildNodejs}}', true))
@@ -364,6 +370,11 @@ stages:
364370
addToPath: true
365371
architecture: ${{ parameters.buildArch }}
366372

373+
- task: PipAuthenticate@1
374+
displayName: 'Pip Authenticate'
375+
inputs:
376+
artifactFeeds: 'Lotus'
377+
367378
- task: NodeTool@0
368379
condition: and(succeeded(), eq('${{ parameters.buildNodejs}}', true))
369380
inputs:

tools/ci_build/github/azure-pipelines/templates/windowsai-steps.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- task: PipAuthenticate@1
3333
displayName: 'Pip Authenticate'
3434
inputs:
35-
artifactFeeds: 'PublicPackages/ORT-Nightly'
35+
artifactFeeds: 'Lotus'
3636

3737
- template: telemetry-steps.yml
3838

@@ -87,10 +87,8 @@ jobs:
8787
8888
# must call vsdevcmd first to add cmake to PATH
8989
- script: |
90-
curl -O -L https://github.com/Kitware/CMake/releases/download/v3.28.3/cmake-3.28.3-windows-x86_64.zip
91-
7z x cmake-3.28.3-windows-x86_64.zip
9290
python --version
93-
python "$(Build.SourcesDirectory)\tools\ci_build\build.py" --build_dir $(Build.BinariesDirectory) --parallel --use_binskim_compliant_compile_flags --build_shared_lib --enable_onnx_tests --ms_experimental --use_dml --use_winml --cmake_generator "Visual Studio 17 2022" --update --config RelWithDebInfo --enable_lto --use_telemetry --disable_rtti --enable_wcos --windows_sdk_version "10.0.22621.0" $(BuildFlags) --cmake_extra_defines "CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO=/PROFILE" "CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO=/PROFILE" --cmake_path $(Build.BinariesDirectory)\cmake-3.28.3-windows-x86_64\bin\cmake.exe --ctest_path $(Build.BinariesDirectory)\cmake-3.28.3-windows-x86_64\bin\ctest.exe
91+
python "$(Build.SourcesDirectory)\tools\ci_build\build.py" --build_dir $(Build.BinariesDirectory) --parallel --use_binskim_compliant_compile_flags --build_shared_lib --enable_onnx_tests --ms_experimental --use_dml --use_winml --cmake_generator "Visual Studio 17 2022" --update --config RelWithDebInfo --enable_lto --use_telemetry --disable_rtti --enable_wcos --windows_sdk_version "10.0.22621.0" $(BuildFlags) --cmake_extra_defines "CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO=/PROFILE" "CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO=/PROFILE"
9492
workingDirectory: '$(Build.BinariesDirectory)'
9593
displayName: 'Generate cmake config'
9694

0 commit comments

Comments
 (0)