Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite release signing pipeline #1408

Merged
merged 8 commits into from
Feb 3, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Next Next commit
Replace PackageES with ESRP template
This isn't done, but I need to start a pipeline run to see where it's at.
  • Loading branch information
andyleejordan committed Feb 1, 2021
commit 1f20828b7342baa3239899aa73660e80f6ffdb47
11 changes: 10 additions & 1 deletion .vsts-ci/azure-pipelines-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ trigger:
- /LICENSE
- /CODE_OF_CONDUCT.md

resources:
repositories:
- repository: ComplianceRepo
type: github
endpoint: ComplianceGHRepo
name: PowerShell/compliance

jobs:

- job: 'ReleaseBuild'
Expand All @@ -45,7 +52,9 @@ jobs:
displayName: Signing Build
dependsOn: 'ReleaseBuild'
pool:
name: 'Package ES CodeHub Lab E'
name: 'Package ES Standard Build'
demands: DotNetFramework
variables:
- group: ESRP
steps:
- template: templates/release-general.yml
37 changes: 22 additions & 15 deletions .vsts-ci/templates/release-general.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
steps:
- checkout: self

- powershell: |
Write-Host "Installing pwsh..."
if (Get-Command pwsh -ErrorAction Ignore)
Expand All @@ -19,12 +21,6 @@ steps:
displayName: Capture environment
condition: succeededOrFailed()

- task: PkgESSetupBuild@10
displayName: 'Package ES - Setup Build'
inputs:
productName: PowerShellEditorServices
useDfs: false

- task: DownloadBuildArtifacts@0
displayName: 'Download Build Artifacts'
inputs:
Expand All @@ -40,14 +36,25 @@ steps:
$psesZip | Expand-Archive -DestinationPath $dest -Force -Verbose
$psesZip | Remove-Item -Recurse -Force

- task: PkgESCodeSign@10
displayName: 'CodeSign tools/releaseBuild/signing.xml'
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
inputs:
signConfigXml: tools/releaseBuild/signing.xml
inPathRoot: '$(Build.ArtifactStagingDirectory)'
outPathRoot: '$(Build.ArtifactStagingDirectory)\Signed'
- checkout: ComplianceRepo

- template: EsrpSign.yml@ComplianceRepo
displayName: 'Sign the scripts and libraries'
parameters:
buildOutputPath: '$(Build.ArtifactStagingDirectory)'
signOutputPath: '$(Build.ArtifactStagingDirectory)/Signed'
certificateId: 'CP-230012' # Authenticode certificate.
useMinimatch: true
andyleejordan marked this conversation as resolved.
Show resolved Hide resolved
pattern: |
# PowerShellEditorServices Script
release/out/PowerShellEditorServices/PowerShellEditorServices/*.{psd1,psm1,ps1xml}
release/out/PowerShellEditorServices/PowerShellEditorServices/Commands/**/*.{psd1,psm1,ps1xml}
# PowerShellEditorServices Binaries
release/out/**/Microsoft.PowerShell.EditorServices*.dll
# PowerShellEditorServices.VSCode Script
release/out/**/PowerShellEditorServices.VSCode.psd1
# PowerShellEditorServices.VSCode Binary
release/out/**/Microsoft.PowerShell.EditorServices.VSCode.dll

- task: PowerShell@1
displayName: 'Copy signed items into output'
Expand Down Expand Up @@ -100,7 +107,7 @@ steps:
optionsXS: 0
optionsPE: '1|2|3|4'
optionsHMENABLE: 0
optionsFTPATH: '$(Build.SourcesDirectory)\tools\terms\FileTypeSet.xml'
optionsFTPATH: '$(Build.SourcesDirectory)/PowerShellEditorServices/tools/terms/FileTypeSet.xml'
# toolVersion: 5.8.2.1

- task: CredScan@2
Expand Down