Skip to content

Commit

Permalink
addressing comments and initial changes for generating artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
aishwaryabh committed Nov 7, 2024
1 parent 48490a7 commit a4ddd76
Show file tree
Hide file tree
Showing 3 changed files with 170 additions and 103 deletions.
183 changes: 116 additions & 67 deletions eng/ci/templates/official/jobs/build-core-tools-host.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,89 +35,138 @@ jobs:
arguments: -c Release -r win-arm64 -o $(Build.SourcesDirectory)/pkg_output/windows/win-arm64 --self-contained
workingDirectory: $(Build.SourcesDirectory)/host/src/CoreToolsHost

- template: ci/sign-files.yml@eng
parameters:
displayName: 'Authenticode signing (dll) (win-arm64)'
folderPath: '$(Build.SourcesDirectory)/pkg_output/windows/win-arm64'
pattern: '*.dll, *.exe'
signType: inline
inlineOperation: |
[
{
"KeyCode": "CP-230012",
"OperationCode": "SigntoolSign",
"Parameters": {
"OpusName": "Microsoft",
"OpusInfo": "http://www.microsoft.com",
"FileDigest": "/fd \"SHA256\"",
"PageHash": "/NPH",
"TimeStamp": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
},
"ToolName": "sign",
"ToolVersion": "1.0"
},
{
"KeyCode": "CP-230012",
"OperationCode": "SigntoolVerify",
"Parameters": {},
"ToolName": "sign",
"ToolVersion": "1.0"
}
]
- template: ci/sign-files.yml@eng
parameters:
displayName: 'Authenticode signing (dll) (win-x64)'
folderPath: '$(Build.SourcesDirectory)/pkg_output/windows/win-x64'
pattern: '*.dll, *.exe'
signType: inline
inlineOperation: |
[
{
"KeyCode": "CP-230012",
"OperationCode": "SigntoolSign",
"Parameters": {
"OpusName": "Microsoft",
"OpusInfo": "http://www.microsoft.com",
"FileDigest": "/fd \"SHA256\"",
"PageHash": "/NPH",
"TimeStamp": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
},
"ToolName": "sign",
"ToolVersion": "1.0"
},
{
"KeyCode": "CP-230012",
"OperationCode": "SigntoolVerify",
"Parameters": {},
"ToolName": "sign",
"ToolVersion": "1.0"
}
]
- task: CopyFiles@2
displayName: Copy files (win-x64)
inputs:
SourceFolder: $(Build.SourcesDirectory)/pkg_output/windows/win-x64
# Publish output will include many other files. We only need func.exe & nethost.dll
# Publish output will include many other files. We only need func & nethost.dll
Contents: |
func.exe
nethost.dll
TargetFolder: $(Build.ArtifactStagingDirectory)/_coreToolsHostPackagesWindows/win-x64
TargetFolder: $(Build.ArtifactStagingDirectory)/_coreToolsHostPackages/win-x64

- task: CopyFiles@2
displayName: Copy files (win-arm64)
inputs:
SourceFolder: $(Build.SourcesDirectory)/pkg_output/windows/win-arm64
# Publish output will include many other files. We only need func.exe & nethost.dll
# Publish output will include many other files. We only need func & nethost.dll
Contents: |
func.exe
nethost.dll
TargetFolder: $(Build.ArtifactStagingDirectory)/_coreToolsHostPackagesWindows/win-arm64

TargetFolder: $(Build.ArtifactStagingDirectory)/_coreToolsHostPackages/win-arm64

templateContext:
outputParentDirectory: $(Build.ArtifactStagingDirectory)
outputs:
- output: pipelineArtifact
path: $(Build.ArtifactStagingDirectory)/_coreToolsHostPackages
artifact: drop-coretools-host-windows

- job: BuildCoreToolsHostLinux
displayName: '[Linux] Build CoreToolsHost'
pool:
name: 1es-pool-azfunc
image: 1es-ubuntu-22.04
os: linux

steps:
- task: UseDotNet@2
inputs:
version: 9.x
includePreviewVersions: true
displayName: Install .NET 9
- task: UseDotNet@2
inputs:
version: 6.x
displayName: Install .NET 6

- task: DotnetCoreCLI@2
displayName: Dotnet Publish (linux-x64)
inputs:
command: publish
publishWebProjects: false
zipAfterPublish: false
arguments: -c Release -r linux-x64 -o $(Build.SourcesDirectory)/pkg_output/linux/linux-x64 --self-contained
workingDirectory: $(Build.SourcesDirectory)/host/src/CoreToolsHost

- task: CopyFiles@2
displayName: Copy files (linux-x64)
inputs:
SourceFolder: $(Build.SourcesDirectory)/pkg_output/linux/linux-x64
# Publish output will include many other files. We only need func & nethost.dll
Contents: |
func
libnethost.so
TargetFolder: $(Build.ArtifactStagingDirectory)/_coreToolsHostPackages/linux-x64

templateContext:
outputParentDirectory: $(Build.ArtifactStagingDirectory)
outputs:
- output: pipelineArtifact
path: $(Build.ArtifactStagingDirectory)/_coreToolsHostPackages
artifact: drop-coretools-host-linux

- job: BuildCoreToolsHostMac
displayName: '[Mac] Build CoreToolsHost'
pool:
name: Azure Pipelines
image: 'macOS-latest'
os: macOS

steps:
- task: UseDotNet@2
inputs:
version: 9.x
includePreviewVersions: true
displayName: Install .NET 9
- task: UseDotNet@2
inputs:
version: 6.x
displayName: Install .NET 6

- task: DotnetCoreCLI@2
displayName: Dotnet Publish (osx-x64)
inputs:
command: publish
publishWebProjects: false
zipAfterPublish: false
arguments: -c Release -r osx-x64 -o $(Build.SourcesDirectory)/pkg_output/osx/osx-x64 --self-contained
workingDirectory: $(Build.SourcesDirectory)/host/src/CoreToolsHost

- task: DotnetCoreCLI@2
displayName: Dotnet Publish (osx-arm64)
inputs:
command: publish
publishWebProjects: false
zipAfterPublish: false
arguments: -c Release -r osx-arm64 -o $(Build.SourcesDirectory)/pkg_output/osx/osx-arm64 --self-contained
workingDirectory: $(Build.SourcesDirectory)/host/src/CoreToolsHost

- task: CopyFiles@2
displayName: Copy files (osx-x64)
inputs:
SourceFolder: $(Build.SourcesDirectory)/pkg_output/osx/osx-x64
# Publish output will include many other files. We only need func & nethost.dll
Contents: |
func
libnethost.dylib
libnethost.a
TargetFolder: $(Build.ArtifactStagingDirectory)/_coreToolsHostPackages/osx-x64

- task: CopyFiles@2
displayName: Copy files (osx-arm64)
inputs:
SourceFolder: $(Build.SourcesDirectory)/pkg_output/osx/osx-arm64
# Publish output will include many other files. We only need func & nethost.dll
Contents: |
func
libnethost.dylib
libnethost.a
TargetFolder: $(Build.ArtifactStagingDirectory)/_coreToolsHostPackages/osx-arm64

templateContext:
outputParentDirectory: $(Build.ArtifactStagingDirectory)
outputs:
- output: pipelineArtifact
path: $(Build.ArtifactStagingDirectory)/_coreToolsHostPackagesWindows
artifact: drop-coretools-host-windows
path: $(Build.ArtifactStagingDirectory)/_coreToolsHostPackages
artifact: drop-coretools-host-mac
Loading

0 comments on commit a4ddd76

Please sign in to comment.