Skip to content

Commit

Permalink
hack/build: Pin to RHCOS 400.7.20190306.0
Browse files Browse the repository at this point in the history
This is the most recent RHCOS:

  $ curl -s https://releases-rhcos.svc.ci.openshift.org/storage/releases/maipo/builds.json | jq '{"latest": .builds[0], timestamp}'
  {
    "latest": "400.7.20190306.0",
    "timestamp": "2019-03-06T22:24:53Z"
  }

I'd prefer to pull this from the release image:

  $ oc adm release info --pullspecs quay.io/openshift-release-dev/ocp-release:4.0.0-0.7 | grep machine-os-content
    machine-os-content                            quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:399582f711226ab1a0e76d8928ec55436dea9f8dc60976c10790d308b9d92181
  $ oc image info quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:399582f711226ab1a0e76d8928ec55436dea9f8dc60976c10790d308b9d92181 | grep version
              version=47.330

But [1] isn't green yet, so hard-coding here is a quick fix.

Supported regions:

  $ curl -s https://releases-rhcos.svc.ci.openshift.org/storage/releases/maipo/400.7.20190306.0/meta.json | jq -r '.amis[] | .name'
  ap-northeast-1
  ap-northeast-2
  ap-south-1
  ap-southeast-1
  ap-southeast-2
  ca-central-1
  eu-central-1
  eu-west-1
  eu-west-2
  eu-west-3
  sa-east-1
  us-east-1
  us-east-2
  us-west-1
  us-west-2

[1]: #1286
  • Loading branch information
wking committed Mar 12, 2019
1 parent 5455c4a commit bd88157
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 16 deletions.
2 changes: 2 additions & 0 deletions hack/build.sh
Expand Up @@ -2,6 +2,8 @@

set -ex

RHCOS_BUILD_NAME="${RHCOS_BUILD_NAME:-400.7.20190306.0}"

# shellcheck disable=SC2068
version() { IFS="."; printf "%03d%03d%03d\\n" $@; unset IFS;}

Expand Down
30 changes: 15 additions & 15 deletions pkg/types/aws/validation/platform.go
Expand Up @@ -15,25 +15,25 @@ var (
Regions = map[string]string{
"ap-northeast-1": "Tokyo",
"ap-northeast-2": "Seoul",
"ap-northeast-3": "Osaka-Local",
//"ap-northeast-3": "Osaka-Local",
"ap-south-1": "Mumbai",
"ap-southeast-1": "Singapore",
"ap-southeast-2": "Sydney",
"ca-central-1": "Central",
"cn-north-1": "Beijing",
"cn-northwest-1": "Ningxia",
"eu-central-1": "Frankfurt",
"eu-north-1": "Stockholm",
"eu-west-1": "Ireland",
"eu-west-2": "London",
"eu-west-3": "Paris",
"sa-east-1": "São Paulo",
"us-east-1": "N. Virginia",
"us-east-2": "Ohio",
"us-gov-east-1": "AWS GovCloud (US-East)",
"us-gov-west-1": "AWS GovCloud (US-West)",
"us-west-1": "N. California",
"us-west-2": "Oregon",
//"cn-north-1": "Beijing",
//"cn-northwest-1": "Ningxia",
"eu-central-1": "Frankfurt",
//"eu-north-1": "Stockholm",
"eu-west-1": "Ireland",
"eu-west-2": "London",
"eu-west-3": "Paris",
"sa-east-1": "São Paulo",
"us-east-1": "N. Virginia",
"us-east-2": "Ohio",
//"us-gov-east-1": "AWS GovCloud (US-East)",
//"us-gov-west-1": "AWS GovCloud (US-West)",
"us-west-1": "N. California",
"us-west-2": "Oregon",
}

validRegionValues = func() []string {
Expand Down
2 changes: 1 addition & 1 deletion pkg/types/validation/installconfig_test.go
Expand Up @@ -370,7 +370,7 @@ func TestValidateInstallConfig(t *testing.T) {
}
return c
}(),
expectedError: `^platform\.aws\.region: Unsupported value: "": supported values: "ap-northeast-1", "ap-northeast-2", "ap-northeast-3", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ca-central-1", "cn-north-1", "cn-northwest-1", "eu-central-1", "eu-north-1", "eu-west-1", "eu-west-2", "eu-west-3", "sa-east-1", "us-east-1", "us-east-2", "us-gov-east-1", "us-gov-west-1", "us-west-1", "us-west-2"$`,
expectedError: `^platform\.aws\.region: Unsupported value: "": supported values: "ap-northeast-1", "ap-northeast-2", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ca-central-1", "eu-central-1", "eu-west-1", "eu-west-2", "eu-west-3", "sa-east-1", "us-east-1", "us-east-2", "us-west-1", "us-west-2"$`,
},
{
name: "valid libvirt platform",
Expand Down

0 comments on commit bd88157

Please sign in to comment.