This seems to be the only place where we are using wget for
downloading anything - all other places use curl. Thus switch to curl
here too. This also makes the job output much shorter as previously it
was spammed with progress reporting.
Use FLATCAR_DEV_BUILDS only for setting up binpkg URLs, ceding the SDK
tarball URL role to the new FLATCAR_SDK_SERVERS variable. That way we
can still set up binpkg URLs the way we used to do so far and set up
SDK tarball URLs differently.
For two-phase SDK build, we would like to use intermediate SDK as a
seed. This SDK is only available on bincache, but previously only
nightly builds could use bincache as the source of SDK tarballs. Now,
with the URL split, we can set up the builds to use both bincache and
the release server, where release builds will prioritize release
server over bincache, and developer builds - bincache over release
server.
The bootstrap downloads the previous SDK currently only from bincache
but bincache isn't backed up and may be cleaned of old releases.
The SDK tar ball is also available on the mirror and allows the
bootstrap to succeed without copying the seed SDK to bincache first.
The dev build SDKs are not in $FLATCAR_DEV_BUILDS/sdk but published under
$FLATCAR_DEV_BUILDS/developer/sdk.
Add an environment variable to specify where the SDK is to be found
but default to $FLATCAR_DEV_BUILDS/sdk if it is not specified.
From Jenkins this variable is exported as DOWNLOAD_ROOT_SDK.
- Automated builds drop SDK and binary packages into
gs://builds.developer.core-os.net/ and the new download URL is
http://builds.developer.core-os.net/ (COREOS_DEV_BUILDS)
- Change default upload path to gs://users.developer.core-os.net/ for
misc developer builds. Official builds go elsewhere and will just be
configured in buildbot/jenkins so some COREOS_OFFICIAL stuff is gone.
- Automated builds of images go to a private bucket,
gs://builds.release.core-os.net which later gets copied to
gs://alpha.release.core-os.net and friends by core_promote.
Make it possible for other scripts to share the same value for our
release repository and equally easy to override with a custom value.
Also allow setting the root from the command line in addition to the
environment. Usually --upload_root is better to use than --upload_path.
The current logic for downloading SDK tarballs is in cros_sdk and
written in python which isn't super convenient for re-using in the rest
of our shell scripts. This is a start of rewriting that logic into a
re-usable library but does not yet replace the functionality in cros_sdk.