Skip to content

Commit 3590901

Browse files
committed
trying to print out conetnt
1 parent 8eb1a1c commit 3590901

File tree

1 file changed

+46
-95
lines changed

1 file changed

+46
-95
lines changed

Diff for: eng/ci/templates/official/jobs/assemble-artifacts.yml

+46-95
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,23 @@ jobs:
1212
- input: pipelineArtifact
1313
pipeline: core-tools-host
1414
artifactName: drop-coretools-host-linux-signed
15-
targetPath: $(Pipeline.Workspace)/core-tools-host
15+
targetPath: $(Pipeline.Workspace)\core-tools-host
1616
- input: pipelineArtifact
1717
pipeline: core-tools-host
1818
artifactName: drop-coretools-host-windows
19-
targetPath: $(Pipeline.Workspace)/core-tools-host
19+
targetPath: $(Pipeline.Workspace)\core-tools-host
2020
- input: pipelineArtifact
2121
pipeline: core-tools-inproc
2222
artifactName: drop-inproc6
23-
targetPath: $(Pipeline.Workspace)/core-tools-inproc
23+
targetPath: $(Pipeline.Workspace)\core-tools-inproc
2424
- input: pipelineArtifact
2525
pipeline: core-tools-inproc
2626
artifactName: drop-inproc8
27-
targetPath: $(Pipeline.Workspace)/core-tools-inproc
27+
targetPath: $(Pipeline.Workspace)\core-tools-inproc
2828
- input: pipelineArtifact
2929
pipeline: core-tools-default
3030
artifactName: drop
31-
targetPath: $(Pipeline.Workspace)/core-tools-default
31+
targetPath: $(Pipeline.Workspace)\core-tools-default
3232

3333
outputs:
3434
- output: pipelineArtifact
@@ -43,106 +43,57 @@ jobs:
4343

4444
steps:
4545
- 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..."
5449
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+
}
6354
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"
7256
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+
)
11962
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+
}
12883
84+
Show-RecursiveContents -Path $workspacePath
85+
displayName: 'List Pipeline Workspace Contents'
86+
12987
- task: DotNetCoreCLI@2
130-
displayName: 'Zip Artifacts'
88+
displayName: "Run ArtifactAssembler"
13189
inputs:
13290
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 }}"'
13593
workingDirectory: '$(Pipeline.Workspace)'
13694

13795
- task: PowerShell@2
138-
displayName: 'Generate SHA files'
96+
displayName: 'Generate metadata.json file'
13997
inputs:
14098
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

Comments
 (0)