@@ -75,6 +75,16 @@ extends:
7575 }
7676 displayName: Test if tsaoptions.json exists
7777
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+
7888 # this is installing .NET
7989 - pwsh : |
8090 Set-Location "$(repoRoot)"
@@ -109,45 +119,6 @@ extends:
109119 Write-Host "##$vstsCommandString"
110120 displayName: Setup variables for signing
111121
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-
151122 - task : onebranch.pipeline.signing@1
152123 displayName : Sign 1st party files
153124 inputs :
@@ -165,14 +136,14 @@ extends:
165136 search_root : $(signSrcPath)
166137
167138 - task : CopyFiles@2
168- displayName : " Copy Files for 'publish build directory' publish task "
139+ displayName : " Copy signed module files to ob_outputDirectory "
169140 inputs :
170141 SourceFolder : " $(signSrcPath)"
171142 Contents : ' **'
172143 TargetFolder : $(Build.ArtifactStagingDirectory)/ONEBRANCH_ARTIFACT
173144
174145 - job : nupkg
175- dependsOn : jobsign
146+ dependsOn : jobbuild
176147 displayName : Package Microsoft.PowerShell.ScriptAnalyzer
177148 variables :
178149 - name : ob_outputDirectory
@@ -203,8 +174,8 @@ extends:
203174 displayName : ' Download build files'
204175 inputs :
205176 targetPath : $(signSrcPath)
206- artifact : drop_stagebuild_jobsign
207- # # download
177+ artifact : drop_stagebuild_jobbuild
178+
208179 - pwsh : |
209180 Set-Location "$(signSrcPath)"
210181 dir -recurse *
@@ -216,7 +187,7 @@ extends:
216187 displayName: Create nupkg for publishing
217188
218189 - task : CopyFiles@2
219- displayName : " Copy Files for 'Publish module nupkg' publish task "
190+ displayName : " Copy Files nupkg to ob_outputDirectory "
220191 inputs :
221192 Contents : " $(signOutPath)/PSScriptAnalyzer.$(moduleVersion).nupkg"
222193 TargetFolder : $(Build.ArtifactStagingDirectory)/ONEBRANCH_ARTIFACT
0 commit comments