@@ -39,7 +39,7 @@ resources:
39
39
name : PowerShell/compliance
40
40
41
41
stages :
42
- - stage : Build and Sign
42
+ - stage : BuildAndSign
43
43
displayName : Build and Sign
44
44
jobs :
45
45
- job : ' BuildAndSign'
@@ -51,15 +51,21 @@ stages:
51
51
demands :
52
52
- ImageOverride -equals PSMMS2019-Secure
53
53
steps :
54
+ - task : UseDotNet@2
55
+ displayName : ' Use .NET Core sdk'
56
+ inputs :
57
+ packageType : sdk
58
+ includePreviewVersions : true
59
+ version : 6.x
54
60
- powershell : |
55
61
Get-ChildItem -Path env:
56
62
displayName: Capture environment
57
63
condition: succeededOrFailed()
58
- steps :
59
64
- pwsh : |
60
65
# build agents get reused so we make sure to remove the old archive
61
66
Remove-Item -Path $(Build.SourcesDirectory)/SignedZip -Recurse -Force -ErrorAction Ignore
62
- Remove-Item -Path $(Build.SourcesDirectory)/Microsoft.PowerShell.TextUtility -Recurse -Force -ErrorAction Ignore
67
+ Remove-Item -Path $(Build.SourcesDirectory)/out -Recurse -Force -ErrorAction Ignore
68
+ Remove-Item -Path $(Build.SourcesDirectory)/signed -Recurse -Force -ErrorAction Ignore
63
69
.\build.ps1 -Clean
64
70
Remove-Item .\out\*.pdb
65
71
$packageVersion = (Import-PowerShellDataFile $(Build.SourcesDirectory)/out/Microsoft.PowerShell.TextUtility/Microsoft.PowerShell.TextUtility.psd1).ModuleVersion
@@ -75,9 +81,9 @@ stages:
75
81
# the folder which contains the binaries to sign
76
82
buildOutputPath : $(Build.SourcesDirectory)/out
77
83
# the location to put the signed output
78
- signOutputPath : $(Build.SourcesDirectory)/Microsoft.PowerShell.TextUtility
84
+ signOutputPath : $(Build.SourcesDirectory)/signed/ Microsoft.PowerShell.TextUtility
79
85
# the certificate ID to use
80
- certificateId : " CP-230012 "
86
+ certificateId : " CP-460906 "
81
87
# The file pattern to use
82
88
# If not using minimatch: comma separated, with * supported
83
89
# If using minimatch: newline separated, with !, **, and * supported.
@@ -89,30 +95,30 @@ stages:
89
95
90
96
- template : Sbom.yml@ComplianceRepo
91
97
parameters :
92
- BuildDropPath : $(Build.SourcesDirectory)/out /Microsoft.PowerShell.TextUtility
98
+ BuildDropPath : $(Build.SourcesDirectory)/signed /Microsoft.PowerShell.TextUtility
93
99
Build_Repository_Uri : ' https://github.com/powershell/textutility'
94
100
PackageName : ' Microsoft.PowerShell.TextUtility'
95
101
PackageVersion : $(PackageVersion)
96
102
97
103
- pwsh : |
98
- New-Item -Path $(Build.SourcesDirectory)/out/ SignedZip -ItemType Directory -ErrorAction Ignore
99
- Compress-Archive -Path $(Build.SourcesDirectory)/Microsoft.PowerShell.TextUtility -DestinationPath $(Build.SourcesDirectory)/out /SignedZip/Microsoft.PowerShell.TextUtility.zip -Force
104
+ New-Item -Path $(Build.SourcesDirectory)/SignedZip -ItemType Directory -ErrorAction Ignore
105
+ Compress-Archive -Path $(Build.SourcesDirectory)/signed/ Microsoft.PowerShell.TextUtility -DestinationPath $(Build.SourcesDirectory)/SignedZip/Microsoft.PowerShell.TextUtility.zip -Force
100
106
displayName: 'Compress archive'
101
107
condition: succeededOrFailed()
102
108
103
109
- task : PublishPipelineArtifact@1
104
110
inputs :
105
- targetpath : $(Build.SourcesDirectory)/out /Microsoft.PowerShell.TextUtility
111
+ targetpath : $(Build.SourcesDirectory)/signed /Microsoft.PowerShell.TextUtility
106
112
artifactName : Signed
107
113
108
114
- task : PublishPipelineArtifact@1
109
115
inputs :
110
- targetpath : $(Build.SourcesDirectory)/out/ SignedZip
116
+ targetpath : $(Build.SourcesDirectory)/SignedZip
111
117
artifactName : SignedZip
112
118
113
119
- stage : compliance
114
120
displayName : Compliance
115
- dependsOn : Build
121
+ dependsOn : BuildAndSign
116
122
jobs :
117
123
- job : Compliance_Job
118
124
pool :
0 commit comments