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

Refactoring the ADO pipeline #204

Merged
merged 94 commits into from
Aug 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
8a74336
Parallelize the build via pipeline job strategy
magodo Aug 10, 2022
9274e65
fix
magodo Aug 10, 2022
86115c1
fix
magodo Aug 10, 2022
9568fbc
fix
magodo Aug 10, 2022
c209367
fix
magodo Aug 10, 2022
d775389
add dep
magodo Aug 10, 2022
b658b5c
fix
magodo Aug 10, 2022
21dfd57
debug
magodo Aug 10, 2022
22b86b6
debug
magodo Aug 10, 2022
a9f2353
fix
magodo Aug 10, 2022
1f8ffba
fix
magodo Aug 10, 2022
d6309a8
Add ESRP sign
magodo Aug 10, 2022
d0ae826
sign digest
magodo Aug 10, 2022
de17549
fix
magodo Aug 10, 2022
c5c0c3e
debug
magodo Aug 10, 2022
59f2a01
debug
magodo Aug 10, 2022
4cdb72c
fix
magodo Aug 10, 2022
561abe1
remove some debug stuff
magodo Aug 10, 2022
5785b0c
Add GH release task
magodo Aug 11, 2022
4d5ed2e
reorder
magodo Aug 11, 2022
daeda04
scaffold build packages
magodo Aug 11, 2022
691cc32
package linux
magodo Aug 11, 2022
9bde63e
package linux
magodo Aug 11, 2022
ebb1a9f
fix
magodo Aug 11, 2022
281e1f1
debug
magodo Aug 11, 2022
f1c68d3
debug
magodo Aug 11, 2022
0c2b10d
Use ACR to host the docker image
magodo Aug 11, 2022
9f3088a
debug
magodo Aug 11, 2022
3d2b86f
fix
magodo Aug 11, 2022
dfb92bf
fix
magodo Aug 11, 2022
455ea1c
debug
magodo Aug 11, 2022
d2a5c0a
debug
magodo Aug 11, 2022
f97d7db
fix
magodo Aug 11, 2022
bdfccce
debug
magodo Aug 11, 2022
98b9207
update
magodo Aug 11, 2022
d84b6ad
build image rather than retrieve from acr
magodo Aug 11, 2022
0cfa7a3
fix
magodo Aug 11, 2022
60c13ed
sign linux packages
magodo Aug 11, 2022
3d0cdd0
Update azure-pipelines.yml for Azure Pipelines
magodo Aug 17, 2022
fed68eb
debug
magodo Aug 17, 2022
befb286
debug
magodo Aug 17, 2022
ef36c51
sudo
magodo Aug 17, 2022
fd46db5
debug
magodo Aug 17, 2022
ac2e907
fix
magodo Aug 17, 2022
0614952
fix
magodo Aug 17, 2022
1c888d1
debug
magodo Aug 17, 2022
3b1d812
fix
magodo Aug 17, 2022
8f6f62e
do the publish
magodo Aug 17, 2022
c162f41
enable the build
magodo Aug 17, 2022
e23e15d
debug
magodo Aug 18, 2022
3dc515a
re-layout the scripts dir
magodo Aug 18, 2022
bcb01b2
publish all debian packages
magodo Aug 18, 2022
352791a
enable build
magodo Aug 18, 2022
2b788a4
disable debug artifact dl
magodo Aug 18, 2022
0430e12
update the download artifact task with runVersion
magodo Aug 19, 2022
11110d5
verify ubuntu bionic
magodo Aug 19, 2022
c4c8c4b
correct the path
magodo Aug 19, 2022
9296ead
verify the correct version is installed
magodo Aug 19, 2022
5327556
verify all ubuntu releases
magodo Aug 19, 2022
bf1fc46
fix
magodo Aug 19, 2022
1a0b815
verify debian releases
magodo Aug 19, 2022
b53a87f
publish for rpm
magodo Aug 19, 2022
3cad632
republish for fedora34-amd64 and rhel9-amd64
magodo Aug 19, 2022
6e9b14b
uncomment all
magodo Aug 19, 2022
159d406
verify all
magodo Aug 20, 2022
491125e
handle dnf check-update returns 100
magodo Aug 20, 2022
a9d9baa
uncomment all
magodo Aug 20, 2022
4f6cc6b
a simple msi wix source code
magodo Aug 22, 2022
5f9fd3d
pipeline: try building msi
magodo Aug 22, 2022
22de97c
enable the acc download
magodo Aug 22, 2022
fd72d91
use bash
magodo Aug 22, 2022
a08f704
setup wix
magodo Aug 22, 2022
6748b53
download wix311.exe from artifact (as win curl not support -L)
magodo Aug 22, 2022
34e2840
fix
magodo Aug 22, 2022
2925876
fix
magodo Aug 22, 2022
5318454
disable the acc dl
magodo Aug 22, 2022
e21a96e
fedora repos remove repo configs for accelarating
magodo Aug 23, 2022
a23dc40
verify linux package publish
magodo Aug 23, 2022
8d1dfe7
uncomment all
magodo Aug 23, 2022
7295ea7
sign msi && update linux package verify retry
magodo Aug 23, 2022
e17f571
update the acc artifact runId
magodo Aug 23, 2022
972dce4
linux pkg verify: update count from 20->60
magodo Aug 23, 2022
d40febb
linux pkg verify: each try also update repo metadta
magodo Aug 23, 2022
9122f6a
vmImage changes to name
magodo Aug 23, 2022
8e6220f
dnf check-update --refresh
magodo Aug 23, 2022
568468c
move the build msi to build stage
magodo Aug 23, 2022
fce3d21
disable the acc dl
magodo Aug 23, 2022
d7cd953
debug msi
magodo Aug 23, 2022
5dc6491
use windows vm for building msi
magodo Aug 23, 2022
bdc56c6
build all
magodo Aug 23, 2022
c240274
Linux package: only enble the latest two versions of ubuntu and redhat
magodo Aug 24, 2022
e859cf6
Wix: modify PATH on (un)install
magodo Aug 25, 2022
e5266ce
reorder the release and publish linux pipeline & introduce new param:…
magodo Aug 25, 2022
291264e
typo
magodo Aug 25, 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
648 changes: 617 additions & 31 deletions azure-pipelines.yml

