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

Trigger a test pipeline from the onebranch pipelines #2054

Merged
merged 15 commits into from
Oct 6, 2021
34 changes: 24 additions & 10 deletions .azure/OneBranch.Official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ extends:
suppressionFile: $(Build.SourcesDirectory)\.azure\openssl.gdnsuppress

stages:
- stage: build_windows
displayName: Build Windows
- stage: build_winkernel
displayName: Build Windows Kernel
dependsOn: []
jobs:
- template: .azure/obtemplates/build-winkernel.yml@self
Expand All @@ -71,6 +71,10 @@ extends:
parameters:
config: Debug

- stage: build_windows
displayName: Build Windows
dependsOn: []
jobs:
- template: .azure/obtemplates/build-winuser.yml@self
parameters:
config: Release
Expand All @@ -89,27 +93,31 @@ extends:
config: Debug
tls: openssl

- stage: build_uwp
displayName: Build Windows UWP
dependsOn: []
jobs:
- template: .azure/obtemplates/build-winuser.yml@self
parameters:
config: Release
tls: schannel
platform: UWP
platform: uwp
- template: .azure/obtemplates/build-winuser.yml@self
parameters:
config: Debug
tls: schannel
platform: UWP
platform: uwp

- template: .azure/obtemplates/build-winuser.yml@self
parameters:
config: Release
tls: openssl
platform: UWP
platform: uwp
- template: .azure/obtemplates/build-winuser.yml@self
parameters:
config: Debug
tls: openssl
platform: UWP
platform: uwp

- stage: build_linux
displayName: Build Linux
Expand All @@ -122,11 +130,17 @@ extends:
parameters:
config: Debug

- stage: package
displayName: Package
- stage: package_linux
displayName: Package Linux
dependsOn:
- build_windows
- build_linux
jobs:
- template: .azure/obtemplates/build-distribution.yml@self
- template: .azure/obtemplates/build-linux-packages.yml@self

- stage: package_windows
displayName: Package Windows
dependsOn:
- build_windows
- build_uwp
jobs:
- template: .azure/obtemplates/build-nuget.yml@self
34 changes: 24 additions & 10 deletions .azure/OneBranch.PullRequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ extends:
suppressionFile: $(Build.SourcesDirectory)\.azure\openssl.gdnsuppress

stages:
- stage: build_windows
displayName: Build Windows
- stage: build_winkernel
displayName: Build Windows Kernel
dependsOn: []
jobs:
- template: .azure/obtemplates/build-winkernel.yml@self
Expand All @@ -69,6 +69,10 @@ extends:
parameters:
config: Debug

- stage: build_windows
displayName: Build Windows
dependsOn: []
jobs:
- template: .azure/obtemplates/build-winuser.yml@self
parameters:
config: Release
Expand All @@ -87,27 +91,31 @@ extends:
config: Debug
tls: openssl

- stage: build_uwp
displayName: Build Windows UWP
dependsOn: []
jobs:
- template: .azure/obtemplates/build-winuser.yml@self
parameters:
config: Release
tls: schannel
platform: UWP
platform: uwp
- template: .azure/obtemplates/build-winuser.yml@self
parameters:
config: Debug
tls: schannel
platform: UWP
platform: uwp

- template: .azure/obtemplates/build-winuser.yml@self
parameters:
config: Release
tls: openssl
platform: UWP
platform: uwp
- template: .azure/obtemplates/build-winuser.yml@self
parameters:
config: Debug
tls: openssl
platform: UWP
platform: uwp

- stage: build_linux
displayName: Build Linux
Expand All @@ -120,11 +128,17 @@ extends:
parameters:
config: Debug

- stage: package
displayName: Package
- stage: package_linux
displayName: Package Linux
dependsOn:
- build_windows
- build_linux
jobs:
- template: .azure/obtemplates/build-distribution.yml@self
- template: .azure/obtemplates/build-linux-packages.yml@self

- stage: package_windows
displayName: Package Windows
dependsOn:
- build_windows
- build_uwp
jobs:
- template: .azure/obtemplates/build-nuget.yml@self
15 changes: 15 additions & 0 deletions .azure/OneBranch.Tests.Official.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
trigger: none # https://aka.ms/obpipelines/triggers

resources:
pipelines:
- pipeline: onebranch # Name of the pipeline resource
source: msquic-Official # Name of the pipeline referenced by the pipeline resource
trigger: true

name: 0.$(Date:yyyy).$(Date:MM).$(DayOfMonth).$(Rev:rr).0

stages:
- stage: package
displayName: Package
jobs:
- template: ./obtemplates/build-distribution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,5 @@ name: 0.$(Date:yyyy).$(Date:MM).$(DayOfMonth).$(Rev:rr).0
stages:
- stage: package
displayName: Package
dependsOn:
- build
jobs:
- template: ./obtemplates/build-distribution.yml
128 changes: 79 additions & 49 deletions .azure/obtemplates/build-distribution.yml
Original file line number Diff line number Diff line change
@@ -1,66 +1,96 @@
jobs:
- job: distribution
displayName: Distribution
pool:
type: windows
variables:
ob_outputDirectory: $(Build.SourcesDirectory)\artifacts\dist
- name: runCodesignValidationInjection
value: false
- name: skipComponentGovernanceDetection
value: true
workspace:
clean: all

pool:
vmImage: ubuntu-latest

