mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-11 06:56:58 +02:00
Merge pull request #772 from bgilbert/transfer
offline_signing: download/upload torcx manifests
This commit is contained in:
commit
e71113404d
@ -29,9 +29,21 @@ download() {
|
|||||||
"${gs}/coreos_production_update.zip" \
|
"${gs}/coreos_production_update.zip" \
|
||||||
"${gs}/coreos_production_update.zip.sig" ./
|
"${gs}/coreos_production_update.zip.sig" ./
|
||||||
|
|
||||||
|
# torcx manifest: try embargoed release bucket first
|
||||||
|
local torcx_base="gs://builds.release.core-os.net/embargoed/devfiles/torcx/manifests/${board}/${version}"
|
||||||
|
if ! gsutil -q stat "${torcx_base}/torcx_manifest.json"; then
|
||||||
|
# Non-embargoed release
|
||||||
|
local torcx_base="gs://builds.developer.core-os.net/torcx/manifests/${board}/${version}"
|
||||||
|
fi
|
||||||
|
gsutil -m cp \
|
||||||
|
"${torcx_base}/torcx_manifest.json" \
|
||||||
|
"${torcx_base}/torcx_manifest.json.sig" \
|
||||||
|
./
|
||||||
|
|
||||||
gpg2 --verify "coreos_production_image.vmlinuz.sig"
|
gpg2 --verify "coreos_production_image.vmlinuz.sig"
|
||||||
gpg2 --verify "coreos_production_update.bin.bz2.sig"
|
gpg2 --verify "coreos_production_update.bin.bz2.sig"
|
||||||
gpg2 --verify "coreos_production_update.zip.sig"
|
gpg2 --verify "coreos_production_update.zip.sig"
|
||||||
|
gpg2 --verify "torcx_manifest.json.sig"
|
||||||
|
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
}
|
}
|
||||||
@ -41,11 +53,17 @@ upload() {
|
|||||||
local version="$2"
|
local version="$2"
|
||||||
local board="$3"
|
local board="$3"
|
||||||
|
|
||||||
local payload="${BASEDIR}/${board}/${version}/coreos_production_update.gz"
|
local dir="${BASEDIR}/${board}/${version}"
|
||||||
if [[ ! -e "${payload}" ]]; then
|
local payload="${dir}/coreos_production_update.gz"
|
||||||
echo "No such file: ${payload}" >&2
|
local torcx_manifest="${dir}/torcx_manifest.json"
|
||||||
exit 1
|
local torcx_manifest_sig="${dir}/torcx_manifest.json.asc"
|
||||||
fi
|
local path
|
||||||
|
for path in "${payload}" "${torcx_manifest}" "${torcx_manifest_sig}"; do
|
||||||
|
if [[ ! -e "${path}" ]]; then
|
||||||
|
echo "No such file: ${path}" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
"$(dirname $0)/../core_roller_upload" \
|
"$(dirname $0)/../core_roller_upload" \
|
||||||
--user="${ROLLER_USERNAME}" \
|
--user="${ROLLER_USERNAME}" \
|
||||||
@ -55,6 +73,12 @@ upload() {
|
|||||||
--version="${version}" \
|
--version="${version}" \
|
||||||
--payload="${payload}"
|
--payload="${payload}"
|
||||||
|
|
||||||
|
# Upload torcx manifests
|
||||||
|
gsutil cp \
|
||||||
|
"${torcx_manifest}" \
|
||||||
|
"${torcx_manifest_sig}" \
|
||||||
|
"gs://coreos-tectonic-torcx/manifests/${board}/${version}/"
|
||||||
|
|
||||||
# Update version in a canary channel if one is defined.
|
# Update version in a canary channel if one is defined.
|
||||||
local -n canary_channel="ROLLER_CANARY_CHANNEL_${channel^^}"
|
local -n canary_channel="ROLLER_CANARY_CHANNEL_${channel^^}"
|
||||||
if [[ -n "${canary_channel}" ]]; then
|
if [[ -n "${canary_channel}" ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user