@@ -574,7 +574,7 @@ jobs:
574574
575575 - job : TestHomebrewPackage
576576 displayName : Test Homebrew Package
577- timeoutInMinutes : 120
577+ timeoutInMinutes : 180
578578 dependsOn : BuildHomebrewFormula
579579 condition : and(succeeded(), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'Manual'))
580580 pool :
@@ -656,8 +656,8 @@ jobs:
656656
657657 displayName: 'Test Yum Package'
658658
659- - job : BuildUbuntuPackages
660- displayName : Build Ubuntu Packages
659+ - job : BuildDebPackages
660+ displayName : Build Deb Packages
661661
662662 dependsOn : BuildPythonWheel
663663 condition : and(succeeded(), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'Manual'))
@@ -666,82 +666,83 @@ jobs:
666666 strategy :
667667 matrix :
668668 Xenial :
669+ deb_system : ubuntu
669670 distro : xenial
670671 Trusty :
672+ deb_system : ubuntu
671673 distro : trusty
672674 Bionic :
675+ deb_system : ubuntu
673676 distro : bionic
674677 Eoan :
678+ deb_system : ubuntu
675679 distro : eoan
676680 Focal :
681+ deb_system : ubuntu
677682 distro : focal
678- steps :
679- - task : DownloadPipelineArtifact@1
680- displayName : ' Download Build Artifacts'
681- inputs :
682- TargetPath : ' $(Build.ArtifactStagingDirectory)/pypi'
683- artifactName : pypi
684-
685- - task : Bash@3
686- displayName : ' Build Ubuntu $(distro) Package'
687- inputs :
688- targetType : ' filePath'
689- filePath : scripts/release/debian/pipeline.sh
690- env :
691- DISTRO : $(distro)
692- DISTRO_BASE_IMAGE : ubuntu:$(distro)
693-
694- - task : PublishPipelineArtifact@0
695- displayName : ' Publish Artifact: debian'
696- inputs :
697- TargetPath : $(Build.ArtifactStagingDirectory)
698- ArtifactName : ubuntu-$(distro)
699-
700- - job : BuildDebianPackages
701- displayName : Build Debian Packages
702-
703- dependsOn : BuildPythonWheel
704- condition : and(succeeded(), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'Manual'))
705- pool :
706- vmImage : ' ubuntu-16.04'
707- strategy :
708- matrix :
709683 Jessie :
684+ deb_system : debian
710685 distro : jessie
711686 Stretch :
687+ deb_system : debian
712688 distro : stretch
713689 Buster :
714- distro : buster
690+ deb_system : debian
691+ distro : buster
715692 steps :
716693 - task : DownloadPipelineArtifact@1
717694 displayName : ' Download Build Artifacts'
718695 inputs :
719696 TargetPath : ' $(Build.ArtifactStagingDirectory)/pypi'
720697 artifactName : pypi
721698
722-
723699 - task : Bash@3
724- displayName : ' Build Debian $(distro) Package'
700+ displayName : ' Build $(deb_system) $(distro) Package'
725701 inputs :
726702 targetType : ' filePath'
727703 filePath : scripts/release/debian/pipeline.sh
728704 env :
729705 DISTRO : $(distro)
730- DISTRO_BASE_IMAGE : debian :$(distro)
706+ DISTRO_BASE_IMAGE : $(deb_system) :$(distro)
731707
732708 - task : PublishPipelineArtifact@0
733709 displayName : ' Publish Artifact: debian'
734710 inputs :
735711 TargetPath : $(Build.ArtifactStagingDirectory)
736- ArtifactName : debian -$(distro)
712+ ArtifactName : $(deb_system) -$(distro)
737713
738714- job : TestDebPackages
739715 displayName : Test Deb Packages
740716
741717 dependsOn :
742- - BuildUbuntuPackages
743- - BuildDebianPackages
718+ - BuildDebPackages
744719 condition : and(succeeded(), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'Manual'))
720+ strategy :
721+ matrix :
722+ Xenial :
723+ deb_system : ubuntu
724+ distro : xenial
725+ Trusty :
726+ deb_system : ubuntu
727+ distro : trusty
728+ Bionic :
729+ deb_system : ubuntu
730+ distro : bionic
731+ Eoan :
732+ deb_system : ubuntu
733+ distro : eoan
734+ Focal :
735+ deb_system : ubuntu
736+ distro : focal
737+ Jessie :
738+ deb_system : debian
739+ distro : jessie
740+ Stretch :
741+ deb_system : debian
742+ distro : stretch
743+ Buster :
744+ deb_system : debian
745+ distro : buster
745746 pool :
746747 vmImage : ' ubuntu-16.04'
747748 steps :
@@ -752,86 +753,24 @@ jobs:
752753 artifactName : metadata
753754
754755 - task : DownloadPipelineArtifact@1
755- displayName : ' Download Debian:Stretch Build'
756+ displayName : ' Download $(deb_system):$(distro) Build'
756757 inputs :
757758 TargetPath : ' $(Build.ArtifactStagingDirectory)/debian'
758- artifactName : debian-stretch
759+ artifactName : $(deb_system)-$(distro)
759760
760- - task : DownloadPipelineArtifact@1
761- displayName : ' Download Debian:Buster Build'
762- inputs :
763- TargetPath : ' $(Build.ArtifactStagingDirectory)/debian'
764- artifactName : debian-buster
765-
766- - task : DownloadPipelineArtifact@1
767- displayName : ' Download Debian:Jessie Builds'
768- inputs :
769- TargetPath : ' $(Build.ArtifactStagingDirectory)/debian'
770- artifactName : debian-jessie
771-
772- - task : DownloadPipelineArtifact@1
773- displayName : ' Download Ubuntu:Bionic Builds'
774- inputs :
775- TargetPath : ' $(Build.ArtifactStagingDirectory)/debian'
776- artifactName : ubuntu-bionic
777-
778- - task : DownloadPipelineArtifact@1
779- displayName : ' Download Ubuntu:Xenial Builds'
780- inputs :
781- TargetPath : ' $(Build.ArtifactStagingDirectory)/debian'
782- artifactName : ubuntu-xenial
783-
784- - task : DownloadPipelineArtifact@1
785- displayName : ' Download Ubuntu:Trusty Builds'
786- inputs :
787- TargetPath : ' $(Build.ArtifactStagingDirectory)/debian'
788- artifactName : ubuntu-trusty
789-
790- - task : DownloadPipelineArtifact@1
791- displayName : ' Download Ubuntu:Eoan Builds'
792- inputs :
793- TargetPath : ' $(Build.ArtifactStagingDirectory)/debian'
794- artifactName : ubuntu-eoan
795-
796- - task : DownloadPipelineArtifact@1
797- displayName : ' Download Ubuntu:Focal Builds'
761+ - task : Bash@3
762+ displayName : ' Test $(deb_system) $(distro) Package'
763+ env :
764+ DISTRO : $(distro)
765+ DISTRO_BASE_IMAGE : $(deb_system):$(distro)
798766 inputs :
799- TargetPath : ' $(Build.ArtifactStagingDirectory)/debian'
800- artifactName : ubuntu-focal
801-
802- - bash : |
803- set -exv
804-
805- CLI_VERSION=`cat $SYSTEM_ARTIFACTSDIRECTORY/metadata/version`
806-
807- DISTROS=(jessie stretch xenial trusty)
808- BASE_IMAGES=(debian:jessie debian:stretch ubuntu:xenial ubuntu:trusty)
809-
810- # Distros that don't require libssl1.1
811- for i in ${!DISTROS[@]}; do
812- echo "== Test debian package on ${DISTROS[$i]} =="
813-
814- DEB_FILE=$SYSTEM_ARTIFACTSDIRECTORY/debian/azure-cli_$CLI_VERSION-1~${DISTROS[$i]}_all.deb
815-
816- docker pull ${BASE_IMAGES[$i]}
817-
818- docker run --rm -v $SYSTEM_ARTIFACTSDIRECTORY/debian:/mnt/artifacts ${BASE_IMAGES[$i]} /bin/bash -c "apt-get update && apt-get install -y apt-transport-https && dpkg -i /mnt/artifacts/azure-cli_$CLI_VERSION-1~${DISTROS[$i]}_all.deb && time az self-test && time az --version && sleep 5"
819- done
820-
821- # Distros that do require libssl1.1
822- DISTROS=(bionic buster eoan focal)
823- BASE_IMAGES=(ubuntu:bionic debian:buster ubuntu:eoan ubuntu:focal)
824-
825- for i in ${!DISTROS[@]}; do
826- echo "== Test debian package on ${DISTROS[$i]} =="
827-
828- DEB_FILE=$SYSTEM_ARTIFACTSDIRECTORY/debian/azure-cli_$CLI_VERSION-1~${DISTROS[$i]}_all.deb
829-
830- docker pull ${BASE_IMAGES[$i]}
831-
832- docker run --rm -v $SYSTEM_ARTIFACTSDIRECTORY/debian:/mnt/artifacts ${BASE_IMAGES[$i]} /bin/bash -c "apt-get update && apt-get install -y libssl1.1 apt-transport-https && dpkg -i /mnt/artifacts/azure-cli_$CLI_VERSION-1~${DISTROS[$i]}_all.deb && time az self-test && time az --version && sleep 5"
833- done
834- displayName: 'Bash Script'
767+ targetType : ' inline'
768+ script : |
769+ set -exv
770+ CLI_VERSION=`cat $SYSTEM_ARTIFACTSDIRECTORY/metadata/version`
771+ echo "== Test debian package on ${DISTRO} =="
772+ docker pull ${DISTRO_BASE_IMAGE}
773+ docker run --rm -e DISTRO=${DISTRO} -e CLI_VERSION=$CLI_VERSION -v $SYSTEM_ARTIFACTSDIRECTORY/debian:/mnt/artifacts -v $(pwd):/azure-cli ${DISTRO_BASE_IMAGE} /bin/bash "/azure-cli/scripts/release/debian/test_deb_in_docker.sh"
835774
836775 - job : CheckStyle
837776 displayName : " Check CLI Style"
0 commit comments