Skip to content

Commit e028df8

Browse files
authored
Merge branch '3.0-dev' into 3.0 (#10511)
2 parents ba13b46 + 339589c commit e028df8

407 files changed

Lines changed: 14929 additions & 2382 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CODEOWNERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@
6262
/SPECS/virtiofsd/* @microsoft/cbl-mariner-kata-containers
6363

6464
/SPECS/cloud-hypervisor-cvm/* @microsoft/cbl-mariner-kata-containers
65-
/SPECS/hvloader/* @microsoft/cbl-mariner-kata-containers
6665

6766
/SPECS/cloud-init/* @microsoft/cbl-mariner-provisioning
6867
/SPECS/walinuxagent/* @microsoft/cbl-mariner-provisioning

.github/workflows/check-circular-deps.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ name: Circular dependency check
55

66
on:
77
push:
8-
branches: [3.0*]
8+
branches: [3.0*, fasttrack/*, "!fasttrack/2.0"]
99
pull_request:
10-
branches: [3.0*]
10+
branches: [3.0*, fasttrack/*, "!fasttrack/2.0"]
1111

1212
jobs:
1313
spec-check:

.github/workflows/go-test-coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ jobs:
8686
sudo env "PATH=$PATH" make go-test-coverage
8787
8888
- name: Upload test coverage
89-
uses: actions/upload-artifact@v2.1.4
89+
uses: actions/upload-artifact@v4
9090
with:
9191
name: TestCoverage
9292
path: toolkit/out/tools/test_coverage_report.html

.github/workflows/lint-specs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ jobs:
9595
fi
9696
exit 0
9797
98-
- uses: actions/upload-artifact@v2
98+
- uses: actions/upload-artifact@v4
9999
if: ${{ always() }}
100100
with:
101101
name: linted_specs

.pipelines/containerSourceData/busybox/Dockerfile-Busybox

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ RUN mkdir /staging \
3333
&& pushd /staging \
3434
&& rm -rf boot media mnt opt run \
3535
&& rm -rf usr/lib/sysimage \
36-
&& rm -rf var/cache \
37-
&& rm -rf var/lib/rpm; \
36+
&& rm -rf var/cache; \
3837
ln -vL /staging/usr/sbin/busybox /staging/bin/; \
3938
chroot /staging /bin/busybox --install -s /bin
4039

.pipelines/containerSourceData/scripts/BuildGoldenContainer.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ set -e
5858
# -j OUTPUT -k ./rpms.tar.gz -l ~/azurelinux/.pipelines/containerSourceData \
5959
# -m "false" -n "false" -p development -q "false" -u "true"
6060

61-
while getopts ":a:b:c:d:e:f:g:h:i:j:k:l:m:n:o:p:q:r:s:t:u:v:" OPTIONS; do
61+
while getopts ":a:b:c:d:e:f:g:h:i:j:k:l:m:n:o:p:q:r:s:t:u:v:w:" OPTIONS; do
6262
case ${OPTIONS} in
6363
a ) BASE_IMAGE_NAME_FULL=$OPTARG;;
6464
b ) ACR=$OPTARG;;
@@ -82,6 +82,7 @@ while getopts ":a:b:c:d:e:f:g:h:i:j:k:l:m:n:o:p:q:r:s:t:u:v:" OPTIONS; do
8282
t ) SBOM_SCRIPT=$OPTARG;;
8383
u ) DISTROLESS=$OPTARG;;
8484
v ) VERSION_EXTRACT_CMD=$OPTARG;;
85+
w ) TOOLCHAIN_RPMS_TARBALL=$OPTARG;;
8586

8687
\? )
8788
echo "Error - Invalid Option: -$OPTARG" 1>&2
@@ -125,6 +126,7 @@ function print_inputs {
125126
echo "SBOM_TOOL_PATH -> $SBOM_TOOL_PATH"
126127
echo "SBOM_SCRIPT -> $SBOM_SCRIPT"
127128
echo "DISTROLESS -> $DISTROLESS"
129+
echo "TOOLCHAIN_RPMS_TARBALL -> $TOOLCHAIN_RPMS_TARBALL"
128130
}
129131

130132
function validate_inputs {
@@ -168,6 +170,11 @@ function validate_inputs {
168170
exit 1
169171
fi
170172

173+
if [[ ! -f $TOOLCHAIN_RPMS_TARBALL ]]; then
174+
echo "Error - No TOOLCHAIN_RPMS tarball found under '$TOOLCHAIN_RPMS_TARBALL'."
175+
exit 1
176+
fi
177+
171178
if [ ! -d "$CONTAINER_SRC_DIR" ]; then
172179
echo "Error - Container source directory does not exist."
173180
exit 1
@@ -236,7 +243,9 @@ function prepare_docker_directory {
236243
mkdir -pv "$HOST_MOUNTED_DIR"
237244

238245
# Copy files into docker context directory
239-
tar -xf "$RPMS_TARBALL" -C "$HOST_MOUNTED_DIR"/
246+
tar -xvf "$RPMS_TARBALL" -C "$HOST_MOUNTED_DIR"/
247+
# we look for the toolchain rpms in the same directory as the rpms tarball
248+
tar -xvf "$TOOLCHAIN_RPMS_TARBALL" -C "$HOST_MOUNTED_DIR/RPMS"/
240249
cp -v "$CONTAINER_SRC_DIR/azurelinuxlocal.repo" "$HOST_MOUNTED_DIR"/
241250
}
242251

.pipelines/prchecks/PackageBuildPRCheck.yml

Lines changed: 74 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
# Copyright (c) Microsoft Corporation.
22
# Licensed under the MIT License.
33

4-
# Since we're boosting our builds by using a private, pre-compiled raw toolchain
5-
# the pipeline requires defining the following variables outside of the YAML:
6-
# - rawToolchainCacheURL_AMD64
7-
# - rawToolchainCacheURL_ARM64
4+
# The "agentPool" parameter is defined in the "Agent pools (DEV)" variable group.
5+
# The "rawToolchain*" parameters are defined in the "Raw toolchain info" variable group.
86

97
trigger: none
108

@@ -13,15 +11,15 @@ parameters:
1311
type: object
1412
default:
1513
- name: "AMD64"
16-
agentPool: "$(DEV_AMD64_Managed)" # Pool defined inside the "Agent pools (DEV)" variable group.
14+
agentPool: "$(DEV_AMD64_Managed)"
1715
maxCPUs: "$(($(nproc) / 2))"
18-
rawToolchainCacheURL: "$(rawToolchainCacheURL_AMD64)"
19-
rawToolchainExpectedHash: "f56df34b90915c93f772d3961bf5e9eeb8c1233db43dd92070214e4ce6b72894"
16+
rawToolchainCacheURL: "$(rawToolchainCacheURL_AMD64_3.0)"
17+
rawToolchainExpectedHash: "$(rawToolchainCacheHash_AMD64_3.0)"
2018
- name: "ARM64"
21-
agentPool: "$(DEV_ARM64_Managed)" # Pool defined inside the "Agent pools (DEV)" variable group.
19+
agentPool: "$(DEV_ARM64_Managed)"
2220
maxCPUs: "$(($(nproc) / 3))"
23-
rawToolchainCacheURL: "$(rawToolchainCacheURL_ARM64)"
24-
rawToolchainExpectedHash: "65de43b3bdcfdaac71df1f11fd1f830a8109b1eb9d7cb6cbc2e2d0e929d0ef76"
21+
rawToolchainCacheURL: "$(rawToolchainCacheURL_ARM64_3.0)"
22+
rawToolchainExpectedHash: "$(rawToolchainCacheHash_ARM64_3.0)"
2523
- name: debug
2624
type: boolean
2725
default: false
@@ -36,12 +34,15 @@ resources:
3634

3735
variables:
3836
- group: "Agent pools (DEV)"
37+
- group: "Raw toolchain info"
3938
- name: rpmsArtifactNameBase
4039
value: RPMs
4140
- name: toolchainArtifactNameBase
4241
value: Toolchain
42+
- name: toolchainTestsArtifactNameBase
43+
value: Toolchain_tests
4344
- name: system.debug
44-
value: '${{ parameters.debug }}'
45+
value: "${{ parameters.debug }}"
4546

4647
extends:
4748
template: v2/OneBranch.NonOfficial.CrossPlat.yml@templates
@@ -59,7 +60,7 @@ extends:
5960
isCustom: true
6061
name: ${{ configuration.agentPool }}
6162
variables:
62-
ob_artifactBaseName: $(toolchainArtifactNameBase)_${{ configuration.name }}
63+
ob_artifactBaseName: $(toolchainArtifactNameBase)_${{ configuration.name }}_$(System.JobAttempt)
6364
ob_outputDirectory: $(Build.ArtifactStagingDirectory)
6465
steps:
6566
- template: .pipelines/templates/RawToolchainDownload.yml@self
@@ -75,14 +76,21 @@ extends:
7576
# Toolchain package tests should be run through the full package build, calculate the list of packages that should be re-tested
7677
# and make it available to the next stage via an output variable: 'CalculateToolchainPackageRetestList.toolchainPackageRetestList'
7778
- template: .pipelines/templates/ToolchainCalculatePackageRetests.yml@self
79+
parameters:
80+
# GCC fails to build as a regular package.
81+
ignoredSpecs: ["gcc"]
82+
83+
- script: echo "##vso[task.setvariable variable=toolchainArtifactName;isOutput=true]$(ob_artifactBaseName)"
84+
name: "ToolchainArtifactName"
85+
displayName: "Set variable for published artifact name"
7886

7987
# 1. Automatic publishing won't work if 'isCustom: true' is set on the pool. We cannot do 'isCustom: false' because
8088
# then OneBranch attempts to perform additional actions (adding build tags for instance), which require additional permissions
8189
# that the PR check pipeline does not have.
8290
# 2. The value for 'artifact' must equal $(ob_artifactBaseName), as this is the only value OneBranch accepts.
8391
- task: PublishPipelineArtifact@1
8492
inputs:
85-
artifact: $(toolchainArtifactNameBase)_${{ configuration.name }}
93+
artifact: $(toolchainArtifactNameBase)_${{ configuration.name }}_$(System.JobAttempt)
8694
targetPath: $(ob_outputDirectory)
8795
condition: always()
8896
displayName: "Publish toolchain artifacts"
@@ -96,38 +104,83 @@ extends:
96104
isCustom: true
97105
name: ${{ configuration.agentPool }}
98106
variables:
99-
ob_artifactBaseName: ${{ variables.rpmsArtifactNameBase }}_${{ configuration.name }}
107+
ob_artifactBaseName: $(rpmsArtifactNameBase)_${{ configuration.name }}_$(System.JobAttempt)
100108
ob_outputDirectory: $(Build.ArtifactStagingDirectory)
101-
testListFromToolchain: $[ stageDependencies.Toolchain_${{ configuration.name }}.Build.outputs['CalculateToolchainPackageRetestList.toolchainPackageRetestList'] ]
109+
toolchainArtifactName: $[ stageDependencies.Toolchain_${{ configuration.name }}.Build.outputs['ToolchainArtifactName.toolchainArtifactName'] ]
102110
steps:
103111
- template: .pipelines/templates/PackageBuild.yml@self
104112
parameters:
105-
customToolchainArtifactName: $(toolchainArtifactNameBase)_${{ configuration.name }}
113+
checkBuildRetries: "1"
114+
customToolchainArtifactName: $(toolchainArtifactName)
106115
isCheckBuild: true
107116
isQuickRebuildPackages: true
108-
outputArtifactsFolder: $(ob_outputDirectory)
117+
isUseCCache: true
109118
maxCPU: "${{ configuration.maxCPUs }}"
119+
outputArtifactsFolder: $(ob_outputDirectory)
110120
pipArtifactFeeds: "mariner/Mariner-Pypi-Feed"
111121
selfRepoName: self
112122
testSuiteName: "[${{ configuration.name }}] Package test"
113-
testRerunList: "$(testListFromToolchain)"
123+
124+
- script: echo "##vso[task.setvariable variable=rpmsArtifactName;isOutput=true]$(ob_artifactBaseName)"
125+
name: "RPMsArtifactName"
126+
displayName: "Set variable for published artifact name"
114127

115128
- task: PublishPipelineArtifact@1
116129
inputs:
117-
artifact: ${{ variables.rpmsArtifactNameBase }}_${{ configuration.name }}
130+
artifact: $(rpmsArtifactNameBase)_${{ configuration.name }}_$(System.JobAttempt)
118131
targetPath: $(ob_outputDirectory)
119132
condition: always()
120133
displayName: "Publish packages build artifacts"
121134

122-
- stage: sodiff_${{ configuration.name }}
135+
- stage: Toolchain_tests_${{ configuration.name }}
136+
dependsOn: Toolchain_${{ configuration.name }}
137+
jobs:
138+
- job: TestToolchainPackages
139+
condition: stageDependencies.Toolchain_${{ configuration.name }}.Build.outputs['CalculateToolchainPackageRetestList.toolchainPackageRetestList']
140+
pool:
141+
type: linux
142+
isCustom: true
143+
name: ${{ configuration.agentPool }}
144+
variables:
145+
ob_artifactBaseName: $(toolchainTestsArtifactNameBase)_${{ configuration.name }}_$(System.JobAttempt)
146+
ob_outputDirectory: $(Build.ArtifactStagingDirectory)
147+
testListFromToolchain: $[ stageDependencies.Toolchain_${{ configuration.name }}.Build.outputs['CalculateToolchainPackageRetestList.toolchainPackageRetestList'] ]
148+
toolchainArtifactName: $[ stageDependencies.Toolchain_${{ configuration.name }}.Build.outputs['ToolchainArtifactName.toolchainArtifactName'] ]
149+
steps:
150+
- template: .pipelines/templates/PackageBuild.yml@self
151+
parameters:
152+
checkBuildRetries: "1"
153+
customToolchainArtifactName: $(toolchainArtifactName)
154+
isAllowToolchainRebuilds: true
155+
isCheckBuild: true
156+
isQuickRebuildPackages: true
157+
isUseCCache: true
158+
maxCPU: "${{ configuration.maxCPUs }}"
159+
outputArtifactsFolder: $(ob_outputDirectory)
160+
pipArtifactFeeds: "mariner/Mariner-Pypi-Feed"
161+
selfRepoName: self
162+
srpmPackList: "$(testListFromToolchain)"
163+
testRerunList: "$(testListFromToolchain)"
164+
testSuiteName: "[${{ configuration.name }}] Toolchain test"
165+
166+
- task: PublishPipelineArtifact@1
167+
inputs:
168+
artifact: $(toolchainTestsArtifactNameBase)_${{ configuration.name }}_$(System.JobAttempt)
169+
targetPath: $(ob_outputDirectory)
170+
condition: always()
171+
displayName: "Publish toolchain build artifacts"
172+
173+
- stage: Sodiff_${{ configuration.name }}
123174
dependsOn: RPMs_${{ configuration.name }}
124175
jobs:
125176
- job: Sodiff_Check
126177
pool:
127178
type: linux
128179
isCustom: true
129180
name: ${{ configuration.agentPool }}
181+
variables:
182+
rpmsArtifactName: $[ stageDependencies.RPMs_${{ configuration.name }}.BuildAndTest.outputs['RPMsArtifactName.rpmsArtifactName'] ]
130183
steps:
131184
- template: .pipelines/templatesWithCheckout/SodiffCheck.yml@self
132185
parameters:
133-
inputArtifactName: ${{ variables.rpmsArtifactNameBase }}_${{ configuration.name }}
186+
inputArtifactName: $(rpmsArtifactName)

0 commit comments

Comments
 (0)