@@ -12,23 +12,23 @@ jobs:
12
12
- input : pipelineArtifact
13
13
pipeline : core-tools-host
14
14
artifactName : drop-coretools-host-linux-signed
15
- targetPath : $(Pipeline.Workspace)/ core-tools-host
15
+ targetPath : $(Pipeline.Workspace)\ core-tools-host
16
16
- input : pipelineArtifact
17
17
pipeline : core-tools-host
18
18
artifactName : drop-coretools-host-windows
19
- targetPath : $(Pipeline.Workspace)/ core-tools-host
19
+ targetPath : $(Pipeline.Workspace)\ core-tools-host
20
20
- input : pipelineArtifact
21
21
pipeline : core-tools-inproc
22
22
artifactName : drop-inproc6
23
- targetPath : $(Pipeline.Workspace)/ core-tools-inproc
23
+ targetPath : $(Pipeline.Workspace)\ core-tools-inproc
24
24
- input : pipelineArtifact
25
25
pipeline : core-tools-inproc
26
26
artifactName : drop-inproc8
27
- targetPath : $(Pipeline.Workspace)/ core-tools-inproc
27
+ targetPath : $(Pipeline.Workspace)\ core-tools-inproc
28
28
- input : pipelineArtifact
29
29
pipeline : core-tools-default
30
30
artifactName : drop
31
- targetPath : $(Pipeline.Workspace)/ core-tools-default
31
+ targetPath : $(Pipeline.Workspace)\ core-tools-default
32
32
33
33
outputs :
34
34
- output : pipelineArtifact
@@ -43,106 +43,57 @@ jobs:
43
43
44
44
steps :
45
45
- checkout : self
46
-
47
- - task : DotNetCoreCLI@2
48
- displayName : " Run ArtifactAssembler"
49
- inputs :
50
- command : run
51
- projects : " $(Build.SourcesDirectory)/src/Azure.Functions.ArtifactAssembler/Azure.Functions.ArtifactAssembler.csproj"
52
- arguments : ' -c release "Azure.Functions.Cli.${{ parameters.arch }}"'
53
- workingDirectory : ' $(Pipeline.Workspace)'
46
+
47
+ - pwsh : |
48
+ Write-Host "Recursively listing all files in Pipeline.Workspace..."
54
49
55
- - task : PowerShell@2
56
- displayName : ' Generate metadata.json file'
57
- inputs :
58
- targetType : filePath
59
- filePath : ' $(Build.SourcesDirectory)/src/Azure.Functions.ArtifactAssembler/PipelineHelpers/generateMetadataFile.ps1'
60
- arguments : ' -StagingDirectory "$(Pipeline.Workspace)\staging"'
61
- workingDirectory : ' $(Pipeline.Workspace)'
62
- condition : and(succeeded(), eq('${{ parameters.arch }}', 'min.win-x64'))
50
+ $workspacePath = $env:PIPELINE_WORKSPACE
51
+ if (-not $workspacePath) {
52
+ $workspacePath = "$(Pipeline.Workspace)"
53
+ }
63
54
64
- - task : PowerShell@2
65
- displayName : ' Generate MSI files'
66
- inputs :
67
- targetType : filePath
68
- filePath : ' $(Build.SourcesDirectory)/src/Azure.Functions.ArtifactAssembler/PipelineHelpers/generateMsiFiles.ps1'
69
- arguments : ' -ArtifactsPath "$(Pipeline.Workspace)\staging\coretools-cli"'
70
- workingDirectory : ' $(Build.SourcesDirectory)/src/Azure.Functions.ArtifactAssembler'
71
- condition : and(succeeded(), startsWith('${{ parameters.arch }}', 'win'))
55
+ Write-Host "Pipeline Workspace path: $workspacePath"
72
56
73
- - task : EsrpCodeSigning@5
74
- displayName : ' ESRP CodeSigning'
75
- inputs :
76
- ConnectedServiceName : ' azfunc-internal-esrp'
77
- AppRegistrationClientId : ' a31bf239-3e15-498e-a335-f6ec0c9d9ccf'
78
- AppRegistrationTenantId : ' 72f988bf-86f1-41af-91ab-2d7cd011db47'
79
- AuthAKVName : ' kv-azfunc-esrp'
80
- AuthCertName : ' azfunc-internal-esrp-auth'
81
- AuthSignCertName : ' azfunc-internal-esrp-sign'
82
- FolderPath : ' $(Pipeline.Workspace)\staging\coretools-cli'
83
- Pattern : ' *.msi'
84
- signConfigType : inlineSignParams
85
- inlineOperation : |
86
- [
87
- {
88
- "KeyCode": "CP-230012",
89
- "OperationCode": "SigntoolSign",
90
- "Parameters": {
91
- "OpusName": "Microsoft",
92
- "OpusInfo": "http://www.microsoft.com",
93
- "FileDigest": "/fd \"SHA256\"",
94
- "PageHash": "/NPH",
95
- "TimeStamp": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
96
- },
97
- "ToolName": "sign",
98
- "ToolVersion": "1.0"
99
- },
100
- {
101
- "KeyCode": "CP-230012",
102
- "OperationCode": "SigntoolVerify",
103
- "Parameters": {},
104
- "ToolName": "sign",
105
- "ToolVersion": "1.0"
106
- }
107
- ]
108
- VerboseLogin : true
109
- condition : and(succeeded(), startsWith('${{ parameters.arch }}', 'win'))
110
-
111
- - task : PowerShell@2
112
- displayName : ' Test Artifacts - Visual Studio'
113
- inputs :
114
- targetType : filePath
115
- filePath : ' $(Build.SourcesDirectory)/src/Azure.Functions.ArtifactAssembler/PipelineHelpers/testVsArtifacts.ps1'
116
- arguments : ' -StagingDirectory "$(Pipeline.Workspace)\staging\coretools-visualstudio"'
117
- workingDirectory : ' $(Build.SourcesDirectory)/src/Azure.Functions.ArtifactAssembler'
118
- condition : and(succeeded(), eq('${{ parameters.arch }}', 'min.win-x64'))
57
+ function Show-RecursiveContents {
58
+ param (
59
+ [string]$Path,
60
+ [int]$Depth = 0
61
+ )
119
62
120
- - task : PowerShell@2
121
- displayName : ' Test Artifacts'
122
- inputs :
123
- targetType : filePath
124
- filePath : ' $(Build.SourcesDirectory)/src/Azure.Functions.ArtifactAssembler/PipelineHelpers/testArtifacts.ps1'
125
- arguments : ' -StagingDirectory "$(Pipeline.Workspace)\staging\coretools-cli"'
126
- workingDirectory : ' $(Build.SourcesDirectory)/src/Azure.Functions.ArtifactAssembler'
127
- condition : and(succeeded(), startsWith('${{ parameters.arch }}', 'win'))
63
+ $indent = " " * $Depth
64
+
65
+ try {
66
+ $items = Get-ChildItem -Path $Path -ErrorAction Stop
67
+
68
+ foreach ($item in $items) {
69
+ if ($item.PSIsContainer) {
70
+ # Directory
71
+ Write-Host "$indent$($item.FullName) [DIR]"
72
+ Show-RecursiveContents -Path $item.FullName -Depth ($Depth + 1)
73
+ } else {
74
+ # File
75
+ $sizeKB = [math]::Round($item.Length / 1KB, 2)
76
+ Write-Host "$indent$($item.FullName) ($sizeKB KB)"
77
+ }
78
+ }
79
+ } catch {
80
+ Write-Host "$indentError accessing $Path : $($_.Exception.Message)"
81
+ }
82
+ }
128
83
84
+ Show-RecursiveContents -Path $workspacePath
85
+ displayName: 'List Pipeline Workspace Contents'
86
+
129
87
- task : DotNetCoreCLI@2
130
- displayName : ' Zip Artifacts '
88
+ displayName : " Run ArtifactAssembler "
131
89
inputs :
132
90
command : run
133
- projects : ' $(Build.SourcesDirectory)/src/Azure.Functions.ArtifactAssembler/Azure.Functions.ArtifactAssembler.csproj'
134
- arguments : ' zip -c release'
91
+ projects : " $(Build.SourcesDirectory)/src/Azure.Functions.ArtifactAssembler/Azure.Functions.ArtifactAssembler.csproj"
92
+ arguments : ' -c release "Azure.Functions.Cli.${{ parameters.arch }}" '
135
93
workingDirectory : ' $(Pipeline.Workspace)'
136
94
137
95
- task : PowerShell@2
138
- displayName : ' Generate SHA files '
96
+ displayName : ' Generate metadata.json file '
139
97
inputs :
140
98
targetType : filePath
141
- filePath : ' $(Build.SourcesDirectory)/src/Azure.Functions.ArtifactAssembler/PipelineHelpers/generateSha.ps1'
142
-
143
- - task : CopyFiles@2
144
- displayName : ' Copy Files to Artifact Staging Directory'
145
- inputs :
146
- SourceFolder : ' $(Pipeline.Workspace)/staging'
147
- Contents : ' coretools-*/**'
148
- TargetFolder : ' $(Build.ArtifactStagingDirectory)'
99
+ filePath : ' $(Build.SourcesDir
0 commit comments