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

Automate Release Package Publication #5963

Merged
merged 47 commits into from
Jan 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
8c4f2e7
Enable Rust Coverage (#5616)
nimanch Oct 7, 2021
32b7151
Increase Coverage to 47
nimanch Oct 7, 2021
6ddbfdc
Merge branch 'Azure:release/1.2' into release/1.2
nimanch Oct 7, 2021
b82bd1e
Merge branch 'Azure:release/1.2' into release/1.2
nimanch Oct 11, 2021
5d7f815
Merge branch 'Azure:release/1.2' into release/1.2
nimanch Oct 19, 2021
3310042
Merge branch 'Azure:release/1.2' into release/1.2
nimanch Oct 22, 2021
223aaf1
Merge branch 'Azure:release/1.2' into release/1.2
nimanch Oct 23, 2021
32f7726
Merge branch 'Azure:release/1.2' into release/1.2
nimanch Oct 26, 2021
5524dcc
Merge branch 'Azure:release/1.2' into release/1.2
nimanch Nov 4, 2021
3261ddd
Merge branch 'Azure:release/1.2' into release/1.2
nimanch Nov 8, 2021
5be15e7
Merge branch 'Azure:release/1.2' into release/1.2
nimanch Nov 10, 2021
c2a67e0
Merge branch 'Azure:release/1.2' into release/1.2
nimanch Nov 16, 2021
6b9c995
Merge branch 'Azure:release/1.2' into release/1.2
nimanch Nov 19, 2021
8652fa2
Merge branch 'Azure:release/1.2' into release/1.2
nimanch Nov 30, 2021
acd3b96
Merge branch 'Azure:release/1.2' into release/1.2
nimanch Nov 30, 2021
fddd554
Merge branch 'Azure:release/1.2' into release/1.2
nimanch Dec 1, 2021
526d57c
Merge branch 'Azure:release/1.2' into release/1.2
nimanch Dec 6, 2021
4ea5810
Merge branch 'Azure:release/1.2' into release/1.2
nimanch Dec 8, 2021
657e7b8
Merge branch 'Azure:release/1.2' into release/1.2
nimanch Dec 8, 2021
a454372
Merge branch 'Azure:release/1.2' into release/1.2
nimanch Dec 10, 2021
33bdd0e
Merge branch 'Azure:release/1.2' into release/1.2
nimanch Jan 4, 2022
a753277
Add Script and YAML
nimanch Jan 5, 2022
6eb3597
Add Matrix
nimanch Jan 5, 2022
899365a
Debug Pipeline
nimanch Jan 5, 2022
a2656d1
Add Secret
nimanch Jan 6, 2022
7629a5c
Correct Name
nimanch Jan 6, 2022
14144e0
Remove Condition
nimanch Jan 6, 2022
c1c4081
Temp Commit
nimanch Jan 6, 2022
48b500a
Temp Commit
nimanch Jan 6, 2022
f07fe68
Clone Repo Client Repo
nimanch Jan 6, 2022
c7663af
Check for Python
nimanch Jan 6, 2022
227b4ae
MCR Check
nimanch Jan 6, 2022
5ad4f08
Add Docker Service Connection
nimanch Jan 6, 2022
de33a7a
Add Docker Service Connection
nimanch Jan 6, 2022
a6a6c37
Add Docker Service Connection
nimanch Jan 6, 2022
57b1b9e
Remove Interactive
nimanch Jan 7, 2022
0982c13
Use Docker Client
nimanch Jan 7, 2022
5e48d71
Add Approval Gate
nimanch Jan 7, 2022
a28ce6f
Pre final run
nimanch Jan 7, 2022
d1aa9df
Run to Make sure E2E Works
nimanch Jan 7, 2022
06c1efd
Add Description
nimanch Jan 7, 2022
2538131
Merge branch 'release/1.2' into personal/nimanch/automatepublish
nimanch Jan 7, 2022
41fdfa0
Use a different version
nimanch Jan 7, 2022
4930ad2
Merge branch 'personal/nimanch/automatepublish' of https://github.com…
nimanch Jan 7, 2022
9daf095
Fix Package Filter for arm64
nimanch Jan 7, 2022
667ef0e
Final Checks to Directory
nimanch Jan 7, 2022
7d47859
Cleanup and Commit
nimanch Jan 7, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
302 changes: 200 additions & 102 deletions builds/misc/packages-release.yaml
Original file line number Diff line number Diff line change
@@ -1,111 +1,209 @@
trigger: none
pr: none
jobs:

stages:
################################################################################
- job: linux
- stage: BuildPackages
################################################################################
displayName: Linux
displayName: Build Packages
pool:
name: $(pool.linux.name)
demands:
- ImageOverride -equals agent-aziotedge-ubuntu-18.04-docker
strategy:
matrix:
Centos75-amd64:
arch: amd64
os: centos7
target.iotedged: edgelet/target/rpmbuild/RPMS/x86_64
Debian9-amd64:
os: debian9
arch: amd64
target.iotedged: edgelet/target/release
Debian9-arm32v7:
os: debian9
arch: arm32v7
target.iotedged: edgelet/target/armv7-unknown-linux-gnueabihf/release
Debian9-aarch64:
os: debian9
arch: aarch64
target.iotedged: edgelet/target/aarch64-unknown-linux-gnu/release
name: $(pool.linux.name)
demands:
- ImageOverride -equals agent-aziotedge-ubuntu-18.04-docker
jobs:
- job: linux
displayName: Linux
strategy:
matrix:
Centos75-amd64:
arch: amd64
os: centos7
target.iotedged: edgelet/target/rpmbuild/RPMS/x86_64
Debian9-amd64:
os: debian9
arch: amd64
target.iotedged: edgelet/target/release
Debian9-arm32v7:
os: debian9
arch: arm32v7
target.iotedged: edgelet/target/armv7-unknown-linux-gnueabihf/release
Debian9-aarch64:
os: debian9
arch: aarch64
target.iotedged: edgelet/target/aarch64-unknown-linux-gnu/release

Debian10-amd64:
os: debian10
arch: amd64
target.iotedged: edgelet/target/release
Debian10-arm32v7:
os: debian10
arch: arm32v7
target.iotedged: edgelet/target/armv7-unknown-linux-gnueabihf/release
Debian10-aarch64:
os: debian10
arch: aarch64
target.iotedged: edgelet/target/aarch64-unknown-linux-gnu/release

Debian11-amd64:
os: debian11
arch: amd64
target.iotedged: edgelet/target/release
Debian11-arm32v7:
os: debian11
arch: arm32v7
target.iotedged: edgelet/target/armv7-unknown-linux-gnueabihf/release
Debian11-aarch64:
os: debian11
arch: aarch64
target.iotedged: edgelet/target/aarch64-unknown-linux-gnu/release

Ubuntu1804-amd64:
os: ubuntu18.04
arch: amd64
target.iotedged: edgelet/target/release
Ubuntu1804-arm32v7:
os: ubuntu18.04
arch: arm32v7
target.iotedged: edgelet/target/armv7-unknown-linux-gnueabihf/release
Ubuntu1804-aarch64:
os: ubuntu18.04
arch: aarch64
target.iotedged: edgelet/target/aarch64-unknown-linux-gnu/release

Ubuntu2004-amd64:
arch: amd64
os: ubuntu20.04
target.iotedged: edgelet/target/release
Ubuntu2004-arm32v7:
arch: arm32v7
os: ubuntu20.04
target.iotedged: edgelet/target/armv7-unknown-linux-gnueabihf/release
Ubuntu2004-aarch64:
arch: aarch64
os: ubuntu20.04
target.iotedged: edgelet/target/aarch64-unknown-linux-gnu/release
steps:
- bash: |
BASE_VERSION=`cat $BUILD_SOURCESDIRECTORY/edgelet/version.txt`
VERSION="$BASE_VERSION"
echo "##vso[task.setvariable variable=VERSION;]$VERSION"

Debian10-amd64:
os: debian10
arch: amd64
target.iotedged: edgelet/target/release
Debian10-arm32v7:
os: debian10
arch: arm32v7
target.iotedged: edgelet/target/armv7-unknown-linux-gnueabihf/release
Debian10-aarch64:
os: debian10
arch: aarch64
target.iotedged: edgelet/target/aarch64-unknown-linux-gnu/release
echo "##vso[task.setvariable variable=PACKAGE_ARCH;]$(arch)"
echo "##vso[task.setvariable variable=PACKAGE_OS;]$(os)"
displayName: Set Version
- script: edgelet/build/linux/package.sh
displayName: Create iotedged packages
- task: CopyFiles@2
displayName: Copy iotedged Files to Artifact Staging
inputs:
SourceFolder: $(target.iotedged)
Contents: |
*.deb
*.rpm
TargetFolder: '$(build.artifactstagingdirectory)'
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
displayName: 'SBOM Generation Task'
inputs:
BuildDropPath: '$(build.artifactstagingdirectory)'
- task: PublishBuildArtifacts@1
displayName: Publish Artifacts
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)'
ArtifactName: 'iotedged-$(os)-$(arch)'
condition: succeededOrFailed()

