Skip to content

Commit 9237b2e

Browse files
committed
Merge branch '2.0' into fasttrack/2.0
2 parents eb1469d + 12803fd commit 9237b2e

File tree

63 files changed

+3953
-593
lines changed

Some content is hidden

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

63 files changed

+3953
-593
lines changed

.pipelines/containerSourceData/scripts/PublishContainers.sh

Lines changed: 48 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,52 @@ function acr_login {
9595
# $1: image name
9696
function oras_attach {
9797
local image_name=$1
98+
local max_retries=3
99+
local retry_count=0
100+
101+
while [ $retry_count -lt $max_retries ]; do
102+
echo "+++ Attempting to attach lifecycle annotation to $image_name (attempt $((retry_count + 1))/$max_retries)"
103+
104+
if oras attach \
105+
--artifact-type "application/vnd.microsoft.artifact.lifecycle" \
106+
--annotation "vnd.microsoft.artifact.lifecycle.end-of-life.date=$END_OF_LIFE_1_YEAR" \
107+
"$image_name"; then
108+
echo "+++ Successfully attached lifecycle annotation to $image_name"
109+
return 0
110+
else
111+
retry_count=$((retry_count + 1))
112+
if [ $retry_count -lt $max_retries ]; then
113+
echo "+++ Failed to attach lifecycle annotation to $image_name. Retrying in 5 seconds..."
114+
sleep 5
115+
else
116+
echo "+++ Failed to attach lifecycle annotation to $image_name after $max_retries attempts"
117+
return 1
118+
fi
119+
fi
120+
done
121+
}
122+
123+
# Detach the end-of-life annotation from the container image.
124+
# $1: image name
125+
function oras_detach {
126+
local image_name=$1
127+
lifecycle_manifests=$(oras discover -o json --artifact-type "application/vnd.microsoft.artifact.lifecycle" "$image_name")
128+
manifests=$(echo "$lifecycle_manifests" | jq -r '.manifests')
129+
130+
if [[ -z $manifests ]]; then
131+
echo "+++ No lifecycle manifests found for $image_name"
132+
return
133+
fi
98134

99-
oras attach \
100-
--artifact-type "application/vnd.microsoft.artifact.lifecycle" \
101-
--annotation "vnd.microsoft.artifact.lifecycle.end-of-life.date=$END_OF_LIFE_1_YEAR" \
102-
"$image_name"
135+
echo "+++ Found lifecycle manifests for $image_name: $manifests"
136+
# Loop through the manifests and delete them.
137+
manifest_count=$(echo "$manifests" | jq length)
138+
for (( i=0; i<manifest_count; i++ )); do
139+
digest=$(echo "$lifecycle_manifests" | jq -r ".manifests[$i].digest")
140+
echo "Deleting manifest with digest: $digest"
141+
imageNameWithoutTag=${image_name%:*}
142+
oras manifest delete --force "$imageNameWithoutTag@$digest"
143+
done
103144
}
104145

105146
function create_multi_arch_tags {
@@ -194,6 +235,7 @@ function create_multi_arch_tags {
194235
echo "+++ push $full_multiarch_tag tag"
195236
docker manifest push "$full_multiarch_tag"
196237
echo "+++ $full_multiarch_tag tag pushed successfully"
238+
oras_detach "$full_multiarch_tag"
197239
oras_attach "$full_multiarch_tag"
198240

199241
# Save the multi-arch tag to a file.
@@ -282,6 +324,7 @@ do
282324
docker image tag "$amd64_image" "$amd64_retagged_image_name"
283325
docker rmi "$amd64_image"
284326
docker image push "$amd64_retagged_image_name"
327+
oras_detach "$amd64_retagged_image_name"
285328
oras_attach "$amd64_retagged_image_name"
286329

287330
if [[ $ARCHITECTURE_TO_BUILD == *"ARM64"* ]]; then
@@ -290,6 +333,7 @@ do
290333
docker image tag "$arm64_image" "$arm64_retagged_image_name"
291334
docker rmi "$arm64_image"
292335
docker image push "$arm64_retagged_image_name"
336+
oras_detach "$arm64_retagged_image_name"
293337
oras_attach "$arm64_retagged_image_name"
294338
fi
295339

SPECS-SIGNED/hvloader-signed/hvloader-signed.spec

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Summary: Signed HvLoader.efi for %{buildarch} systems
77
Name: hvloader-signed-%{buildarch}
88
Version: 1.0.1
9-
Release: 12%{?dist}
9+
Release: 13%{?dist}
1010
License: MIT
1111
Vendor: Microsoft Corporation
1212
Distribution: Mariner
@@ -69,6 +69,9 @@ popd
6969
/boot/efi/HvLoader.efi
7070

7171
%changelog
72+
* Tue May 13 2025 Archana Shettigar <[email protected]> - 1.0.1-13
73+
- Bump release for consistency with hvloader spec.
74+
7275
* Tue Apr 29 2025 Mayank Singh <[email protected]> - 1.0.1-12
7376
- Bump release for consistency with hvloader spec.
7477

SPECS-SIGNED/kernel-azure-signed/kernel-azure-signed.spec

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
%define uname_r %{version}-%{release}
1010
Summary: Signed Linux Kernel for Azure
1111
Name: kernel-azure-signed-%{buildarch}
12-
Version: 5.15.184.1
12+
Version: 5.15.186.1
1313
Release: 1%{?dist}
1414
License: GPLv2
1515
Vendor: Microsoft Corporation
@@ -153,6 +153,9 @@ ln -sf linux-%{uname_r}.cfg /boot/mariner.cfg
153153
%exclude /module_info.ld
154154

155155
%changelog
156+
* Mon Jul 07 2025 CBL-Mariner Servicing Account <[email protected]> - 5.15.186.1-1
157+
- Auto-upgrade to 5.15.186.1
158+
156159
* Fri May 30 2025 CBL-Mariner Servicing Account <[email protected]> - 5.15.184.1-1
157160
- Auto-upgrade to 5.15.184.1
158161

SPECS-SIGNED/kernel-hci-signed/kernel-hci-signed.spec

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
%define uname_r %{version}-%{release}
55
Summary: Signed Linux Kernel for HCI
66
Name: kernel-hci-signed-%{buildarch}
7-
Version: 5.15.184.1
7+
Version: 5.15.186.1
88
Release: 1%{?dist}
99
License: GPLv2
1010
Vendor: Microsoft Corporation
@@ -149,6 +149,9 @@ ln -sf linux-%{uname_r}.cfg /boot/mariner.cfg
149149
%exclude /module_info.ld
150150

151151
%changelog
152+
* Mon Jul 07 2025 CBL-Mariner Servicing Account <[email protected]> - 5.15.186.1-1
153+
- Auto-upgrade to 5.15.186.1
154+
152155
* Fri May 30 2025 CBL-Mariner Servicing Account <[email protected]> - 5.15.184.1-1
153156
- Auto-upgrade to 5.15.184.1
154157

SPECS-SIGNED/kernel-signed/kernel-signed.spec

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
%define uname_r %{version}-%{release}
1010
Summary: Signed Linux Kernel for %{buildarch} systems
1111
Name: kernel-signed-%{buildarch}
12-
Version: 5.15.184.1
12+
Version: 5.15.186.1
1313
Release: 1%{?dist}
1414
License: GPLv2
1515
Vendor: Microsoft Corporation
@@ -153,6 +153,9 @@ ln -sf linux-%{uname_r}.cfg /boot/mariner.cfg
153153
%exclude /module_info.ld
154154

155155
%changelog
156+
* Mon Jul 07 2025 CBL-Mariner Servicing Account <[email protected]> - 5.15.186.1-1
157+
- Auto-upgrade to 5.15.186.1
158+
156159
* Fri May 30 2025 CBL-Mariner Servicing Account <[email protected]> - 5.15.184.1-1
157160
- Auto-upgrade to 5.15.184.1
158161

0 commit comments

Comments
 (0)