diff --git a/hack/build.sh b/hack/build.sh index 604c620e463..1b4add595ba 100755 --- a/hack/build.sh +++ b/hack/build.sh @@ -28,6 +28,10 @@ export CGO_ENABLED=0 case "${MODE}" in release) TAGS="${TAGS} release" + if test -n "${OPENSHIFT_INSTALL_RELEASE_IMAGE}" + then + LDFLAGS="${LDFLAGS} -X github.com/openshift/installer/pkg/asset/ignition/bootstrap.defaultReleaseImage=${OPENSHIFT_INSTALL_RELEASE_IMAGE}" + fi if test "${SKIP_GENERATION}" != y then go generate ./data diff --git a/pkg/asset/ignition/bootstrap/bootstrap.go b/pkg/asset/ignition/bootstrap/bootstrap.go index e685af4877e..74f9c2b666f 100644 --- a/pkg/asset/ignition/bootstrap/bootstrap.go +++ b/pkg/asset/ignition/bootstrap/bootstrap.go @@ -30,10 +30,13 @@ import ( const ( rootDir = "/opt/tectonic" - defaultReleaseImage = "registry.svc.ci.openshift.org/openshift/origin-release:v4.0" bootstrapIgnFilename = "bootstrap.ign" ) +var ( + defaultReleaseImage = "registry.svc.ci.openshift.org/openshift/origin-release:v4.0" +) + // bootstrapTemplateData is the data to use to replace values in bootstrap // template files. type bootstrapTemplateData struct {