Skip to content

Commit

Permalink
Publish package to more distros and refactoring (#4455)
Browse files Browse the repository at this point in the history
* Publish package to more distros and refactoring

* fix?

* fix

* fix

* fix file dependencies

* fix

* fix

* fix

* fix
  • Loading branch information
ami-GS authored Aug 14, 2024
1 parent dd316f7 commit e58b384
Show file tree
Hide file tree
Showing 9 changed files with 195 additions and 184 deletions.
12 changes: 6 additions & 6 deletions .azure/OneBranch.Official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ extends:
- container: linux_build_container # Default container
image: 'ghcr.io/microsoft/msquic/linux-build-xcomp:ubuntu-20.04-cross'
type: Linux
- container: ubuntu_2204_cross
- container: kernel5_15_cross
image: 'ghcr.io/microsoft/msquic/linux-build-xcomp:ubuntu-22.04-cross'
type: Linux
- container: ubuntu_2404_cross
- container: kernel6_8_cross
image: 'ghcr.io/microsoft/msquic/linux-build-xcomp:ubuntu-24.04-cross'
type: Linux

Expand Down Expand Up @@ -179,23 +179,23 @@ extends:
- template: .azure/obtemplates/build-linux.yml@self
parameters:
config: Release
os: ubuntu_2204
kernel: "kernel5_15"
tls: openssl3
- template: .azure/obtemplates/build-linux.yml@self
parameters:
config: Debug
os: ubuntu_2204
kernel: "kernel5_15"
tls: openssl3
- template: .azure/obtemplates/build-linux.yml@self
parameters:
config: Release
os: ubuntu_2404
kernel: "kernel6_8"
tls: openssl3
xdp: "-UseXdp"
- template: .azure/obtemplates/build-linux.yml@self
parameters:
config: Debug
os: ubuntu_2404
kernel: "kernel6_8"
tls: openssl3
xdp: "-UseXdp"

Expand Down
183 changes: 94 additions & 89 deletions .azure/OneBranch.Publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,73 +15,78 @@ variables:
DisableDockerDetector: true

parameters:
- name: opensslrpmcblrepos
# build on ubuntu 20.04 openssl 1.1
- name: kernel5_4rpmcblrepos
type: object
default:
- cbl-mariner-1.0-prod-Microsoft-x86_64-rpms-yum
- cbl-mariner-2.0-prod-Microsoft-x86_64-yum
- cbl-mariner-2.0-prod-Microsoft-aarch64-yum
- name: opensslrpmrepos
- name: kernel5_4rpmrepos
type: object
default:
- microsoft-sles12-prod-yum
- microsoft-sles15-prod-yum
- microsoft-centos7-prod-yum
- microsoft-centos8-prod-yum
- microsoft-opensuse15-prod-yum
- microsoft-fedora32-prod-yum
- microsoft-fedora33-prod-yum
- microsoft-fedora34-prod-yum
- microsoft-fedora37-prod-yum
- microsoft-rhel7.3-prod-yum
- microsoft-rhel8.0-prod-yum
- microsoft-rhel8.1-prod-yum
- name: openssldebrepos
- microsoft-sles12-prod-yum # 12 3.12
- microsoft-sles15-prod-yum # 15 4.12
- microsoft-centos7-prod-yum # 7 3.10
- microsoft-centos8-prod-yum # 8 4.18
- microsoft-opensuse15-prod-yum # 15 4.12
- microsoft-fedora32-prod-yum # 32 5.6
- microsoft-fedora33-prod-yum # 33 5.8
- microsoft-fedora34-prod-yum # 34 5.11
- microsoft-fedora35-prod-yum # 35 5.14
- microsoft-rhel7.3-prod-yum # 7.3 3.10
- microsoft-rhel8.0-prod-yum # 8.0 4.18
- microsoft-rhel8.1-prod-yum # 8.1 4.18
- name: kernel5_4debrepos
type: object
default:
- microsoft-debian-stretch-prod-apt
- microsoft-debian-buster-prod-apt
- microsoft-debian-bullseye-prod-apt
- name: openssl3debrepos
- microsoft-ubuntu-xenial-prod-apt # 16.04 4.4
- microsoft-ubuntu-bionic-prod-apt # 18.04 4.15
- microsoft-ubuntu-focal-prod-apt # 20.04 5.4
- microsoft-ubuntu-groovy-prod-apt # 20.10 5.8
- microsoft-ubuntu-hirsute-prod-apt # 21.04 5.11
- microsoft-debian-stretch-prod-apt # 9 4.9
- microsoft-debian-buster-prod-apt # 10 4.19
- microsoft-debian-bullseye-prod-apt # 11 5.10

# built on ubuntu 22.04, openssl3
- name: kernel5_15rpmrepos
type: object
default:
- microsoft-debian-bookworm-prod-apt
- name: openssl3rpmrepos
- microsoft-fedora36-prod-yum # 36 5.17
- microsoft-fedora37-prod-yum # 37 6.0
- microsoft-fedora38-prod-yum # 38 6.2
- microsoft-fedora39-prod-yum # 39 6.5
- microsoft-rhel9.0-prod-yum # 9.0 5.14
- name: kernel5_15debrepos
type: object
default:
- microsoft-fedora36-prod-yum
- microsoft-fedora38-prod-yum
- microsoft-fedora39-prod-yum
- microsoft-rhel9.0-prod-yum
- name: debug # debug mode will not actually upload and publish packages
type: boolean
default: false
- name: ubuntu20repos
- microsoft-ubuntu-jammy-prod-apt # 22.04 5.15
- microsoft-ubuntu-kinetic-prod-apt # 22.10 5.19
- microsoft-ubuntu-lunar-prod-apt # 23.04 6.2
- microsoft-ubuntu-mantic-prod-apt # 23.10 6.5
- microsoft-debian-bookworm-prod-apt # 12 6.1

# built on ubuntu 24.04 openssl3 XDP
- name: kernel6_8cblrpmrepos
type: object
default:
- microsoft-ubuntu-xenial-prod-apt
- microsoft-ubuntu-bionic-prod-apt
- microsoft-ubuntu-focal-prod-apt
- microsoft-ubuntu-groovy-prod-apt
- microsoft-ubuntu-hirsute-prod-apt
- name: ubuntu22repos
- azurelinux-3.0-prod-ms-oss-x86_64-yum # 3.0 6.6
- name: kernel6_8rpmrepos
type: object
default:
- microsoft-ubuntu-jammy-prod-apt
- microsoft-ubuntu-kinetic-prod-apt
- microsoft-ubuntu-lunar-prod-apt
- microsoft-ubuntu-mantic-prod-apt
- name: ubuntu24repos
- microsoft-fedora40-prod-yum # 40 6.8
- name: kernel6_8debrepos
type: object
default:
- microsoft-ubuntu-noble-prod-apt
- microsoft-ubuntu-noble-prod-apt # 24.04 6.8

stages:
- stage: UploadPackage_stage
condition: or(startsWith(variables['Build.SourceBranch'], 'refs/tags/'), eq(variables['Build.Reason'], 'Manual'))
jobs:
- job: UploadPackage_openssl_debs
displayName: Upload openSSL based DEB packages to repos
- job: UploadPackage_kernel5_4_debs
displayName: Upload kernel5_4 based DEB packages to repos
timeoutInMinutes: 120
workspace:
clean: all
Expand All @@ -98,20 +103,20 @@ stages:
preferTriggeringPipeline: true
runVersion: specific
runId: $(resources.pipeline.onebranch.runID)
artifact: drop_package_linux_distribution_ubuntu_2004_openssl
path: $(Build.SourcesDirectory)/artifacts/signed/openssl
artifact: drop_package_linux_distribution_kernel5_4
path: $(Build.SourcesDirectory)/artifacts/signed/kernel5_4
- task: DownloadSecureFile@1
name: pmcv4cert
displayName: 'Download cert for PMC v4'
inputs:
secureFile: 'auth.pem'
- ${{ each repo in parameters.openssldebrepos }}:
- script: bash scripts/upload-linux-packages.sh -i $(PMCv4ClientId) -c $(pmcv4cert.secureFilePath) -f $(Build.SourcesDirectory)/artifacts/signed/openssl/gen -r ${{ repo }} -n "*.deb"
- ${{ each repo in parameters.kernel5_4debrepos }}:
- script: bash scripts/upload-linux-packages.sh -i $(PMCv4ClientId) -c $(pmcv4cert.secureFilePath) -f $(Build.SourcesDirectory)/artifacts/signed/kernel5_4/gen -r ${{ repo }} -n "*.deb"
condition: eq(${{ parameters.debug }}, false)
displayName: ${{ repo }}
continueOnError: true
- job: UploadPackage_openssl_rpms
displayName: Upload openSSL based RPM packages to repos
- job: UploadPackage_kernel5_4_rpms
displayName: Upload kernel5_4 based RPM packages to repos
timeoutInMinutes: 120
workspace:
clean: all
Expand All @@ -128,20 +133,20 @@ stages:
preferTriggeringPipeline: true
runVersion: specific
runId: $(resources.pipeline.onebranch.runID)
artifact: drop_package_linux_distribution_ubuntu_2004_openssl
path: $(Build.SourcesDirectory)/artifacts/signed/openssl
artifact: drop_package_linux_distribution_kernel5_4
path: $(Build.SourcesDirectory)/artifacts/signed/kernel5_4
- task: DownloadSecureFile@1
name: pmcv4cert
displayName: 'Download cert for PMC v4'
inputs:
secureFile: 'auth.pem'
- ${{ each repo in parameters.opensslrpmrepos }}:
- script: bash scripts/upload-linux-packages.sh -i $(PMCv4ClientId) -c $(pmcv4cert.secureFilePath) -f $(Build.SourcesDirectory)/artifacts/signed/openssl/gen -r ${{ repo }} -n "*.rpm"
- ${{ each repo in parameters.kernel5_4rpmrepos }}:
- script: bash scripts/upload-linux-packages.sh -i $(PMCv4ClientId) -c $(pmcv4cert.secureFilePath) -f $(Build.SourcesDirectory)/artifacts/signed/kernel5_4/gen -r ${{ repo }} -n "*.rpm"
condition: eq(${{ parameters.debug }}, false)
displayName: ${{ repo }}
continueOnError: true
- job: UploadPackage_openssl_rpms_cbl
displayName: Upload openSSL based RPM packages to CBL repos
- job: UploadPackage_kernel5_4_rpms_cbl
displayName: Upload kernel5_4 based RPM packages to CBL repos
timeoutInMinutes: 120
workspace:
clean: all
Expand All @@ -158,20 +163,20 @@ stages:
preferTriggeringPipeline: true
runVersion: specific
runId: $(resources.pipeline.onebranch.runID)
artifact: drop_package_linux_distribution_ubuntu_2004_openssl
path: $(Build.SourcesDirectory)/artifacts/signed/openssl
artifact: drop_package_linux_distribution_kernel5_4
path: $(Build.SourcesDirectory)/artifacts/signed/kernel5_4
- task: DownloadSecureFile@1
name: pmcv4cert
displayName: 'Download cert for PMC v4'
inputs:
secureFile: 'auth.pem'
- ${{ each repo in parameters.opensslrpmcblrepos }}:
- script: bash scripts/upload-linux-packages.sh -i $(PMCv4ClientId) -c $(pmcv4cert.secureFilePath) -f $(Build.SourcesDirectory)/artifacts/signed/openssl/cbl -r ${{ repo }} -n "*.rpm"
- ${{ each repo in parameters.kernel5_4rpmcblrepos }}:
- script: bash scripts/upload-linux-packages.sh -i $(PMCv4ClientId) -c $(pmcv4cert.secureFilePath) -f $(Build.SourcesDirectory)/artifacts/signed/kernel5_4/cbl -r ${{ repo }} -n "*.rpm"
condition: eq(${{ parameters.debug }}, false)
displayName: ${{ repo }}
continueOnError: true
- job: UploadPackage_openssl3_debs
displayName: Upload openSSL3 based DEB packages to repos
- job: UploadPackage_kernel6_8_rpms_cbl
displayName: Upload kernel6_8 based RPM packages to CBL repos
timeoutInMinutes: 120
workspace:
clean: all
Expand All @@ -188,20 +193,20 @@ stages:
preferTriggeringPipeline: true
runVersion: specific
runId: $(resources.pipeline.onebranch.runID)
artifact: drop_package_linux_distribution_ubuntu_2204_openssl3
path: $(Build.SourcesDirectory)/artifacts/signed/openssl3
artifact: drop_package_linux_distribution_kernel6_8
path: $(Build.SourcesDirectory)/artifacts/signed/kernel6_8
- task: DownloadSecureFile@1
name: pmcv4cert
displayName: 'Download cert for PMC v4'
inputs:
secureFile: 'auth.pem'
- ${{ each repo in parameters.openssl3debrepos }}:
- script: bash scripts/upload-linux-packages.sh -i $(PMCv4ClientId) -c $(pmcv4cert.secureFilePath) -f $(Build.SourcesDirectory)/artifacts/signed/openssl3/gen -r ${{ repo }} -n "*.deb"
- ${{ each repo in parameters.kernel6_8cblrpmrepos }}:
- script: bash scripts/upload-linux-packages.sh -i $(PMCv4ClientId) -c $(pmcv4cert.secureFilePath) -f $(Build.SourcesDirectory)/artifacts/signed/kernel6_8/cbl -r ${{ repo }} -n "*.rpm"
condition: eq(${{ parameters.debug }}, false)
displayName: ${{ repo }}
continueOnError: true
- job: UploadPackage_ubuntu20
displayName: Upload Ubuntu 20 packages to repos
- job: UploadPackage_kernel5_15_debs
displayName: Upload kernel5_15 based DEB packages to repos
timeoutInMinutes: 120
workspace:
clean: all
Expand All @@ -218,20 +223,20 @@ stages:
preferTriggeringPipeline: true
runVersion: specific
runId: $(resources.pipeline.onebranch.runID)
artifact: drop_package_linux_distribution_ubuntu_2004_openssl
path: $(Build.SourcesDirectory)/artifacts/signed/ubuntu_2004_openssl
artifact: drop_package_linux_distribution_kernel5_15
path: $(Build.SourcesDirectory)/artifacts/signed/kernel5_15
- task: DownloadSecureFile@1
name: pmcv4cert
displayName: 'Download cert for PMC v4'
inputs:
secureFile: 'auth.pem'
- ${{ each repo in parameters.ubuntu20repos }}:
- script: bash scripts/upload-linux-packages.sh -i $(PMCv4ClientId) -c $(pmcv4cert.secureFilePath) -f $(Build.SourcesDirectory)/artifacts/signed/ubuntu_2004_openssl/gen -r ${{ repo }} -n "*.deb"
- ${{ each repo in parameters.kernel5_15debrepos }}:
- script: bash scripts/upload-linux-packages.sh -i $(PMCv4ClientId) -c $(pmcv4cert.secureFilePath) -f $(Build.SourcesDirectory)/artifacts/signed/kernel5_15/gen -r ${{ repo }} -n "*.deb"
condition: eq(${{ parameters.debug }}, false)
displayName: ${{ repo }}
continueOnError: true
- job: UploadPackage_ubuntu22
displayName: Upload Ubuntu 22 packages to repos
- job: UploadPackage_kernel6_8_debs
displayName: Upload kernel6_8 based DEB packages to repos
timeoutInMinutes: 120
workspace:
clean: all
Expand All @@ -248,20 +253,20 @@ stages:
preferTriggeringPipeline: true
runVersion: specific
runId: $(resources.pipeline.onebranch.runID)
artifact: drop_package_linux_distribution_ubuntu_2204_openssl3
path: $(Build.SourcesDirectory)/artifacts/signed/ubuntu_2204_openssl3
artifact: drop_package_linux_distribution_kernel6_8
path: $(Build.SourcesDirectory)/artifacts/signed/kernel6_8
- task: DownloadSecureFile@1
name: pmcv4cert
displayName: 'Download cert for PMC v4'
inputs:
secureFile: 'auth.pem'
- ${{ each repo in parameters.ubuntu22repos }}:
- script: bash scripts/upload-linux-packages.sh -i $(PMCv4ClientId) -c $(pmcv4cert.secureFilePath) -f $(Build.SourcesDirectory)/artifacts/signed/ubuntu_2204_openssl3/gen -r ${{ repo }} -n "*.deb"
- ${{ each repo in parameters.kernel6_8debrepos }}:
- script: bash scripts/upload-linux-packages.sh -i $(PMCv4ClientId) -c $(pmcv4cert.secureFilePath) -f $(Build.SourcesDirectory)/artifacts/signed/kernel6_8/gen -r ${{ repo }} -n "*.deb"
condition: eq(${{ parameters.debug }}, false)
displayName: ${{ repo }}
continueOnError: true
- job: UploadPackage_ubuntu24
displayName: Upload Ubuntu 24 packages to repos
- job: UploadPackage_kernel5_15_rpms
displayName: Upload kernel5_15 based RPM packages to repos
timeoutInMinutes: 120
workspace:
clean: all
Expand All @@ -278,20 +283,20 @@ stages:
preferTriggeringPipeline: true
runVersion: specific
runId: $(resources.pipeline.onebranch.runID)
artifact: drop_package_linux_distribution_ubuntu_2404_openssl3
path: $(Build.SourcesDirectory)/artifacts/signed/ubuntu_2404_openssl3
artifact: drop_package_linux_distribution_kernel5_15
path: $(Build.SourcesDirectory)/artifacts/signed/kernel5_15
- task: DownloadSecureFile@1
name: pmcv4cert
displayName: 'Download cert for PMC v4'
inputs:
secureFile: 'auth.pem'
- ${{ each repo in parameters.ubuntu24repos }}:
- script: bash scripts/upload-linux-packages.sh -i $(PMCv4ClientId) -c $(pmcv4cert.secureFilePath) -f $(Build.SourcesDirectory)/artifacts/signed/ubuntu_2404_openssl3/gen -r ${{ repo }} -n "*.deb"
- ${{ each repo in parameters.kernel5_15rpmrepos }}:
- script: bash scripts/upload-linux-packages.sh -i $(PMCv4ClientId) -c $(pmcv4cert.secureFilePath) -f $(Build.SourcesDirectory)/artifacts/signed/kernel5_15/gen -r ${{ repo }} -n "*.rpm"
condition: eq(${{ parameters.debug }}, false)
displayName: ${{ repo }}
continueOnError: true
- job: UploadPackage_openssl3_rpms
displayName: Upload openSSL3 based RPM packages to repos
- job: UploadPackage_kernel6_8_rpms
displayName: Upload kernel6_8 based RPM packages to repos
timeoutInMinutes: 120
workspace:
clean: all
Expand All @@ -308,15 +313,15 @@ stages:
preferTriggeringPipeline: true
runVersion: specific
runId: $(resources.pipeline.onebranch.runID)
artifact: drop_package_linux_distribution_ubuntu_2204_openssl3
path: $(Build.SourcesDirectory)/artifacts/signed/openssl3
artifact: drop_package_linux_distribution_kernel6_8
path: $(Build.SourcesDirectory)/artifacts/signed/kernel6_8
- task: DownloadSecureFile@1
name: pmcv4cert
displayName: 'Download cert for PMC v4'
inputs:
secureFile: 'auth.pem'
- ${{ each repo in parameters.openssl3rpmrepos }}:
- script: bash scripts/upload-linux-packages.sh -i $(PMCv4ClientId) -c $(pmcv4cert.secureFilePath) -f $(Build.SourcesDirectory)/artifacts/signed/openssl3/gen -r ${{ repo }} -n "*.rpm"
- ${{ each repo in parameters.kernel6_8rpmrepos }}:
- script: bash scripts/upload-linux-packages.sh -i $(PMCv4ClientId) -c $(pmcv4cert.secureFilePath) -f $(Build.SourcesDirectory)/artifacts/signed/kernel6_8/gen -r ${{ repo }} -n "*.rpm"
condition: eq(${{ parameters.debug }}, false)
displayName: ${{ repo }}
continueOnError: true
Loading

0 comments on commit e58b384

Please sign in to comment.