Skip to content

Commit

Permalink
Upload "naked" binaries with releases.
Browse files Browse the repository at this point in the history
  • Loading branch information
jbeda committed Nov 19, 2014
1 parent df844e3 commit eb8df9e
Showing 1 changed file with 23 additions and 5 deletions.
28 changes: 23 additions & 5 deletions build/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ readonly KUBE_RUN_IMAGES=(


# This is where the final release artifacts are created locally
readonly RELEASE_STAGE="${LOCAL_OUTPUT_ROOT}/release-stage"
readonly RELEASE_DIR="${LOCAL_OUTPUT_ROOT}/release-tars"

# ---------------------------------------------------------------------------
Expand Down Expand Up @@ -484,7 +485,7 @@ function kube::release::package_client_tarballs() {
local platform_tag=${platform/\//-} # Replace a "/" for a "-"
echo "+++ Building tarball: client $platform_tag"

local release_stage="${LOCAL_OUTPUT_ROOT}/release-stage/client/${platform_tag}/kubernetes"
local release_stage="${RELEASE_STAGE}/client/${platform_tag}/kubernetes"
rm -rf "${release_stage}"
mkdir -p "${release_stage}/client/bin"

Expand All @@ -506,7 +507,7 @@ function kube::release::package_server_tarballs() {
local platform_tag=${platform/\//-} # Replace a "/" for a "-"
echo "+++ Building tarball: server $platform_tag"

local release_stage="${LOCAL_OUTPUT_ROOT}/release-stage/server/${platform_tag}/kubernetes"
local release_stage="${RELEASE_STAGE}/server/${platform_tag}/kubernetes"
rm -rf "${release_stage}"
mkdir -p "${release_stage}/server/bin"

Expand All @@ -530,7 +531,7 @@ function kube::release::package_server_tarballs() {
function kube::release::package_salt_tarball() {
echo "+++ Building tarball: salt"

local release_stage="${LOCAL_OUTPUT_ROOT}/release-stage/salt/kubernetes"
local release_stage="${RELEASE_STAGE}/salt/kubernetes"
rm -rf "${release_stage}"
mkdir -p "${release_stage}"

Expand All @@ -548,7 +549,7 @@ function kube::release::package_salt_tarball() {
function kube::release::package_full_tarball() {
echo "+++ Building tarball: full"

local release_stage="${LOCAL_OUTPUT_ROOT}/release-stage/full/kubernetes"
local release_stage="${RELESAE_STAGE}/full/kubernetes"
rm -rf "${release_stage}"
mkdir -p "${release_stage}"

Expand Down Expand Up @@ -748,7 +749,24 @@ function kube::release::gcs::copy_release_artifacts() {

# Having the "template" scripts from the GCE cluster deploy hosted with the
# release is useful for GKE. Copy everything from that directory up also.
gsutil -m "${gcs_options[@]+${gcs_options[@]}}" cp "${LOCAL_OUTPUT_ROOT}/release-stage/full/kubernetes/cluster/gce/templates/*.sh" "${gcs_destination}extra/gce-templates/"
gsutil -m "${gcs_options[@]+${gcs_options[@]}}" cp \
"${RELEASE_STAGE}/full/kubernetes/cluster/gce/templates/*.sh" \
"${gcs_destination}extra/gce-templates/"

# Upload the "naked" binaries to GCS. This is useful for install scripts that
# download the binaries directly and don't need tars.
local platform platforms
platforms=($(cd "${RELEASE_STAGE}/client" ; echo *))
for platform in "${platforms[@]}"; do
local src="${RELEASE_STAGE}/client/${platform}/kubernetes/client/bin/*"
local dst="${gcs_destination}bin/${platform/-//}/"
# We assume here the "server package" is a superset of the "client package"
if [[ -d "${RELEASE_STAGE}/server/${platform}" ]]; then
src="${RELEASE_STAGE}/server/${platform}/kubernetes/server/bin/*"
fi
gsutil -m "${gcs_options[@]+${gcs_options[@]}}" cp \
"$src" "$dst"
done

# TODO(jbeda): Generate an HTML page with links for this release so it is easy
# to see it. For extra credit, generate a dynamic page that builds up the
Expand Down

0 comments on commit eb8df9e

Please sign in to comment.