diff --git a/hack/build-cross.sh b/hack/build-cross.sh index 2ac4e27b82d9..1013dcbc7856 100755 --- a/hack/build-cross.sh +++ b/hack/build-cross.sh @@ -41,7 +41,7 @@ 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 @@ -49,7 +49,7 @@ if [[ -n "${OS_ONLY_BUILD_PLATFORMS-}" ]]; then 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 @@ -57,7 +57,7 @@ if [[ -n "${OS_ONLY_BUILD_PLATFORMS-}" ]]; then 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 diff --git a/hack/lib/build/binaries.sh b/hack/lib/build/binaries.sh index 22c90dc60de6..3b11bc221c8b 100644 --- a/hack/lib/build/binaries.sh +++ b/hack/lib/build/binaries.sh @@ -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 diff --git a/images/cli-artifacts/Dockerfile.rhel b/images/cli-artifacts/Dockerfile.rhel new file mode 100644 index 000000000000..ec93ddd484f0 --- /dev/null +++ b/images/cli-artifacts/Dockerfile.rhel @@ -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