Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
1ed48b1
Updates to signing
adityapatwardhan Mar 12, 2024
b74f202
fix files to sign
TravisEz13 Mar 13, 2024
9a24c68
sbom changes
TravisEz13 Mar 13, 2024
b9cdd49
format changes
TravisEz13 Mar 13, 2024
83cc690
Make packaging wait on build
TravisEz13 Mar 13, 2024
ed91b82
clarify task display names
TravisEz13 Mar 13, 2024
80473e2
Make sure signing is setup
TravisEz13 Mar 13, 2024
18232e3
move other tasks to restore phase
TravisEz13 Mar 13, 2024
a570c56
move checkout to restore phase
TravisEz13 Mar 13, 2024
4331d7b
update container
TravisEz13 Mar 13, 2024
473498e
move signing to it's own job
TravisEz13 Mar 13, 2024
4330f12
add flag required for newest container
TravisEz13 Mar 13, 2024
1bdc123
clarify copy files task displaynames
TravisEz13 Mar 13, 2024
3d2c9dd
reuse existing variable
TravisEz13 Mar 13, 2024
a9cadb3
removed unneeded code
TravisEz13 Mar 13, 2024
dd9e7a6
Use correct path is signing job
TravisEz13 Mar 13, 2024
5062efd
sign the nupkg
TravisEz13 Mar 13, 2024
1465ca9
fix syntax
TravisEz13 Mar 13, 2024
fa48f5d
Revert "clarify copy files task displaynames"
TravisEz13 Mar 13, 2024
9c1cfad
Disable code sign validation on first job
TravisEz13 Mar 13, 2024
d5d03f0
search for where OBP put dotnet.exe
TravisEz13 Mar 13, 2024
f3ef9e7
Move SDK search to it's own job
TravisEz13 Mar 13, 2024
ac44341
delete SDK search
TravisEz13 Mar 13, 2024
440ceb6
make nupkg signing a todo
TravisEz13 Mar 13, 2024
9c65c5b
fix nupkg publishing
TravisEz13 Mar 13, 2024
663f093
try disabling codeql to get signing working per docs
TravisEz13 Mar 13, 2024
1ed8039
don't setup signing where not needed
TravisEz13 Mar 13, 2024
a03237d
combine sign and build job
TravisEz13 Mar 14, 2024
504c5df
set version for SBOM
TravisEz13 Mar 14, 2024
dd8c136
make comments more accurate
TravisEz13 Mar 14, 2024
9a68ea5
Apply suggestions from code review
TravisEz13 Mar 14, 2024
49d6365
fix variable name
TravisEz13 Mar 14, 2024
368a7e8
address pr comments
TravisEz13 Mar 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
clarify copy files task displaynames
  • Loading branch information
TravisEz13 committed Mar 13, 2024
commit 1bdc12331318fa37bc6041ab9b4d7d222e72ee98
59 changes: 15 additions & 44 deletions .pipelines/OSS_Microsoft_PSSA-Official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,16 @@ extends:
}
displayName: Test if tsaoptions.json exists

- task: UseDotNet@2
displayName: 'Install .NET dependencies'
inputs:
packageType: 'sdk'
useGlobalJson: true
# this is to ensure that we are installing the dotnet at the same location as container by default install the dotnet sdks
# This prevents signing from breaking
installationPath: 'C:\Program Files\dotnet\'
workingDirectory: $(repoRoot)

# this is installing .NET
- pwsh: |
Set-Location "$(repoRoot)"
Expand Down Expand Up @@ -109,45 +119,6 @@ extends:
Write-Host "##$vstsCommandString"
displayName: Setup variables for signing

- task: CopyFiles@2
displayName: "Copy Files for 'publish build directory' publish task"
inputs:
SourceFolder: "$(signSrcPath)"
Contents: '**'
TargetFolder: $(Build.ArtifactStagingDirectory)/ONEBRANCH_ARTIFACT

- job: jobsign
dependsOn: jobbuild
displayName: Sign Microsoft.PowerShell.ScriptAnalyzer Files
variables:
- name: ob_outputDirectory
value: '$(Build.ArtifactStagingDirectory)/ONEBRANCH_ARTIFACT'
- name: repoRoot
value: $(Build.SourcesDirectory)\OSS_Microsoft_PSSA
- name: ob_sdl_tsa_configFile
value: $(Build.SourcesDirectory)\OSS_Microsoft_PSSA\.config\tsaoptions.json
- name: ob_sdl_sbom_enabled
value: true
- name: ob_sdl_codeql_compiled_enabled
value: false
- name: signSrcPath
value: $(repoRoot)/out
pool:
type: windows
steps:
- checkout: self

- task: DownloadPipelineArtifact@2
displayName: 'Download build files'
inputs:
targetPath: $(signSrcPath)
artifact: drop_stagebuild_jobbuild

- pwsh: |
Set-Location "$(signSrcPath)"
dir -recurse *
displayName: Capture artifacts

- task: onebranch.pipeline.signing@1
displayName: Sign 1st party files
inputs:
Expand All @@ -165,14 +136,14 @@ extends:
search_root: $(signSrcPath)

- task: CopyFiles@2
displayName: "Copy Files for 'publish build directory' publish task"
displayName: "Copy signed module files to ob_outputDirectory"
inputs:
SourceFolder: "$(signSrcPath)"
Contents: '**'
TargetFolder: $(Build.ArtifactStagingDirectory)/ONEBRANCH_ARTIFACT

- job: nupkg
dependsOn: jobsign
dependsOn: jobbuild
displayName: Package Microsoft.PowerShell.ScriptAnalyzer
variables:
- name: ob_outputDirectory
Expand Down Expand Up @@ -203,8 +174,8 @@ extends:
displayName: 'Download build files'
inputs:
targetPath: $(signSrcPath)
artifact: drop_stagebuild_jobsign
## download
artifact: drop_stagebuild_jobbuild

- pwsh: |
Set-Location "$(signSrcPath)"
dir -recurse *
Expand All @@ -216,7 +187,7 @@ extends:
displayName: Create nupkg for publishing

- task: CopyFiles@2
displayName: "Copy Files for 'Publish module nupkg' publish task"
displayName: "Copy Files nupkg to ob_outputDirectory"
inputs:
Contents: "$(signOutPath)/PSScriptAnalyzer.$(moduleVersion).nupkg"
TargetFolder: $(Build.ArtifactStagingDirectory)/ONEBRANCH_ARTIFACT