steps:
- checkout: self
- task: DownloadPipelineArtifact@2
inputs:
# Leaving this, as I know this works and it wasn't well documented
# source: specific
# project: $(resources.pipeline.onebranch.projectID)
# pipeline: $(resources.pipeline.onebranch.pipelineID)
# preferTriggeringPipeline: true
# runVersion: specific
# runId: $(resources.pipeline.onebranch.runID)
artifact: drop_build_windows_build_windows_schannel_Release
path: $(Build.SourcesDirectory)\artifacts\bin\windows
- task: DownloadPipelineArtifact@2
inputs:
artifact: drop_build_windows_build_windows_openssl_Release
path: $(Build.SourcesDirectory)\artifacts\bin\windows
- template: ./download-artifacts.yml
parameters:
platform: linux
config: Release
tls: openssl
- template: ./download-artifacts.yml
parameters:
platform: linux
config: Debug
tls: openssl

- task: DownloadPipelineArtifact@2
inputs:
artifact: drop_build_windows_build_windows_schannel_Debug
path: $(Build.SourcesDirectory)\artifacts\bin\windows
- task: DownloadPipelineArtifact@2
inputs:
artifact: drop_build_windows_build_windows_openssl_Debug
path: $(Build.SourcesDirectory)\artifacts\bin\windows
- template: ./download-artifacts.yml
parameters:
platform: windows
config: Release
tls: openssl
- template: ./download-artifacts.yml
parameters:
platform: windows
config: Debug
tls: openssl

- task: DownloadPipelineArtifact@2
inputs:
artifact: drop_build_windows_build_UWP_schannel_Release
path: $(Build.SourcesDirectory)\artifacts\bin\uwp
- task: DownloadPipelineArtifact@2
inputs:
artifact: drop_build_windows_build_UWP_openssl_Release
path: $(Build.SourcesDirectory)\artifacts\bin\uwp
- template: ./download-artifacts.yml
parameters:
platform: windows
config: Release
tls: schannel
- template: ./download-artifacts.yml
parameters:
platform: windows
config: Debug
tls: schannel

- task: DownloadPipelineArtifact@2
inputs:
artifact: drop_build_windows_build_UWP_schannel_Debug
path: $(Build.SourcesDirectory)\artifacts\bin\uwp
- task: DownloadPipelineArtifact@2
inputs:
artifact: drop_build_windows_build_UWP_openssl_Debug
path: $(Build.SourcesDirectory)\artifacts\bin\uwp
- template: ./download-artifacts.yml
parameters:
platform: uwp
config: Release
tls: openssl
- template: ./download-artifacts.yml
parameters:
platform: uwp
config: Debug
tls: openssl

- task: DownloadPipelineArtifact@2
inputs:
artifact: drop_build_linux_build_linux_openssl_Debug
path: $(Build.SourcesDirectory)\artifacts\bin\linux
- task: DownloadPipelineArtifact@2
- template: ./download-artifacts.yml
parameters:
platform: uwp
config: Release
tls: schannel
- template: ./download-artifacts.yml
parameters:
platform: uwp
config: Debug
tls: schannel

- task: PowerShell@2
displayName: Prepare Build Machine
inputs:
artifact: drop_build_linux_build_linux_openssl_Release
path: $(Build.SourcesDirectory)\artifacts\bin\linux
pwsh: true
filePath: scripts/prepare-machine.ps1
arguments: -Configuration Build

- task: PowerShell@2
displayName: Distribution
inputs:
pwsh: false
filePath: scripts/package-distribution.ps1

- task: CopyFiles@2
displayName: Move Distribution
inputs:
sourceFolder: artifacts/dist
targetFolder: $(Build.ArtifactStagingDirectory)

- task: PublishBuildArtifacts@1
displayName: Upload Distribution
inputs:
artifactName: distribution
pathToPublish: $(Build.ArtifactStagingDirectory)
parallel: true
29 changes: 29 additions & 0 deletions .azure/obtemplates/build-linux-packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
jobs:
- job: distribution
displayName: Distribution
pool:
type: linux
variables:
ob_outputDirectory: $(Build.SourcesDirectory)/msquic/artifacts/dist
steps:
- checkout: self
- task: PowerShell@2
displayName: Prepare Build Machine
inputs:
pwsh: true
filePath: msquic/scripts/prepare-machine.ps1
arguments: -Configuration OneBranchPackage
- task: DownloadPipelineArtifact@2
inputs:
artifact: drop_build_linux_build_linux_openssl_Debug
path: $(Build.SourcesDirectory)/msquic/artifacts/bin/linux
- task: DownloadPipelineArtifact@2
inputs:
artifact: drop_build_linux_build_linux_openssl_Release
path: $(Build.SourcesDirectory)/msquic/artifacts/bin/linux

- task: PowerShell@2
displayName: Distribution
inputs:
pwsh: false
filePath: msquic/scripts/package-distribution.ps1
8 changes: 4 additions & 4 deletions .azure/obtemplates/build-nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,20 @@ jobs:

- task: DownloadPipelineArtifact@2
inputs:
artifact: drop_build_windows_build_UWP_schannel_Release
artifact: drop_build_uwp_build_uwp_schannel_Release
path: $(Build.SourcesDirectory)\artifacts\bin\uwp
- task: DownloadPipelineArtifact@2
inputs:
artifact: drop_build_windows_build_UWP_openssl_Release
artifact: drop_build_uwp_build_uwp_openssl_Release
path: $(Build.SourcesDirectory)\artifacts\bin\uwp

- task: DownloadPipelineArtifact@2
inputs:
artifact: drop_build_windows_build_UWP_schannel_Debug
artifact: drop_build_uwp_build_uwp_schannel_Debug
path: $(Build.SourcesDirectory)\artifacts\bin\uwp
- task: DownloadPipelineArtifact@2
inputs:
artifact: drop_build_windows_build_UWP_openssl_Debug
artifact: drop_build_uwp_build_uwp_openssl_Debug
path: $(Build.SourcesDirectory)\artifacts\bin\uwp

- task: PowerShell@2
Expand Down
Loading