Skip to content

Commit

Permalink
Build docker/distribution using vendor directory
Browse files Browse the repository at this point in the history
  • Loading branch information
legionus committed Jun 8, 2016
1 parent bba3a7d commit 4390dad
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
6 changes: 6 additions & 0 deletions hack/build-cross.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ os::build::build_binaries "${OS_CROSS_COMPILE_TARGETS[@]}"
OS_BUILD_PLATFORMS=("${OS_IMAGE_COMPILE_PLATFORMS[@]-}")
os::build::build_static_binaries "${OS_IMAGE_COMPILE_TARGETS[@]-}" "${OS_SCRATCH_IMAGE_COMPILE_TARGETS[@]-}"

# Build dockerregistry
(
export GO15VENDOREXPERIMENT=1
os::build::build_static_binaries "${OS_IMAGE_COMPILE_DOCKERREGISTRY_TARGETS[@]-}"
)

# Make the primary client/server release.
OS_RELEASE_ARCHIVE="openshift-origin"
OS_BUILD_PLATFORMS=("${platforms[@]}")
Expand Down
9 changes: 7 additions & 2 deletions hack/build-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,14 @@ if [[ "${OS_RELEASE:-}" == "n" ]]; then
OS_BUILD_PLATFORMS=("${OS_IMAGE_COMPILE_PLATFORMS[@]-}")

echo "Building images from source ${OS_RELEASE_COMMIT}:"
echo
echo
os::build::build_static_binaries "${OS_IMAGE_COMPILE_TARGETS[@]-}" "${OS_SCRATCH_IMAGE_COMPILE_TARGETS[@]-}"
os::build::place_bins "${OS_IMAGE_COMPILE_BINARIES[@]}"
# Build dockerregistry
(
export GO15VENDOREXPERIMENT=1
os::build::build_static_binaries "${OS_IMAGE_COMPILE_DOCKERREGISTRY_TARGETS[@]-}"
)
os::build::place_bins "${OS_IMAGE_COMPILE_BINARIES[@]}"
echo
else
# Get the latest Linux release
Expand Down
6 changes: 4 additions & 2 deletions hack/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,16 @@ readonly OS_IMAGE_COMPILE_PLATFORMS=(
)
readonly OS_IMAGE_COMPILE_TARGETS=(
images/pod
cmd/dockerregistry
cmd/gitserver
)
readonly OS_IMAGE_COMPILE_DOCKERREGISTRY_TARGETS=(
cmd/dockerregistry
)
readonly OS_SCRATCH_IMAGE_COMPILE_TARGETS=(
examples/hello-openshift
examples/deployment
)
readonly OS_IMAGE_COMPILE_BINARIES=("${OS_SCRATCH_IMAGE_COMPILE_TARGETS[@]##*/}" "${OS_IMAGE_COMPILE_TARGETS[@]##*/}")
readonly OS_IMAGE_COMPILE_BINARIES=("${OS_SCRATCH_IMAGE_COMPILE_TARGETS[@]##*/}" "${OS_IMAGE_COMPILE_TARGETS[@]##*/}" "${OS_IMAGE_COMPILE_DOCKERREGISTRY_TARGETS[@]##*/}")

readonly OS_CROSS_COMPILE_PLATFORMS=(
linux/amd64
Expand Down

0 comments on commit 4390dad

Please sign in to comment.