Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use serverless-ci cluster pool #134

Merged
merged 6 commits into from Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/eventing-hyperfoil-benchmark.yaml
Expand Up @@ -2,7 +2,7 @@ config:
branches:
main:
openShiftVersions:
- version: "4.14"
- version: "4.15"
repositories:
- dockerfiles: {}
e2e:
Expand Down
10 changes: 5 additions & 5 deletions config/eventing-istio.yaml
Expand Up @@ -2,28 +2,28 @@ config:
branches:
release-next:
openShiftVersions:
- version: "4.14"
- version: "4.15"
- onDemand: true
version: "4.12"
release-v1.10:
openShiftVersions:
- skipCron: true
version: "4.14"
version: "4.15"
release-v1.11:
openShiftVersions:
- skipCron: true
version: "4.14"
version: "4.15"
- onDemand: true
skipCron: true
version: "4.12"
release-v1.12:
openShiftVersions:
- version: "4.14"
- version: "4.15"
- onDemand: true
version: "4.12"
release-v1.13:
openShiftVersions:
- version: "4.14"
- version: "4.15"
- onDemand: true
version: "4.12"
repositories:
Expand Down
10 changes: 5 additions & 5 deletions config/eventing-kafka-broker.yaml
Expand Up @@ -2,27 +2,27 @@ config:
branches:
release-next:
openShiftVersions:
- version: "4.14"
- version: "4.15"
- onDemand: true
version: "4.12"
release-v1.10:
openShiftVersions:
- skipCron: true
version: "4.14"
version: "4.15"
release-v1.11:
openShiftVersions:
- skipCron: true
version: "4.14"
version: "4.15"
- onDemand: true
version: "4.12"
release-v1.12:
openShiftVersions:
- version: "4.14"
- version: "4.15"
- onDemand: true
version: "4.12"
release-v1.13:
openShiftVersions:
- version: "4.14"
- version: "4.15"
- onDemand: true
version: "4.12"
repositories:
Expand Down
10 changes: 5 additions & 5 deletions config/eventing.yaml
Expand Up @@ -2,27 +2,27 @@ config:
branches:
release-next:
openShiftVersions:
- version: "4.14"
- version: "4.15"
- version: "4.12"
release-v1.10:
openShiftVersions:
- skipCron: true
version: "4.14"
version: "4.15"
release-v1.11:
openShiftVersions:
- skipCron: true
version: "4.14"
version: "4.15"
- onDemand: true
skipCron: true
version: "4.12"
release-v1.12:
openShiftVersions:
- version: "4.14"
- version: "4.15"
- onDemand: true
version: "4.12"
release-v1.13:
openShiftVersions:
- version: "4.14"
- version: "4.15"
- onDemand: true
version: "4.12"
repositories:
Expand Down
12 changes: 6 additions & 6 deletions config/serverless-operator.yaml
Expand Up @@ -4,7 +4,7 @@ config:
openShiftVersions:
- cron: 0 3 * * *
generateCustomConfigs: true
version: "4.14"
version: "4.15"
- cron: 0 5 * * *
onDemand: true
version: "4.12"
Expand Down Expand Up @@ -137,18 +137,18 @@ repositories:
releaseBuildConfiguration:
base_images:
hypershift-operator:
name: "4.14"
name: "4.15"
namespace: ocp
tag: hypershift-operator
upi-installer:
name: "4.14"
name: "4.15"
namespace: ocp
tag: upi-installer
releases:
latest:
integration:
include_built_images: true
name: "4.14"
name: "4.15"
namespace: ocp
tests:
- as: e2e-hypershift-continuous
Expand Down Expand Up @@ -207,7 +207,7 @@ repositories:
cluster_profile: osd-ephemeral
env:
CLUSTER_DURATION: "10800"
CLUSTER_VERSION: "4.14"
CLUSTER_VERSION: "4.15"
COMPUTE_NODES: "4"
post:
- chain: gather
Expand Down Expand Up @@ -266,7 +266,7 @@ repositories:
releaseBuildConfiguration:
base_images:
upi-installer:
name: "4.14"
name: "4.15"
namespace: ocp
tag: upi-installer
tests:
Expand Down
8 changes: 4 additions & 4 deletions config/serving-net-istio.yaml
Expand Up @@ -2,22 +2,22 @@ config:
branches:
release-v1.10:
openShiftVersions:
- version: "4.14"
- version: "4.15"
release-v1.11:
openShiftVersions:
- skipCron: true
version: "4.14"
version: "4.15"
- onDemand: true
skipCron: true
version: "4.12"
release-v1.12:
openShiftVersions:
- version: "4.14"
- version: "4.15"
- onDemand: true
version: "4.12"
release-v1.13:
openShiftVersions:
- version: "4.14"
- version: "4.15"
- onDemand: true
version: "4.12"
repositories:
Expand Down
8 changes: 4 additions & 4 deletions config/serving-net-kourier.yaml
Expand Up @@ -3,22 +3,22 @@ config:
release-v1.10:
openShiftVersions:
- skipCron: true
version: "4.14"
version: "4.15"
release-v1.11:
openShiftVersions:
- skipCron: true
version: "4.14"
version: "4.15"
- onDemand: true
skipCron: true
version: "4.12"
release-v1.12:
openShiftVersions:
- version: "4.14"
- version: "4.15"
- onDemand: true
version: "4.12"
release-v1.13:
openShiftVersions:
- version: "4.14"
- version: "4.15"
- onDemand: true
version: "4.12"
repositories:
Expand Down
10 changes: 5 additions & 5 deletions config/serving.yaml
Expand Up @@ -2,7 +2,7 @@ config:
branches:
release-next:
openShiftVersions:
- version: "4.14"
- version: "4.15"
- onDemand: true
version: "4.12"
skipDockerFilesMatches:
Expand All @@ -13,22 +13,22 @@ config:
release-v1.10:
openShiftVersions:
- skipCron: true
version: "4.14"
version: "4.15"
release-v1.11:
openShiftVersions:
- skipCron: true
version: "4.14"
version: "4.15"
- onDemand: true
skipCron: true
version: "4.12"
release-v1.12:
openShiftVersions:
- version: "4.14"
- version: "4.15"
- onDemand: true
version: "4.12"
release-v1.13:
openShiftVersions:
- version: "4.14"
- version: "4.15"
- onDemand: true
version: "4.12"
repositories:
Expand Down
1 change: 1 addition & 0 deletions pkg/prowgen/prowgen_config.go
Expand Up @@ -189,6 +189,7 @@ func NewGenerateConfigs(ctx context.Context, r Repository, cc CommonConfig, opts
}},
}
}