Debian11-amd64:
os: debian11
arch: amd64
target.iotedged: edgelet/target/release
Debian11-arm32v7:
os: debian11
arch: arm32v7
target.iotedged: edgelet/target/armv7-unknown-linux-gnueabihf/release
Debian11-aarch64:
os: debian11
arch: aarch64
target.iotedged: edgelet/target/aarch64-unknown-linux-gnu/release

Ubuntu1804-amd64:
os: ubuntu18.04
arch: amd64
target.iotedged: edgelet/target/release
Ubuntu1804-arm32v7:
os: ubuntu18.04
arch: arm32v7
target.iotedged: edgelet/target/armv7-unknown-linux-gnueabihf/release
Ubuntu1804-aarch64:
os: ubuntu18.04
arch: aarch64
target.iotedged: edgelet/target/aarch64-unknown-linux-gnu/release
################################################################################
- stage: PublishPackages
################################################################################
displayName: Publish Packages
dependsOn: [BuildPackages]
pool:
name: $(pool.linux.name)
demands:
- ImageOverride -equals agent-aziotedge-ubuntu-18.04-docker
jobs:
- deployment: safe_guard
environment: 'Azure-IoT-Edge-Core Release Env'
displayName: Get Approval
strategy:
runOnce:
deploy:
steps:
- bash: |
echo "Approval Complete"
- job: linux
displayName: Linux
strategy:
matrix:
Debian9-arm32v7:
os: debian9
artifactName: iotedged-debian9-arm32v7
identityServiceArtifactName: packages_debian-9-slim_arm32v7
identityServicePackageFilter: aziot-identity-service_*_armhf.deb
Ubuntu1804-amd64:
os: ubuntu18.04
artifactName: iotedged-ubuntu18.04-amd64
identityServiceArtifactName: packages_ubuntu-18.04_amd64
identityServicePackageFilter: aziot-identity-service_*_amd64.deb
Ubuntu1804-arm32v7:
os: ubuntu18.04
artifactName: iotedged-ubuntu18.04-arm32v7
identityServiceArtifactName: packages_ubuntu-18.04_arm32v7
identityServicePackageFilter: aziot-identity-service_*_armhf.deb
Ubuntu1804-aarch64:
os: ubuntu18.04
artifactName: iotedged-ubuntu18.04-aarch64
identityServiceArtifactName: packages_ubuntu-18.04_aarch64
identityServicePackageFilter: aziot-identity-service_*_arm64.deb
Ubuntu2004-amd64:
os: ubuntu20.04
artifactName: iotedged-ubuntu20.04-amd64
identityServiceArtifactName: packages_ubuntu-20.04_amd64
identityServicePackageFilter: aziot-identity-service_*_amd64.deb
Ubuntu2004-aarch64:
os: ubuntu20.04
artifactName: iotedged-ubuntu20.04-aarch64
identityServiceArtifactName: packages_ubuntu-20.04_aarch64
identityServicePackageFilter: aziot-identity-service_*_arm64.deb
steps:
- task: AzureKeyVault@1
displayName: Get secrets
inputs:
azureSubscription: $(az.subscription)
keyVaultName: $(kv.name)
secretsFilter: >-
GitHubAccessToken,
- task: DownloadPipelineArtifact@2
displayName: Download Pipeline Build Packages
inputs:
source: 'current'
path: $(System.ArtifactsDirectory)
patterns: $(artifactName)/*.deb
- task: PowerShell@2
displayName: 'Download aziot-identity-service'
inputs:
filePath: $(Build.SourcesDirectory)/scripts/local/test/DownloadIdentityService.ps1
workingDirectory: $(Build.SourcesDirectory)
env:
GITHUB_TOKEN: $(GitHubAccessToken)
ARTIFACT_NAME: $(identityServiceArtifactName)
PACKAGE_FILTER: $(identityServicePackageFilter)
DOWNLOAD_PATH: $(System.ArtifactsDirectory)/$(artifactName)
IDENTITY_SERVICE_COMMIT: $(aziotis.commit)
- task: Docker@2
displayName: Docker login msinternal
inputs:
command: login
containerRegistry: iotedge-msinternal-mcr
- task: AzureCLI@2
displayName: Publish Packages
inputs:
azureSubscription: $(az.subscription)
scriptType: bash
scriptPath: $(Build.SourcesDirectory)/scripts/linux/publishReleasePackages.sh
arguments: -p $(os) -w $(System.ArtifactsDirectory) -d $(System.ArtifactsDirectory)/$(artifactName) -s $(package-server-name)

Ubuntu2004-amd64:
arch: amd64
os: ubuntu20.04
target.iotedged: edgelet/target/release
Ubuntu2004-arm32v7:
arch: arm32v7
os: ubuntu20.04
target.iotedged: edgelet/target/armv7-unknown-linux-gnueabihf/release
Ubuntu2004-aarch64:
arch: aarch64
os: ubuntu20.04
target.iotedged: edgelet/target/aarch64-unknown-linux-gnu/release
steps:
- bash: |
BASE_VERSION=`cat $BUILD_SOURCESDIRECTORY/edgelet/version.txt`
VERSION="$BASE_VERSION"
echo "##vso[task.setvariable variable=VERSION;]$VERSION"



echo "##vso[task.setvariable variable=PACKAGE_ARCH;]$(arch)"
echo "##vso[task.setvariable variable=PACKAGE_OS;]$(os)"
displayName: Set Version
- script: edgelet/build/linux/package.sh
displayName: Create iotedged packages
- task: CopyFiles@2
displayName: Copy iotedged Files to Artifact Staging
inputs:
SourceFolder: $(target.iotedged)
Contents: |
*.deb
*.rpm
TargetFolder: '$(build.artifactstagingdirectory)'
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
displayName: 'SBOM Generation Task'
inputs:
BuildDropPath: '$(build.artifactstagingdirectory)'
- task: PublishBuildArtifacts@1
displayName: Publish Artifacts
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)'
ArtifactName: 'iotedged-$(os)-$(arch)'
condition: succeededOrFailed()

Loading