mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-23 06:31:18 +02:00
Merge pull request #278 from marineam/deprecate
feat(core_promote): Mark old GCE images as deprecated.
This commit is contained in:
commit
bf9795c976
13
core_promote
13
core_promote
@ -106,6 +106,19 @@ if [[ ${FLAGS_do_gce} -eq ${FLAGS_TRUE} ]]; then
|
|||||||
gsutil cp "${gce_temp}" "${gs_release}/coreos_production_gce.txt"
|
gsutil cp "${gce_temp}" "${gs_release}/coreos_production_gce.txt"
|
||||||
rm -f "${gce_temp}"
|
rm -f "${gce_temp}"
|
||||||
trap - EXIT
|
trap - EXIT
|
||||||
|
|
||||||
|
# Set the DEPRECATED on all old images in this channel.
|
||||||
|
for old_name in $(gcutil --project coreos-cloud \
|
||||||
|
listimages --nostandard_images --format=names \
|
||||||
|
--filter="name eq '^coreos-${lower_channel}-.*'")
|
||||||
|
do
|
||||||
|
if [[ "${old_name}" == "${gce_name}" ]]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
gcutil --project coreos-cloud \
|
||||||
|
deprecateimage --state=DEPRECATED \
|
||||||
|
--replacement="${gce_name}" "${old_name}"
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ${FLAGS_do_storage} -eq ${FLAGS_TRUE} ]]; then
|
if [[ ${FLAGS_do_storage} -eq ${FLAGS_TRUE} ]]; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user