Skip to content
Closed
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
4 changes: 4 additions & 0 deletions hack/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ release)
then
LDFLAGS="${LDFLAGS} -X github.com/openshift/installer/pkg/rhcos.buildName=${RHCOS_BUILD_NAME}"
fi
if test -n "${RHCOS_BUILD_URL}"
then
LDFLAGS="${LDFLAGS} -X github.com/openshift/installer/pkg/rhcos.baseURL=${RHCOS_BUILD_URL}"
fi
if test "${SKIP_GENERATION}" != y
then
go generate ./data
Expand Down
8 changes: 8 additions & 0 deletions pkg/rhcos/builds.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"fmt"
"io/ioutil"
"net/http"
"os"

"github.com/pkg/errors"
"github.com/sirupsen/logrus"
Expand All @@ -22,6 +23,13 @@ var (
baseURL = "https://releases-rhcos.svc.ci.openshift.org/storage/releases"
)

func init() {
if or, ok := os.LookupEnv("OPENSHIFT_INSTALL_COREOS_IMAGE_URL"); ok && or != "" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why COREOS and not RHCOS ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess I'd vaguely thought that we want to enable e.g. pointing the installer at a custom Fedora CoreOS build with kubelet for testing.

logrus.Warn("Found override for OS BASE URL. Untrusted repository will be used. This is not advised")
baseURL = or
}
}

type metadata struct {
AMIs []struct {
HVM string `json:"hvm"`
Expand Down