Large diffs are not rendered by default.

28 changes: 0 additions & 28 deletions scripts/build.sh

This file was deleted.

6 changes: 6 additions & 0 deletions scripts/package/linux/build/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM ubuntu:22.04
ARG version
RUN apt update && apt install -y ruby-dev build-essential squashfs-tools
RUN apt install -y rpm
RUN gem i fpm
CMD ["fpm", "--help"]
24 changes: 24 additions & 0 deletions scripts/package/linux/verify/centos-8.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash
set -e

version=${1:?"version not specified"}

sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
rpm --import https://packages.microsoft.com/keys/microsoft.asc
dnf install -y https://packages.microsoft.com/config/centos/8/packages-microsoft-prod.rpm

total=60
count=1
while ((count <= total)); do
echo "Try ($count/$total)"
# See: https://access.redhat.com/solutions/2779441
dnf check-update --refresh || [[ $? == 100 ]]
dnf install -y aztfy && break

sleep 1m
((count++))
done
(( count <= total ))

grep $version <(aztfy -v)
23 changes: 23 additions & 0 deletions scripts/package/linux/verify/debian-bullseye.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
set -e

version=${1:?"version not specified"}

apt-get update
apt-get install -y curl software-properties-common gpg
curl -sSL https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
apt-add-repository https://packages.microsoft.com/debian/11/prod

total=60
count=1
while ((count <= total)); do
echo "Try ($count/$total)"
apt-get update
apt-get install -y aztfy && break

sleep 1m
((count++))
done
(( count <= total ))

grep $version <(aztfy -v)
23 changes: 23 additions & 0 deletions scripts/package/linux/verify/debian-buster.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
set -e

version=${1:?"version not specified"}

apt-get update
apt-get install -y curl software-properties-common gpg
curl -sSL https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
apt-add-repository https://packages.microsoft.com/debian/10/prod

total=60
count=1
while ((count <= total)); do
echo "Try ($count/$total)"
apt-get update
apt-get install -y aztfy && break

sleep 1m
((count++))
done
(( count <= total ))

grep $version <(aztfy -v)
26 changes: 26 additions & 0 deletions scripts/package/linux/verify/fedora-34.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash
set -e

version=${1:?"version not specified"}

rpm --import https://packages.microsoft.com/keys/microsoft.asc

