Skip to content

Commit

Permalink
pkg: Pin to RHCOS 47.167 and quay.io/openshift-release-dev/ocp-releas…
Browse files Browse the repository at this point in the history
…e:4.0.0-3

That's the latest RHCOS release:

  $ curl -s https://releases-rhcos.svc.ci.openshift.org/storage/releases/maipo/builds.json | jq '{latest: .builds[0], timestamp}'
  {
    "latest": "47.165",
    "timestamp": "2018-12-02T06:41:22Z"
  }

And Clayton just pushed 4.0.0-0.alpha-2018-12-02-020136 to
quay.io/openshift-release-dev/ocp-release:4.0.0-3 [1].

Renaming OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE gets us CI testing
of the pinned release despite openshift/release@60007df2 (Use
RELEASE_IMAGE_LATEST for CVO payload, 2018-10-03,
openshift/release#1793).

[1]: #772 (comment)
  • Loading branch information
wking committed Dec 3, 2018
1 parent c2263f6 commit 43e1458
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pkg/asset/ignition/bootstrap/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (

const (
rootDir = "/opt/tectonic"
defaultReleaseImage = "registry.svc.ci.openshift.org/openshift/origin-release:v4.0"
defaultReleaseImage = "quay.io/openshift-release-dev/ocp-release:4.0.0-3"
bootstrapIgnFilename = "bootstrap.ign"
)

Expand Down Expand Up @@ -141,7 +141,7 @@ func (a *Bootstrap) getTemplateData(installConfig *types.InstallConfig, adminKub
}

releaseImage := defaultReleaseImage
if ri, ok := os.LookupEnv("OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE"); ok && ri != "" {
if ri, ok := os.LookupEnv("_OPENSHIFT_INSTALL_RELEASE_IMAGE_OVERRIDE"); ok && ri != "" {
logrus.Warn("Found override for ReleaseImage. Please be warned, this is not advised")
releaseImage = ri
}
Expand Down
12 changes: 9 additions & 3 deletions pkg/rhcos/builds.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,15 @@ type metadata struct {
}

func fetchLatestMetadata(ctx context.Context, channel string) (metadata, error) {
build, err := fetchLatestBuild(ctx, channel)
if err != nil {
return metadata{}, errors.Wrap(err, "failed to fetch latest build")
var build string
var err error
if channel == DefaultChannel {
build = "47.165"
} else {
build, err = fetchLatestBuild(ctx, channel)
if err != nil {
return metadata{}, errors.Wrap(err, "failed to fetch latest build")
}
}

url := fmt.Sprintf("%s/%s/%s/meta.json", baseURL, channel, build)
Expand Down

0 comments on commit 43e1458

Please sign in to comment.