Skip to content

Commit

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

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.198",
    "timestamp": "2018-12-08T23:13:22Z"
  }

And Clayton just pushed 4.0.0-alpha.0-2018-12-07-090414
quay.io/openshift-release-dev/ocp-release:4.0.0-4.  That's not the
most recent release, but it's the most-recent stable release ;).

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).
  • Loading branch information
wking committed Dec 8, 2018
1 parent dcc8077 commit 5a49c4e
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/openshift"
defaultReleaseImage = "registry.svc.ci.openshift.org/openshift/origin-release:v4.0"
defaultReleaseImage = "quay.io/openshift-release-dev/ocp-release:4.0.0-4"
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 5a49c4e

Please sign in to comment.