cfg := cioperatorapi.ReleaseBuildConfiguration{
Metadata: metadata,
InputConfiguration: cioperatorapi.InputConfiguration{
Expand Down
69 changes: 44 additions & 25 deletions pkg/prowgen/prowgen_tests.go
Expand Up @@ -21,9 +21,21 @@ import (
)

const (
cronTemplate = "%d %d * * 2,6"
seed = 12345
cronTemplate = "%d %d * * 2,6"
seed = 12345
// Name of the cluster profile for starting new clusters from scratch.
// Introduced in https://github.com/openshift/ci-tools/pull/3978
serverlessClusterProfile = "aws-serverless"
// Name of a base domain that was created in a hosted zone with same name
// in AWS under rh-serverless account. The cluster profile defined earlier has permissions
// to create subdomains for new clusters.
devclusterBaseDomain = "serverless.devcluster.openshift.com"
// Holds version of the existing cluster pool dedicated to OpenShift Serverless in CI.
// See https://docs.ci.openshift.org/docs/how-tos/cluster-claim/#existing-cluster-pools
clusterPoolVersion = "4.15"
// Name of the owner for the existing cluster pool.
// Introduced in https://github.com/openshift/release/pull/49904
clusterPoolOwner = "serverless-ci"
)

func DiscoverTests(r Repository, openShift OpenShift, sourceImageName string, skipE2ETestMatch []string, random *rand.Rand) ReleaseBuildConfigurationOption {
Expand All @@ -48,27 +60,32 @@ func DiscoverTests(r Repository, openShift OpenShift, sourceImageName string, sk
testTimeout = &prowapi.Duration{Duration: 4 * time.Hour}
}

clusterClaim := &cioperatorapi.ClusterClaim{
Product: cioperatorapi.ReleaseProductOCP,
Version: openShift.Version,
Architecture: cioperatorapi.ReleaseArchitectureAMD64,
Cloud: cioperatorapi.CloudAWS,
Owner: "openshift-ci",
Timeout: &prowapi.Duration{Duration: time.Hour},
}
var clusterProfile cioperatorapi.ClusterProfile
workflow := pointer.String("generic-claim")
var env cioperatorapi.TestEnvironment
if openShift.CandidateRelease {
clusterClaim = nil
if strings.Contains(r.RepositoryDirectory(), "serverless-operator") {
// Use the shared profile for s-o.
clusterProfile = "aws"
} else {
clusterProfile = "aws-serverless"
env = map[string]string{
"BASE_DOMAIN": devclusterBaseDomain,
}
var (
clusterClaim *cioperatorapi.ClusterClaim
clusterProfile cioperatorapi.ClusterProfile
workflow *string
env cioperatorapi.TestEnvironment
)

useClusterPool := openShift.Version == clusterPoolVersion
// Make sure to use the existing cluster pool if available for the given OpenShift version.
if useClusterPool {
// ClusterClaim references the existing cluster pool.
// Mutually exclusive with ClusterProfile.
clusterClaim = &cioperatorapi.ClusterClaim{
mgencur marked this conversation as resolved.
Show resolved Hide resolved
Product: cioperatorapi.ReleaseProductOCP,
Version: openShift.Version,
Architecture: cioperatorapi.ReleaseArchitectureAMD64,
Cloud: cioperatorapi.CloudAWS,
Owner: clusterPoolOwner,
Timeout: &prowapi.Duration{Duration: time.Hour},
}
workflow = pointer.String("generic-claim")
} else {
// References the existing cluster profile in CI.
clusterProfile = serverlessClusterProfile
env = map[string]string{
"BASE_DOMAIN": devclusterBaseDomain,
}
workflow = pointer.String("ipi-aws")
}
Expand Down Expand Up @@ -154,7 +171,7 @@ func DiscoverTests(r Repository, openShift OpenShift, sourceImageName string, sk
},
}

if openShift.CandidateRelease {
if !useClusterPool {
testConfiguration.MultiStageTestConfiguration.Post =
append(testConfiguration.MultiStageTestConfiguration.Post,
cioperatorapi.TestStep{
Expand Down Expand Up @@ -187,7 +204,9 @@ func DiscoverTests(r Repository, openShift OpenShift, sourceImageName string, sk
}
// Periodic jobs gather artifacts on both failure/success.
for _, postStep := range cronTestConfiguration.MultiStageTestConfiguration.Post {
postStep.OptionalOnSuccess = pointer.Bool(false)
if postStep.LiteralTestStep != nil && strings.Contains(postStep.LiteralTestStep.As, "gather") {
postStep.OptionalOnSuccess = pointer.Bool(false)
}
}
cfg.Tests = append(cfg.Tests, *cronTestConfiguration)
}
Expand Down