Skip to content

Commit 4ca21a1

Browse files
authored
Merge pull request #2477 from flatcar/chewi/drop-old-code
Drop lots of obsolete CI, release signing, and upload code
2 parents 33672f7 + 9f8eac6 commit 4ca21a1

Some content is hidden

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

51 files changed

+9
-2635
lines changed

bootstrap_sdk

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ GENTOO_MIRRORS="${GENTOO_MIRRORS//https:\/\//http://}"
6060
export GENTOO_MIRRORS
6161

6262
catalyst_init "$@"
63-
check_gsutil_opts
6463
ROOT_OVERLAY=${TEMPDIR}/stage4_overlay
6564

6665
if [[ "$STAGES" =~ stage4 ]]; then
@@ -108,18 +107,6 @@ if [[ "$STAGES" =~ stage4 ]]; then
108107
verify_digests "${release_image}" "${release_contents}"
109108

110109
info "SDK ready: ${release_image}"
111-
112-
def_upload_path="${UPLOAD_ROOT}/sdk/${ARCH}/${FLAGS_version}"
113-
sign_and_upload_files "tarball" "${def_upload_path}" "" \
114-
"${release_image}" "${release_contents}" "${release_digests}"
115-
sign_and_upload_files "packages" "${def_upload_path}" "pkgs/" \
116-
"${BINPKGS}"/*
117-
118-
if [ -d "${BINPKGS}/crossdev" ]; then
119-
# Upload the SDK toolchain packages
120-
sign_and_upload_files "cross toolchain packages" "${def_upload_path}" \
121-
"toolchain/" "${BINPKGS}/crossdev"/*
122-
fi
123110
fi
124111

125112
command_completed

build_image

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,6 @@ eval set -- "${FLAGS_ARGV:-prod}"
8787
# so will die prematurely if 'switch_to_strict_mode' is specified before now.
8888
switch_to_strict_mode
8989

90-
check_gsutil_opts
91-
9290
# If downloading packages is enabled ensure the board is configured properly.
9391
if [[ ${FLAGS_getbinpkg} -eq ${FLAGS_TRUE} ]]; then
9492
"${SRC_ROOT}/scripts/setup_board" --board="${FLAGS_board}" \
@@ -202,8 +200,6 @@ FLATCAR_BUILD_ID="${FLATCAR_BUILD_ID}"
202200
FLATCAR_SDK_VERSION=${FLATCAR_SDK_VERSION}
203201
EOF
204202

205-
upload_image "${BUILD_DIR}/version.txt"
206-
207203
# Create a named symlink.
208204
set_build_symlinks latest "${FLAGS_group}-latest"
209205

@@ -230,5 +226,3 @@ if [[ "${PROD_IMAGE}" -eq 1 ]]; then
230226
fi
231227

232228
command_completed
233-
234-

build_library/build_image_util.sh

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -62,22 +62,13 @@ extract_update() {
6262
local image_name="$1"
6363
local disk_layout="$2"
6464
local update_path="${BUILD_DIR}/${image_name%_image.bin}_update.bin"
65-
local digest_path="${update_path}.DIGESTS"
6665

6766
"${BUILD_LIBRARY_DIR}/disk_util" --disk_layout="${disk_layout}" \
6867
extract "${BUILD_DIR}/${image_name}" "USR-A" "${update_path}"
6968

7069
# Compress image
7170
files_to_evaluate+=( "${update_path}" )
72-
declare -a compressed_images
73-
declare -a extra_files
74-
compress_disk_images files_to_evaluate compressed_images extra_files
75-
76-
# Upload compressed image
77-
upload_image -d "${digest_path}" "${compressed_images[@]}" "${extra_files[@]}"
78-
79-
# Upload legacy digests
80-
upload_legacy_digests "${digest_path}" compressed_images
71+
compress_disk_images files_to_evaluate
8172

8273
# For production as well as dev builds we generate a dev-key-signed update
8374
# payload for running tests (the signature won't be accepted by production systems).
@@ -87,8 +78,6 @@ extract_update() {
8778
-new_image "${update_path}" \
8879
-new_kernel "${BUILD_DIR}/${image_name%.bin}.vmlinuz" \
8980
-out_file "${update_test}"
90-
91-
upload_image "${update_test}"
9281
}
9382

9483
zip_update_tools() {
@@ -100,8 +89,6 @@ zip_update_tools() {
10089
export REPO_MANIFESTS_DIR SCRIPTS_DIR
10190
"${BUILD_LIBRARY_DIR}/generate_au_zip.py" \
10291
--arch "$(get_sdk_arch)" --output-dir "${BUILD_DIR}" --zip-name "${update_zip}"
103-
104-
upload_image "${BUILD_DIR}/${update_zip}"
10592
}
10693

10794
generate_update() {
@@ -123,16 +110,8 @@ generate_update() {
123110

124111
# Compress image
125112
declare -a files_to_evaluate
126-
declare -a compressed_images
127-
declare -a extra_files
128113
files_to_evaluate+=( "${update}.bin" )
129-
compress_disk_images files_to_evaluate compressed_images extra_files
130-
131-
# Upload images
132-
upload_image -d "${update}.DIGESTS" "${update}".{gz,zip} "${compressed_images[@]}" "${extra_files[@]}"
133-
134-
# Upload legacy digests
135-
upload_legacy_digests "${update}.DIGESTS" compressed_images
114+
compress_disk_images files_to_evaluate
136115
}
137116

138117
# ldconfig cannot generate caches for non-native arches.

build_library/dev_container_util.sh

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -115,20 +115,6 @@ create_dev_container() {
115115
finish_image "${image_name}" "${disk_layout}" "${root_fs_dir}" "${image_contents}" "${image_contents_wtd}"
116116

117117
declare -a files_to_evaluate
118-
declare -a compressed_images
119-
declare -a extra_files
120-
121118
files_to_evaluate+=( "${BUILD_DIR}/${image_name}" )
122-
compress_disk_images files_to_evaluate compressed_images extra_files
123-
124-
upload_image -d "${BUILD_DIR}/${image_name}.DIGESTS" \
125-
"${BUILD_DIR}/${image_contents}" \
126-
"${BUILD_DIR}/${image_contents_wtd}" \
127-
"${BUILD_DIR}/${image_packages}" \
128-
"${BUILD_DIR}/${image_licenses}" \
129-
"${compressed_images[@]}" \
130-
"${extra_files[@]}"
131-
132-
# Upload legacy digests
133-
upload_legacy_digests "${BUILD_DIR}/${image_name}.DIGESTS" compressed_images
119+
compress_disk_images files_to_evaluate
134120
}

build_library/generate_au_zip.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222
# GLOBALS
2323
STATIC_FILES = ['%s/version.txt' % REPO_MANIFESTS_DIR,
2424
'%s/common.sh' % SCRIPTS_DIR,
25-
'%s/core_pre_alpha' % SCRIPTS_DIR,
26-
'%s/core_roller_upload' % SCRIPTS_DIR,
2725
'%s/core_sign_update' % SCRIPTS_DIR,
2826
]
2927

build_library/modify_image_util.sh

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -85,24 +85,8 @@ finish_modify_image() {
8585

8686

8787
declare -a files_to_evaluate
88-
declare -a compressed_images
89-
declare -a extra_files
90-
9188
files_to_evaluate+=( "${DST_IMAGE}" )
92-
compress_disk_images files_to_evaluate compressed_images extra_files
93-
94-
upload_image -d "${DST_IMAGE}.DIGESTS" \
95-
"${compressed_images[@]}" \
96-
"${extra_files[@]}"
97-
98-
# Upload legacy digests
99-
upload_legacy_digests "${DST_IMAGE}.DIGESTS" compressed_images
100-
101-
for filename in "${EXTRA_FILES[@]}"; do
102-
if [[ -e "${BUILD_DIR}/${filename}" ]]; then
103-
upload_image "${BUILD_DIR}/${filename}"
104-
fi
105-
done
89+
compress_disk_images files_to_evaluate
10690

10791
set_build_symlinks "${FLAGS_group}-latest"
10892

build_library/prod_image_util.sh

Lines changed: 2 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ create_prod_image() {
131131
sudo rsync -a --delete "${BUILD_DIR}/configroot/etc/portage" "${BUILD_DIR}/root_fs_dir2/etc"
132132
sudo mksquashfs "${BUILD_DIR}/root_fs_dir2" "${BUILD_DIR}/${image_sysext_base}" -noappend -xattrs-exclude '^btrfs.'
133133
sudo rm -rf "${BUILD_DIR}/root_fs_dir2"
134-
134+
135135
# clean-ups of things we do not need
136136
sudo rm ${root_fs_dir}/etc/csh.env
137137
sudo rm -rf ${root_fs_dir}/etc/env.d
@@ -180,56 +180,8 @@ EOF
180180
"${image_initrd_contents_wtd}" \
181181
"${image_disk_usage}"
182182

183-
# Upload
184-
local to_upload=(
185-
"${BUILD_DIR}/${image_contents}"
186-
"${BUILD_DIR}/${image_contents_wtd}"
187-
"${BUILD_DIR}/${image_packages}"
188-
"${BUILD_DIR}/${image_sbom}"
189-
"${BUILD_DIR}/${image_licenses}"
190-
"${BUILD_DIR}/${image_kernel}"
191-
"${BUILD_DIR}/${image_pcr_policy}"
192-
"${BUILD_DIR}/${image_grub}"
193-
"${BUILD_DIR}/${image_kconfig}"
194-
"${BUILD_DIR}/${image_initrd_contents}"
195-
"${BUILD_DIR}/${image_initrd_contents_wtd}"
196-
"${BUILD_DIR}/${image_disk_usage}"
197-
"${BUILD_DIR}/${image_sysext_base}"
198-
)
199-
200-
# append sysext inventories to uploads
201-
if [[ -n "${base_sysexts}" ]] ; then
202-
local inventory_file="" image_basename="${image_name%.bin}"
203-
204-
for inventory_file in "${image_contents}" "${image_contents_wtd}" "${image_disk_usage}" "${image_packages}" ; do
205-
local suffix="${inventory_file/${image_basename}/}" sysext=""
206-
207-
for sysext in ${base_sysexts//,/ }; do
208-
local name="${sysext%:*}"
209-
local sysext_inventory="${root_fs_sysexts_output_dir}/${name}${suffix}"
210-
if [[ ! -f "${sysext_inventory}" ]] ; then
211-
die "Sysext inventory file '${name}${suffix}' for '${inventory_file}' not found in '${root_fs_sysexts_output_dir}'"
212-
fi
213-
to_upload+=( "${sysext_inventory}" )
214-
done
215-
done
216-
fi
217-
218183
local files_to_evaluate=( "${BUILD_DIR}/${image_name}" )
219-
declare -a compressed_images
220-
declare -a extra_files
221-
compress_disk_images files_to_evaluate compressed_images extra_files
222-
to_upload+=( "${compressed_images[@]}" )
223-
to_upload+=( "${extra_files[@]}" )
224-
225-
# FIXME(bgilbert): no shim on arm64
226-
if [[ -f "${BUILD_DIR}/${image_shim}" ]]; then
227-
to_upload+=("${BUILD_DIR}/${image_shim}")
228-
fi
229-
upload_image -d "${BUILD_DIR}/${image_name}.DIGESTS" "${to_upload[@]}"
230-
231-
# Upload legacy digests
232-
upload_legacy_digests "${BUILD_DIR}/${image_name}.DIGESTS" compressed_images
184+
compress_disk_images files_to_evaluate
233185
}
234186

235187
create_prod_tar() {
@@ -246,13 +198,11 @@ create_prod_tar() {
246198
sudo umount "/mnt/${lodevbase}p9"
247199
sudo rmdir "/mnt/${lodevbase}p9"
248200
sudo losetup --detach "${lodev}"
249-
upload_image "${container}"
250201
}
251202

252203
create_prod_sysexts() {
253204
local image_name="$1"
254205
local image_sysext_base="${image_name%.bin}_sysext.squashfs"
255-
local to_upload=()
256206
for sysext in "${EXTRA_SYSEXTS[@]}"; do
257207
local name="flatcar-${sysext%:*}"
258208
local pkgs="${sysext#*:}"
@@ -273,15 +223,5 @@ create_prod_sysexts() {
273223
-private_key "/usr/share/update_engine/update-payload-key.key.pem" \
274224
-new_image "${BUILD_DIR}/${name}.raw" \
275225
-out_file "${BUILD_DIR}/flatcar_test_update-${name}.gz"
276-
to_upload+=(
277-
"${BUILD_DIR}/${name}.raw"
278-
"${BUILD_DIR}/${name}_contents.txt"
279-
"${BUILD_DIR}/${name}_contents_wtd.txt"
280-
"${BUILD_DIR}/${name}_disk_usage.txt"
281-
"${BUILD_DIR}/${name}_packages.txt"
282-
"${BUILD_DIR}/flatcar_test_update-${name}.gz"
283-
)
284226
done
285-
upload_image -d ${BUILD_DIR}/sysexts.DIGESTS "${to_upload[@]}"
286227
}
287-

0 commit comments

Comments
 (0)