# To accelarate syncing the repo metadatas
rm -f /etc/yum.repos.d/*

dnf install -y https://packages.microsoft.com/config/fedora/34/packages-microsoft-prod.rpm

total=60
count=1
while ((count <= total)); do
echo "Try ($count/$total)"
# See: https://access.redhat.com/solutions/2779441
dnf check-update --refresh || [[ $? == 100 ]]
dnf install -y aztfy && break

sleep 1m
((count++))
done
(( count <= total ))

grep $version <(aztfy -v)
26 changes: 26 additions & 0 deletions scripts/package/linux/verify/fedora-35.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash
set -e

version=${1:?"version not specified"}

rpm --import https://packages.microsoft.com/keys/microsoft.asc

# To accelarate syncing the repo metadatas
rm -f /etc/yum.repos.d/*

dnf install -y https://packages.microsoft.com/config/fedora/35/packages-microsoft-prod.rpm

total=60
count=1
while ((count <= total)); do
echo "Try ($count/$total)"
# See: https://access.redhat.com/solutions/2779441
dnf check-update --refresh || [[ $? == 100 ]]
dnf install -y aztfy && break

sleep 1m
((count++))
done
(( count <= total ))

grep $version <(aztfy -v)
26 changes: 26 additions & 0 deletions scripts/package/linux/verify/fedora-36.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash
set -e

version=${1:?"version not specified"}

rpm --import https://packages.microsoft.com/keys/microsoft.asc

# To accelarate syncing the repo metadatas
rm -f /etc/yum.repos.d/*

dnf install -y https://packages.microsoft.com/config/fedora/36/packages-microsoft-prod.rpm

total=60
count=1
while ((count <= total)); do
echo "Try ($count/$total)"
# See: https://access.redhat.com/solutions/2779441
dnf check-update --refresh || [[ $? == 100 ]]
dnf install -y aztfy && break

sleep 1m
((count++))
done
(( count <= total ))

grep $version <(aztfy -v)
23 changes: 23 additions & 0 deletions scripts/package/linux/verify/ubuntu-bionic.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
set -e

version=${1:?"version not specified"}

apt-get update
apt-get install -y curl software-properties-common gpg
curl -sSL https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
apt-add-repository https://packages.microsoft.com/ubuntu/18.04/multiarch/prod

total=60
count=1
while ((count <= total)); do
echo "Try ($count/$total)"
apt-get update
apt-get install -y aztfy && break

sleep 1m
((count++))
done
(( count <= total ))

grep $version <(aztfy -v)
23 changes: 23 additions & 0 deletions scripts/package/linux/verify/ubuntu-focal.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
set -e

version=${1:?"version not specified"}

apt-get update
apt-get install -y curl software-properties-common gpg
curl -sSL https://packages.microsoft.com/keys/microsoft.asc > /etc/apt/trusted.gpg.d/microsoft.asc
apt-add-repository https://packages.microsoft.com/ubuntu/20.04/prod

total=60
count=1
while ((count <= total)); do
echo "Try ($count/$total)"
apt-get update
apt-get install -y aztfy && break

sleep 1m
((count++))
done
(( count <= total ))

grep $version <(aztfy -v)
22 changes: 22 additions & 0 deletions scripts/package/linux/verify/ubuntu-jammy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash
set -e

version=${1:?"version not specified"}

apt-get update
apt-get install -y curl software-properties-common gpg
curl -sSL https://packages.microsoft.com/keys/microsoft.asc > /etc/apt/trusted.gpg.d/microsoft.asc
apt-add-repository https://packages.microsoft.com/ubuntu/22.04/prod

total=60
count=1
while ((count <= total)); do
echo "Try ($count/$total)"
apt-get update
apt-get install -y aztfy && break

sleep 1m
((count++))
done

grep $version <(aztfy -v)
43 changes: 43 additions & 0 deletions scripts/package/windows/build/setup.wxs
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<Wix xmlns="http://schemas.microsoft.com/wix/2007/wi">

<?if $(sys.BUILDARCH) = x64 ?>
<?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?>
<?else ?>
<?define PlatformProgramFilesFolder = "ProgramFilesFolder" ?>
<?endif ?>

<Product Id="*" Name="aztfy" Language="1033" Version="$(env.VERSION)" Manufacturer="Microsoft" UpgradeCode="64fec5fc-2cad-4ec0-95ed-bdf283f6f36d">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />

<MajorUpgrade DowngradeErrorMessage="A newer version of aztfy is already installed." />
<MediaTemplate EmbedCab="yes" />

<Feature Id="ProductFeature" Title="aztfy" Level="1">
<ComponentGroupRef Id="ProductComponents" />
</Feature>
</Product>

<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="$(var.PlatformProgramFilesFolder)">
<Directory Id="INSTALLFOLDER" Name="aztfy" />
</Directory>
</Directory>
</Fragment>

<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<Component Id="ProductComponent">
<File Id="FILE_aztfyEXE" Source="aztfy.exe" KeyPath="yes" />
<Environment
Id = "EnvPath"
Action = "set"
Name = "PATH"
Value = "[INSTALLFOLDER]"
Part = "last"
Permanent = "no"
System = "no" />
</Component>
</ComponentGroup>
</Fragment>
</Wix>