@@ -75,6 +75,16 @@ extends:
75
75
}
76
76
displayName: Test if tsaoptions.json exists
77
77
78
+ - task : UseDotNet@2
79
+ displayName : ' Install .NET dependencies'
80
+ inputs :
81
+ packageType : ' sdk'
82
+ useGlobalJson : true
83
+ # this is to ensure that we are installing the dotnet at the same location as container by default install the dotnet sdks
84
+ # This prevents signing from breaking
85
+ installationPath : ' C:\Program Files\dotnet\'
86
+ workingDirectory : $(repoRoot)
87
+
78
88
# this is installing .NET
79
89
- pwsh : |
80
90
Set-Location "$(repoRoot)"
@@ -109,45 +119,6 @@ extends:
109
119
Write-Host "##$vstsCommandString"
110
120
displayName: Setup variables for signing
111
121
112
- - task : CopyFiles@2
113
- displayName : " Copy Files for 'publish build directory' publish task"
114
- inputs :
115
- SourceFolder : " $(signSrcPath)"
116
- Contents : ' **'
117
- TargetFolder : $(Build.ArtifactStagingDirectory)/ONEBRANCH_ARTIFACT
118
-
119
- - job : jobsign
120
- dependsOn : jobbuild
121
- displayName : Sign Microsoft.PowerShell.ScriptAnalyzer Files
122
- variables :
123
- - name : ob_outputDirectory
124
- value : ' $(Build.ArtifactStagingDirectory)/ONEBRANCH_ARTIFACT'
125
- - name : repoRoot
126
- value : $(Build.SourcesDirectory)\OSS_Microsoft_PSSA
127
- - name : ob_sdl_tsa_configFile
128
- value : $(Build.SourcesDirectory)\OSS_Microsoft_PSSA\.config\tsaoptions.json
129
- - name : ob_sdl_sbom_enabled
130
- value : true
131
- - name : ob_sdl_codeql_compiled_enabled
132
- value : false
133
- - name : signSrcPath
134
- value : $(repoRoot)/out
135
- pool :
136
- type : windows
137
- steps :
138
- - checkout : self
139
-
140
- - task : DownloadPipelineArtifact@2
141
- displayName : ' Download build files'
142
- inputs :
143
- targetPath : $(signSrcPath)
144
- artifact : drop_stagebuild_jobbuild
145
-
146
- - pwsh : |
147
- Set-Location "$(signSrcPath)"
148
- dir -recurse *
149
- displayName: Capture artifacts
150
-
151
122
- task : onebranch.pipeline.signing@1
152
123
displayName : Sign 1st party files
153
124
inputs :
@@ -165,14 +136,14 @@ extends:
165
136
search_root : $(signSrcPath)
166
137
167
138
- task : CopyFiles@2
168
- displayName : " Copy Files for 'publish build directory' publish task "
139
+ displayName : " Copy signed module files to ob_outputDirectory "
169
140
inputs :
170
141
SourceFolder : " $(signSrcPath)"
171
142
Contents : ' **'
172
143
TargetFolder : $(Build.ArtifactStagingDirectory)/ONEBRANCH_ARTIFACT
173
144
174
145
- job : nupkg
175
- dependsOn : jobsign
146
+ dependsOn : jobbuild
176
147
displayName : Package Microsoft.PowerShell.ScriptAnalyzer
177
148
variables :
178
149
- name : ob_outputDirectory
@@ -203,8 +174,8 @@ extends:
203
174
displayName : ' Download build files'
204
175
inputs :
205
176
targetPath : $(signSrcPath)
206
- artifact : drop_stagebuild_jobsign
207
- # # download
177
+ artifact : drop_stagebuild_jobbuild
178
+
208
179
- pwsh : |
209
180
Set-Location "$(signSrcPath)"
210
181
dir -recurse *
@@ -216,7 +187,7 @@ extends:
216
187
displayName: Create nupkg for publishing
217
188
218
189
- task : CopyFiles@2
219
- displayName : " Copy Files for 'Publish module nupkg' publish task "
190
+ displayName : " Copy Files nupkg to ob_outputDirectory "
220
191
inputs :
221
192
Contents : " $(signOutPath)/PSScriptAnalyzer.$(moduleVersion).nupkg"
222
193
TargetFolder : $(Build.ArtifactStagingDirectory)/ONEBRANCH_ARTIFACT
0 commit comments