#/bin/bash
# NOTE: Create a separate project for each platform/branch you're building
# For a Mac client (substitute SOURCE_URL and SOURCE_REF to build a specific PR or fork):
oc new-app -f https://raw.githubusercontent.com/csrwng/build-origin/master/origin-builder.yaml \
-p SOURCE_URL=https://github.com/openshift/origin.git \
-p SOURCE_REF=master \
-p PLATFORM=darwin/amd64
# For a Windows client:
oc new-app -f https://raw.githubusercontent.com/csrwng/build-origin/master/origin-builder.yaml \
-p SOURCE_URL=https://github.com/openshift/origin.git \
-p SOURCE_REF=master \
-p PLATFORM=windows/amd64
# For Linux client:
oc new-app -f https://raw.githubusercontent.com/csrwng/build-origin/master/origin-builder.yaml \
-p SOURCE_URL=https://github.com/openshift/origin.git \
-p SOURCE_REF=master \
-p PLATFORM=windows/amd64
# Watch for endpoints of the service to be available... when available, the build is finished.
oc get endpoints build-origin --watch
# Once the build is finished, the oc binary can be downloaded via HTTP via an exposed route
oc get route build-origin
# Download from the route host:
curl -O http://[route-host]/[platform]/amd64/oc[.exe]
# To rebuild from the same branch/ref, simple start the build again (no need to recreate artifacts):
oc start-build build-origin