Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions hack/build-cross.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,23 +41,23 @@ fi
if [[ -n "${OS_ONLY_BUILD_PLATFORMS-}" ]]; then
filtered=( )
for platform in ${platforms[@]}; do
if [[ "${platform}" =~ "${OS_ONLY_BUILD_PLATFORMS}" ]]; then
if [[ "${platform}" =~ ${OS_ONLY_BUILD_PLATFORMS} ]]; then
filtered+=("${platform}")
fi
done
platforms=("${filtered[@]+"${filtered[@]}"}")

filtered=( )
for platform in ${image_platforms[@]}; do
if [[ "${platform}" =~ "${OS_ONLY_BUILD_PLATFORMS}" ]]; then
if [[ "${platform}" =~ ${OS_ONLY_BUILD_PLATFORMS} ]]; then
filtered+=("${platform}")
fi
done
image_platforms=("${filtered[@]+"${filtered[@]}"}")

filtered=( )
for platform in ${test_platforms[@]}; do
if [[ "${platform}" =~ "${OS_ONLY_BUILD_PLATFORMS}" ]]; then
if [[ "${platform}" =~ ${OS_ONLY_BUILD_PLATFORMS} ]]; then
filtered+=("${platform}")
fi
done
Expand Down
14 changes: 8 additions & 6 deletions hack/lib/build/binaries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -335,12 +335,14 @@ function os::build::place_bins() {
if [[ $platform == "windows/amd64" ]]; then
suffix=".exe"
fi
for linkname in "${OC_BINARY_COPY[@]}"; do
local src="${OS_OUTPUT_BINPATH}/${platform}/oc${suffix}"
if [[ -f "${src}" ]]; then
ln -f "$src" "${OS_OUTPUT_BINPATH}/${platform}/${linkname}${suffix}"
fi
done
if [[ "${OS_RELEASE_WITHOUT_LINKS-}" == "" ]]; then
for linkname in "${OC_BINARY_COPY[@]}"; do
local src="${OS_OUTPUT_BINPATH}/${platform}/oc${suffix}"
if [[ -f "${src}" ]]; then
ln -f "$src" "${OS_OUTPUT_BINPATH}/${platform}/${linkname}${suffix}"
fi
done
fi

# If no release archive was requested, we're done.
if [[ "${OS_RELEASE_ARCHIVE-}" == "" ]]; then
Expand Down
12 changes: 12 additions & 0 deletions images/cli-artifacts/Dockerfile.rhel
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This Dockerfile is a used by CI to publish openshift/origin-v4.0:installer-artifacts
# It builds an image containing the Mac version of the installer layered on top of the
# Linux installer image.

FROM registry.svc.ci.openshift.org/ocp/builder:golang-1.10 AS builder
WORKDIR /go/src/github.com/openshift/origin
COPY . .
RUN OS_RELEASE_WITHOUT_LINKS=y OS_BUILD_RELEASE_ARCHIVES=n OS_ONLY_BUILD_PLATFORMS="^(darwin|windows)/amd64$" bash -x hack/build-cross.sh

FROM registry.svc.ci.openshift.org/ocp/4.0:cli
COPY --from=builder /go/src/github.com/openshift/origin/_output/local/bin/darwin/amd64/oc /usr/share/openshift/mac/oc
COPY --from=builder /go/src/github.com/openshift/origin/_output/local/bin/windows/amd64/oc.exe /usr/share/openshift/windows/oc.exe