diff --git a/cmd/ci-operator-prowgen/main.go b/cmd/ci-operator-prowgen/main.go index 3a0b2eee9ce..88dfe707ae4 100644 --- a/cmd/ci-operator-prowgen/main.go +++ b/cmd/ci-operator-prowgen/main.go @@ -20,6 +20,7 @@ import ( cioperatorapi "github.com/openshift/ci-tools/pkg/api" "github.com/openshift/ci-tools/pkg/config" + "github.com/openshift/ci-tools/pkg/jobconfig" jc "github.com/openshift/ci-tools/pkg/jobconfig" "github.com/openshift/ci-tools/pkg/promotion" ) @@ -32,10 +33,6 @@ const ( sentryDsnMountPath = "/etc/sentry-dsn" sentryDsnSecretPath = "/etc/sentry-dsn/ci-operator" - presubmitPrefix = "pull" - postsubmitPrefix = "branch" - periodicPrefix = "periodic" - openshiftInstallerRandomCmd = `set -eux target=$(awk < /usr/local/e2e-targets \ --assign "r=$RANDOM" \ @@ -558,11 +555,10 @@ func generateJobBase(name, prefix string, info *prowgenInfo, label jc.ProwgenLab labels[jc.CanBeRehearsedLabel] = string(jc.Generated) } - jobPrefix := fmt.Sprintf("%s-ci-%s-%s-%s-", prefix, info.Org, info.Repo, info.Branch) + jobName := info.Info.JobName(prefix, name) if len(info.Variant) > 0 { labels[prowJobLabelVariant] = info.Variant } - jobName := fmt.Sprintf("%s%s", jobPrefix, name) newTrue := true dc := &v1.DecorationConfig{SkipCloning: &newTrue} base := prowconfig.JobBase{ @@ -588,7 +584,7 @@ func generatePresubmitForTest(name string, info *prowgenInfo, label jc.ProwgenLa if len(info.Variant) > 0 { name = fmt.Sprintf("%s-%s", info.Variant, name) } - base := generateJobBase(name, presubmitPrefix, info, label, podSpec, rehearsable, pathAlias) + base := generateJobBase(name, jobconfig.PresubmitPrefix, info, label, podSpec, rehearsable, pathAlias) return &prowconfig.Presubmit{ JobBase: base, AlwaysRun: true, @@ -605,7 +601,7 @@ func generatePostsubmitForTest(name string, info *prowgenInfo, label jc.ProwgenL if len(info.Variant) > 0 { name = fmt.Sprintf("%s-%s", info.Variant, name) } - base := generateJobBase(name, postsubmitPrefix, info, label, podSpec, false, pathAlias) + base := generateJobBase(name, jobconfig.PostsubmitPrefix, info, label, podSpec, false, pathAlias) return &prowconfig.Postsubmit{ JobBase: base, Brancher: prowconfig.Brancher{Branches: []string{makeBranchExplicit(info.Branch)}}, @@ -616,7 +612,7 @@ func generatePeriodicForTest(name string, info *prowgenInfo, label jc.ProwgenLab if len(info.Variant) > 0 { name = fmt.Sprintf("%s-%s", info.Variant, name) } - base := generateJobBase(name, periodicPrefix, info, label, podSpec, rehearsable, nil) + base := generateJobBase(name, jobconfig.PeriodicPrefix, info, label, podSpec, rehearsable, nil) // periodics are not associated with a repo per se, but we can add in an // extra ref so that periodics which want to access the repo tha they are // defined for can have that information diff --git a/cmd/pj-rehearse/main.go b/cmd/pj-rehearse/main.go index 3ef30b1d84f..ad40cf6b6fd 100644 --- a/cmd/pj-rehearse/main.go +++ b/cmd/pj-rehearse/main.go @@ -185,6 +185,26 @@ func rehearseMain() int { metrics.RecordChangedCiopConfigs(changedCiopConfigData) } + refs, chains, workflows, err := load.Registry(filepath.Join(o.releaseRepoPath, config.RegistryPath), false) + if err != nil { + logger.WithError(err).Error("could not load step registry") + return gracefulExit(o.noFail, misconfigurationOutput) + } + graph, err := registry.NewGraph(refs, chains, workflows) + if err != nil { + logger.WithError(err).Error("could not create step registry graph") + return gracefulExit(o.noFail, misconfigurationOutput) + } + changedRegistrySteps, err := config.GetChangedRegistrySteps(o.releaseRepoPath, jobSpec.Refs.BaseSHA, graph) + if err != nil { + logger.WithError(err).Error("could not get step registry differences") + return gracefulExit(o.noFail, misconfigurationOutput) + } + if len(changedRegistrySteps) != 0 { + logger.WithField("registry", changedRegistrySteps).Info("registry steps changed") + metrics.RecordChangedRegistryElements(changedRegistrySteps) + } + changedTemplates, err := config.GetChangedTemplates(o.releaseRepoPath, jobSpec.Refs.BaseSHA) if err != nil { logger.WithError(err).Error("could not get template differences") @@ -269,13 +289,11 @@ func rehearseMain() int { metrics.RecordPresubmitsOpportunity(toRehearseClusterProfiles, "cluster-profile-change") toRehearse.AddAll(toRehearseClusterProfiles) - refs, chains, workflows, err := load.Registry(filepath.Join(o.releaseRepoPath, config.RegistryPath), false) - if err != nil { - logger.WithError(err).Error("could not load step registry") - return gracefulExit(o.noFail, misconfigurationOutput) - } resolver := registry.NewResolver(refs, chains, workflows) jobConfigurer := rehearse.NewJobConfigurer(prConfig.CiOperator, resolver, prNumber, loggers, o.allowVolumes, changedTemplates, changedClusterProfiles, jobSpec.Refs) + presubmitsWithChangedRegistry := rehearse.AddRandomJobsForChangedRegistry(changedRegistrySteps, graph, prConfig.Prow.JobConfig.PresubmitsStatic, filepath.Join(o.releaseRepoPath, diffs.CIOperatorConfigInRepoPath), loggers) + metrics.RecordPresubmitsOpportunity(presubmitsWithChangedRegistry, "registry-change") + toRehearse.AddAll(presubmitsWithChangedRegistry) presubmitsToRehearse := jobConfigurer.ConfigurePresubmitRehearsals(toRehearse) periodicsToRehearse := jobConfigurer.ConfigurePeriodicRehearsals(changedPeriodics) diff --git a/pkg/config/load.go b/pkg/config/load.go index 1ff2c895be1..ca65aa23e8b 100644 --- a/pkg/config/load.go +++ b/pkg/config/load.go @@ -49,6 +49,10 @@ type Info struct { RepoPath string } +func (i *Info) JobName(prefix, name string) string { + return fmt.Sprintf("%s-ci-%s-%s-%s-%s", prefix, i.Org, i.Repo, i.Branch, name) +} + // Basename returns the unique name for this file in the config func (i *Info) Basename() string { basename := strings.Join([]string{i.Org, i.Repo, i.Branch}, "-") diff --git a/pkg/config/release.go b/pkg/config/release.go index 7f90ca6bc9b..82905b5f3f2 100644 --- a/pkg/config/release.go +++ b/pkg/config/release.go @@ -7,10 +7,11 @@ import ( "strings" "github.com/sirupsen/logrus" - pjapi "k8s.io/test-infra/prow/apis/prowjobs/v1" prowconfig "k8s.io/test-infra/prow/config" pjdwapi "k8s.io/test-infra/prow/pod-utils/downwardapi" + + "github.com/openshift/ci-tools/pkg/registry" ) const ( @@ -165,6 +166,48 @@ func GetChangedTemplates(path, baseRev string) ([]ConfigMapSource, error) { return ret, nil } +func loadRegistryStep(filename string, graph, changes registry.NodeByName) error { + // if a commands script changed, mark reference as changed + filename = strings.ReplaceAll(filename, "-commands.sh", "-ref.yaml") + name := "" + if strings.HasSuffix(filename, "-ref.yaml") { + name = strings.TrimSuffix(filename, "-ref.yaml") + } + if strings.HasSuffix(filename, "-chain.yaml") { + name = strings.TrimSuffix(filename, "-chain.yaml") + } + if strings.HasSuffix(filename, "-workflow.yaml") { + name = strings.TrimSuffix(filename, "-workflow.yaml") + } + if name == "" { + return fmt.Errorf("invalid step filename: %s", filename) + } + node, ok := graph[name] + if !ok { + return fmt.Errorf("could not find registry component in registry graph: %s", name) + } + changes[name] = node + return nil +} + +// GetChangedRegistrySteps identifies all registry components (refs, chains, and workflows) that changed. +func GetChangedRegistrySteps(path, baseRev string, graph registry.NodeByName) (registry.NodeByName, error) { + changes := make(registry.NodeByName) + revChanges, err := getRevChanges(path, RegistryPath, baseRev, true) + if err != nil { + return changes, err + } + for _, c := range revChanges { + if filepath.Ext(c.Filename) == ".yaml" || strings.HasSuffix(c.Filename, "-commands.sh") { + err := loadRegistryStep(filepath.Base(c.Filename), graph, changes) + if err != nil { + return changes, err + } + } + } + return changes, nil +} + func GetChangedClusterProfiles(path, baseRev string) ([]ConfigMapSource, error) { return getRevChanges(path, ClusterProfilesPath, baseRev, false) } diff --git a/pkg/jobconfig/files.go b/pkg/jobconfig/files.go index c9ed3418268..f0cee9ca198 100644 --- a/pkg/jobconfig/files.go +++ b/pkg/jobconfig/files.go @@ -13,7 +13,7 @@ import ( "github.com/openshift/ci-tools/pkg/promotion" "github.com/sirupsen/logrus" - "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/sets" prowconfig "k8s.io/test-infra/prow/config" ) @@ -25,6 +25,9 @@ const ( CanBeRehearsedLabel = "pj-rehearse.openshift.io/can-be-rehearsed" Generated ProwgenLabel = "true" New ProwgenLabel = "newly-generated" + PresubmitPrefix = "pull" + PostsubmitPrefix = "branch" + PeriodicPrefix = "periodic" ) // DataWithInfo describes the metadata for a Prow job configuration file diff --git a/pkg/rehearse/jobs.go b/pkg/rehearse/jobs.go index e1b2bf367e4..bec24787725 100644 --- a/pkg/rehearse/jobs.go +++ b/pkg/rehearse/jobs.go @@ -3,6 +3,7 @@ package rehearse import ( "fmt" "path/filepath" + "reflect" "sort" "strconv" "strings" @@ -32,7 +33,9 @@ import ( prowconfig "k8s.io/test-infra/prow/config" "k8s.io/test-infra/prow/pjutil" + "github.com/openshift/ci-tools/pkg/api" "github.com/openshift/ci-tools/pkg/config" + "github.com/openshift/ci-tools/pkg/jobconfig" "github.com/openshift/ci-tools/pkg/registry" ) @@ -408,6 +411,129 @@ func AddRandomJobsForChangedTemplates(templates []config.ConfigMapSource, toBeRe return rehearsals } +func getPresubmitByJobName(presubmits []prowconfig.Presubmit, name string) (prowconfig.Presubmit, error) { + for _, presubmit := range presubmits { + if presubmit.Name == name { + return presubmit, nil + } + } + return prowconfig.Presubmit{}, fmt.Errorf("could not find presubmit with name: %s", name) +} + +func getPresubmitsForRegistryStep(node registry.Node, configs config.ByFilename, prConfigPresubmits map[string][]prowconfig.Presubmit, addedConfigs []*api.MultiStageTestConfiguration) (map[string][]prowconfig.Presubmit, []*api.MultiStageTestConfiguration, error) { + toTest := make(map[string][]prowconfig.Presubmit) + // get sorted list of configs keys to make the function deterministic + var keys []string + for k := range configs { + keys = append(keys, k) + } + sort.Strings(keys) + for _, key := range keys { + ciopConfig := configs[key] + tests := ciopConfig.Configuration.Tests + orgRepo := fmt.Sprintf("%s/%s", ciopConfig.Info.Org, ciopConfig.Info.Repo) + repoPresubmits := prConfigPresubmits[orgRepo] + for _, test := range tests { + if test.MultiStageTestConfiguration == nil { + continue + } + skip := false + for _, added := range addedConfigs { + if reflect.DeepEqual(test.MultiStageTestConfiguration, added) { + skip = true + break + } + } + if skip { + continue + } + jobName := ciopConfig.Info.JobName(jobconfig.PresubmitPrefix, test.As) + // TODO: Handle workflows with overridden fields. + // Workflows can have overridden fields and thus may have overridden the field that made the workflow an ancestor. + // This should be handled to reduce the number of rehearsals being done, but requires much more information than + // the graph alone provides. + if test.MultiStageTestConfiguration.Workflow != nil && node.Type() == registry.Workflow && node.Name() == *test.MultiStageTestConfiguration.Workflow { + presubmit, err := getPresubmitByJobName(repoPresubmits, jobName) + if err != nil { + return toTest, addedConfigs, err + } + addedConfigs = append(addedConfigs, test.MultiStageTestConfiguration) + toTest[orgRepo] = append(toTest[orgRepo], presubmit) + // continue to check other tests + continue + } + testSteps := append(test.MultiStageTestConfiguration.Pre, append(test.MultiStageTestConfiguration.Test, test.MultiStageTestConfiguration.Post...)...) + for _, testStep := range testSteps { + if testStep.Reference != nil && node.Type() == registry.Reference && node.Name() == *testStep.Reference { + presubmit, err := getPresubmitByJobName(repoPresubmits, jobName) + if err != nil { + return toTest, addedConfigs, err + } + addedConfigs = append(addedConfigs, test.MultiStageTestConfiguration) + toTest[orgRepo] = append(toTest[orgRepo], presubmit) + // found step; break + break + } + if testStep.Chain != nil && node.Type() == registry.Chain && node.Name() == *testStep.Chain { + presubmit, err := getPresubmitByJobName(repoPresubmits, jobName) + if err != nil { + return toTest, addedConfigs, err + } + addedConfigs = append(addedConfigs, test.MultiStageTestConfiguration) + toTest[orgRepo] = append(toTest[orgRepo], presubmit) + // found step; break + break + } + } + } + } + return toTest, addedConfigs, nil +} + +// expandAncestors takes a graph of changed steps and adds all ancestors of +// the existing steps to the changed steps graph +func expandAncestors(changed, graph registry.NodeByName) { + for _, node := range changed { + for name := range node.AncestorNames() { + changed[name] = graph[name] + } + } +} + +func AddRandomJobsForChangedRegistry(regSteps, graph registry.NodeByName, prConfigPresubmits map[string][]prowconfig.Presubmit, configPath string, loggers Loggers) config.Presubmits { + configsByFilename, err := config.LoadConfigByFilename(configPath) + if err != nil { + loggers.Debug.Errorf("Failed to load config by filename in AddRandomJobsForChangedRegistry: %v", err) + } + expandAncestors(regSteps, graph) + rehearsals := make(config.Presubmits) + // get sorted list of regSteps keys to make the function deterministic + var keys []string + for k := range regSteps { + keys = append(keys, k) + } + sort.Strings(keys) + // make list to store MultiStageTestConfigurations that we've already added to the test list + addedConfigs := []*api.MultiStageTestConfiguration{} + for _, key := range keys { + step := regSteps[key] + var presubmitsMap map[string][]prowconfig.Presubmit + presubmitsMap, addedConfigs, err = getPresubmitsForRegistryStep(step, configsByFilename, prConfigPresubmits, addedConfigs) + if err != nil { + loggers.Debug.Errorf("Error getting presubmits in AddRandomJobsForChangedRegistry: %v", err) + } + if len(presubmitsMap) == 0 { + // if the code reaches this point, then no config contains the step or the step has already been tested + loggers.Debug.Warnf("No config found containing step: %+v", step) + } + for repo, presubmits := range presubmitsMap { + rehearsals[repo] = append(rehearsals[repo], presubmits...) + continue + } + } + return rehearsals +} + func getClusterTypes(jobs map[string][]prowconfig.Presubmit) []string { ret := sets.NewString() for _, jobs := range jobs { diff --git a/pkg/rehearse/metrics.go b/pkg/rehearse/metrics.go index e3dcf6b7af9..5a91f2cc9fd 100644 --- a/pkg/rehearse/metrics.go +++ b/pkg/rehearse/metrics.go @@ -9,11 +9,12 @@ import ( "github.com/sirupsen/logrus" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/test-infra/prow/apis/prowjobs/v1" + v1 "k8s.io/test-infra/prow/apis/prowjobs/v1" prowconfig "k8s.io/test-infra/prow/config" "k8s.io/test-infra/prow/pod-utils/downwardapi" "github.com/openshift/ci-tools/pkg/config" + "github.com/openshift/ci-tools/pkg/registry" ) type ExecutionMetrics struct { @@ -25,11 +26,12 @@ type ExecutionMetrics struct { type Metrics struct { JobSpec *downwardapi.JobSpec `json:"spec"` - ChangedCiopConfigs []string `json:"changed_ciop_configs"` - ChangedPresubmits []string `json:"changed_presubmits"` - ChangedPeriodics []string `json:"changed_periodics"` - ChangedTemplates []string `json:"changed_templates"` - ChangedClusterProfiles []string `json:"changed_cluster_profiles"` + ChangedCiopConfigs []string `json:"changed_ciop_configs"` + ChangedPresubmits []string `json:"changed_presubmits"` + ChangedPeriodics []string `json:"changed_periodics"` + ChangedTemplates []string `json:"changed_templates"` + ChangedClusterProfiles []string `json:"changed_cluster_profiles"` + ChangedRegistryElements []string `jsob:"changed_registry_elements"` // map a job name to a list of reasons why we want to rehearse it Opportunities map[string][]string `json:"opportunities"` @@ -48,10 +50,11 @@ type Metrics struct { func NewMetrics(file string) *Metrics { return &Metrics{ - ChangedCiopConfigs: []string{}, - ChangedPresubmits: []string{}, - ChangedPeriodics: []string{}, - ChangedTemplates: []string{}, + ChangedCiopConfigs: []string{}, + ChangedPresubmits: []string{}, + ChangedPeriodics: []string{}, + ChangedTemplates: []string{}, + ChangedRegistryElements: []string{}, Opportunities: map[string][]string{}, Actual: []string{}, @@ -78,6 +81,12 @@ func (m *Metrics) RecordChangedClusterProfiles(ps []config.ConfigMapSource) { } } +func (m *Metrics) RecordChangedRegistryElements(nodes registry.NodeByName) { + for name := range nodes { + m.ChangedRegistryElements = append(m.ChangedRegistryElements, name) + } +} + func (m *Metrics) RecordChangedPresubmits(presubmits config.Presubmits) { for _, jobs := range presubmits { for _, job := range jobs { diff --git a/test/pj-rehearse-integration/candidate/ci-operator/config/super/trooper/super-trooper-master.yaml b/test/pj-rehearse-integration/candidate/ci-operator/config/super/trooper/super-trooper-master.yaml index 94fefc423a3..630bdd041a5 100644 --- a/test/pj-rehearse-integration/candidate/ci-operator/config/super/trooper/super-trooper-master.yaml +++ b/test/pj-rehearse-integration/candidate/ci-operator/config/super/trooper/super-trooper-master.yaml @@ -40,3 +40,46 @@ tests: requests: cpu: 1000m memory: 2Gi +- as: multistage2 # identical to above; should be ignored by rehearse tool + steps: + workflow: ipi + test: + - as: e2e + from: my-image + commands: make integration + resources: + requests: + cpu: 1000m + memory: 2Gi +- as: multistage3 # new cluster_profile field; should be rehearsed + steps: + cluster_profile: azure + workflow: ipi + test: + - as: e2e + from: my-image + commands: make integration + resources: + requests: + cpu: 1000m + memory: 2Gi +- as: multistage4 # shouldn't get rehearsed since it doesn't use changed registry components + steps: + test: + - as: e2e + from: my-image + commands: make integration + resources: + requests: + cpu: 1000m + memory: 2Gi +- as: multistage5 # doesn't exist in previous revision; should get tested + steps: + test: + - as: e2e + from: my-image + commands: make integration + resources: + requests: + cpu: 1000m + memory: 2Gi diff --git a/test/pj-rehearse-integration/candidate/ci-operator/jobs/super/duper/super-duper-ciop-cfg-change-presubmits.yaml b/test/pj-rehearse-integration/candidate/ci-operator/jobs/super/duper/super-duper-ciop-cfg-change-presubmits.yaml index 4ef04b1d725..b5318f3f6dd 100644 --- a/test/pj-rehearse-integration/candidate/ci-operator/jobs/super/duper/super-duper-ciop-cfg-change-presubmits.yaml +++ b/test/pj-rehearse-integration/candidate/ci-operator/jobs/super/duper/super-duper-ciop-cfg-change-presubmits.yaml @@ -4,20 +4,24 @@ presubmits: always_run: true branches: - ciop-cfg-change - context: ci/prow/images + clone_depth: 123 + clone_uri: thing + context: ci/prow/custom decorate: true decoration_config: skip_cloning: true labels: - pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-super-duper-ciop-cfg-change-images - rerun_command: /test images + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-super-duper-ciop-cfg-change-custom + path_alias: foobar + rerun_command: /test custom + skip_submodules: true spec: containers: - args: - - --artifact-dir=$(ARTIFACTS) + - --artifact-dir=$(CHANGED) - --give-pr-author-access-to-namespace=true - - --target=[images] + - --target=custom command: - ci-operator env: @@ -25,37 +29,41 @@ presubmits: valueFrom: configMapKeyRef: key: super-duper-ciop-cfg-change.yaml - name: ci-operator-misc-configs + name: ci-operator-ciop-cfg-change-configs image: ci-operator:latest imagePullPolicy: Always name: "" resources: + limits: + cpu: 1500m requests: cpu: 10m serviceAccountName: ci-operator - trigger: '(?m)^/test (?:.*? )?images(?: .*?)?$' + trigger: ((?m)^/test( all| custom),?(\s+|$)) - agent: kubernetes always_run: true branches: - ciop-cfg-change - context: ci/prow/custom + context: ci/prow/images decorate: true - path_alias: foobar - clone_uri: thing - skip_submodules: true - clone_depth: 123 decoration_config: skip_cloning: true labels: + ci-operator.openshift.io/prowgen-controlled: "true" pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-super-duper-ciop-cfg-change-custom - rerun_command: /test custom + name: pull-ci-super-duper-ciop-cfg-change-images + rerun_command: /test images spec: containers: - args: - - --artifact-dir=$(CHANGED) + - --artifact-dir=$(ARTIFACTS) + - --branch=ciop-cfg-change - --give-pr-author-access-to-namespace=true - - --target=custom + - --org=super + - --repo=duper + - --resolver-address=http://ci-operator-configresolver-ci.svc.ci.openshift.org + - --sentry-dsn-path=/etc/sentry-dsn/ci-operator + - --target=[images] command: - ci-operator env: @@ -63,14 +71,20 @@ presubmits: valueFrom: configMapKeyRef: key: super-duper-ciop-cfg-change.yaml - name: ci-operator-ciop-cfg-change-configs + name: ci-operator-misc-configs image: ci-operator:latest imagePullPolicy: Always name: "" resources: - limits: - cpu: 1500m requests: cpu: 10m + volumeMounts: + - mountPath: /etc/sentry-dsn + name: sentry-dsn + readOnly: true serviceAccountName: ci-operator - trigger: ((?m)^/test( all| custom),?(\s+|$)) \ No newline at end of file + volumes: + - name: sentry-dsn + secret: + secretName: sentry-dsn + trigger: (?m)^/test( | .* )images,?($|\s.*) diff --git a/test/pj-rehearse-integration/candidate/ci-operator/jobs/super/duper/super-duper-master-presubmits.yaml b/test/pj-rehearse-integration/candidate/ci-operator/jobs/super/duper/super-duper-master-presubmits.yaml index 1a8f9477de3..0fd9f23374b 100644 --- a/test/pj-rehearse-integration/candidate/ci-operator/jobs/super/duper/super-duper-master-presubmits.yaml +++ b/test/pj-rehearse-integration/candidate/ci-operator/jobs/super/duper/super-duper-master-presubmits.yaml @@ -104,6 +104,7 @@ presubmits: decoration_config: skip_cloning: true labels: + ci-operator.openshift.io/prowgen-controlled: "true" pj-rehearse.openshift.io/can-be-rehearsed: "true" name: pull-ci-super-duper-master-images rerun_command: /test images @@ -111,7 +112,12 @@ presubmits: containers: - args: - --artifact-dir=$(ARTIFACTS) + - --branch=master - --give-pr-author-access-to-namespace=true + - --org=super + - --repo=duper + - --resolver-address=http://ci-operator-configresolver-ci.svc.ci.openshift.org + - --sentry-dsn-path=/etc/sentry-dsn/ci-operator - --target=[images] command: - ci-operator @@ -127,8 +133,16 @@ presubmits: resources: requests: cpu: 10m + volumeMounts: + - mountPath: /etc/sentry-dsn + name: sentry-dsn + readOnly: true serviceAccountName: ci-operator - trigger: '(?m)^/test (?:.*? )?images(?: .*?)?$' + volumes: + - name: sentry-dsn + secret: + secretName: sentry-dsn + trigger: (?m)^/test( | .* )images,?($|\s.*) - agent: kubernetes always_run: true branches: @@ -165,52 +179,6 @@ presubmits: cpu: 10m serviceAccountName: ci-operator trigger: ((?m)^/test( all| integration| changed),?(\s+|$)) - - agent: kubernetes - always_run: true - branches: - - master - context: ci/prow/unit - decorate: true - decoration_config: - skip_cloning: true - labels: - pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-super-duper-master-unit - rerun_command: /test unit - spec: - containers: - - args: - - --artifact-dir=$(ARTIFACTS) - - --give-pr-author-access-to-namespace=true - - --target=unit - command: - - ci-operator - env: - - name: CONFIG_SPEC - valueFrom: - configMapKeyRef: - key: super-duper-master.yaml - name: ci-operator-master-configs - image: ci-operator:latest - imagePullPolicy: Always - name: "" - resources: - limits: - cpu: 500m - requests: - cpu: 10m - serviceAccountName: ci-operator - trigger: ((?m)^/test( all| unit),?(\s+|$)) - - agent: jenkins - always_run: false - branches: - - master - context: ci/openshift-jenkins/extended_gssapi - labels: - master: changed - name: test_pull_request_origin_extended_gssapi - rerun_command: /test extended_gssapi - trigger: ((?m)^/test extended_gssapi,?(\s+|$)) - agent: kubernetes always_run: true branches: @@ -328,4 +296,50 @@ presubmits: - configMap: name: prow-job-cluster-launch-installer-e2e name: job-definition - trigger: ((?m)^/test( all| test-template-e2e-openstack),?(\s+|$)) \ No newline at end of file + trigger: ((?m)^/test( all| test-template-e2e-openstack),?(\s+|$)) + - agent: kubernetes + always_run: true + branches: + - master + context: ci/prow/unit + decorate: true + decoration_config: + skip_cloning: true + labels: + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-super-duper-master-unit + rerun_command: /test unit + spec: + containers: + - args: + - --artifact-dir=$(ARTIFACTS) + - --give-pr-author-access-to-namespace=true + - --target=unit + command: + - ci-operator + env: + - name: CONFIG_SPEC + valueFrom: + configMapKeyRef: + key: super-duper-master.yaml + name: ci-operator-master-configs + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + limits: + cpu: 500m + requests: + cpu: 10m + serviceAccountName: ci-operator + trigger: ((?m)^/test( all| unit),?(\s+|$)) + - agent: jenkins + always_run: false + branches: + - master + context: ci/openshift-jenkins/extended_gssapi + labels: + master: changed + name: test_pull_request_origin_extended_gssapi + rerun_command: /test extended_gssapi + trigger: ((?m)^/test extended_gssapi,?(\s+|$)) diff --git a/test/pj-rehearse-integration/candidate/ci-operator/jobs/super/duper/super-duper-periodics.yaml b/test/pj-rehearse-integration/candidate/ci-operator/jobs/super/duper/super-duper-periodics.yaml index 19cd42dd063..34c5e31bd8d 100644 --- a/test/pj-rehearse-integration/candidate/ci-operator/jobs/super/duper/super-duper-periodics.yaml +++ b/test/pj-rehearse-integration/candidate/ci-operator/jobs/super/duper/super-duper-periodics.yaml @@ -1,16 +1,14 @@ periodics: - agent: kubernetes - cron: "" decorate: true + extra_refs: + - base_ref: master + org: super + repo: duper interval: 24h - name: periodic-ci-super-duper-e2e - skip_cloning: true labels: pj-rehearse.openshift.io/can-be-rehearsed: "true" - extra_refs: - - org: super - repo: duper - base_ref: master + name: periodic-ci-super-duper-e2e spec: containers: - args: @@ -59,17 +57,15 @@ periodics: name: prow-job-cluster-launch-src name: job-definition - agent: kubernetes - cron: "" decorate: true + extra_refs: + - base_ref: master + org: super + repo: duper interval: 24h - name: periodic-ci-super-duper-no-ciop - skip_cloning: true labels: pj-rehearse.openshift.io/can-be-rehearsed: "true" - extra_refs: - - org: super - repo: duper - base_ref: master + name: periodic-ci-super-duper-no-ciop spec: containers: - args: @@ -90,4 +86,3 @@ periodics: requests: cpu: 10m serviceAccountName: ci-operator - \ No newline at end of file diff --git a/test/pj-rehearse-integration/candidate/ci-operator/jobs/super/trooper/super-trooper-master-presubmits.yaml b/test/pj-rehearse-integration/candidate/ci-operator/jobs/super/trooper/super-trooper-master-presubmits.yaml index 85c0f1c5f2a..bb9a1407338 100644 --- a/test/pj-rehearse-integration/candidate/ci-operator/jobs/super/trooper/super-trooper-master-presubmits.yaml +++ b/test/pj-rehearse-integration/candidate/ci-operator/jobs/super/trooper/super-trooper-master-presubmits.yaml @@ -104,6 +104,7 @@ presubmits: decoration_config: skip_cloning: true labels: + ci-operator.openshift.io/prowgen-controlled: "true" pj-rehearse.openshift.io/can-be-rehearsed: "true" name: pull-ci-super-trooper-master-images rerun_command: /test images @@ -111,7 +112,12 @@ presubmits: containers: - args: - --artifact-dir=$(ARTIFACTS) + - --branch=master - --give-pr-author-access-to-namespace=true + - --org=super + - --repo=trooper + - --resolver-address=http://ci-operator-configresolver-ci.svc.ci.openshift.org + - --sentry-dsn-path=/etc/sentry-dsn/ci-operator - --target=[images] command: - ci-operator @@ -126,9 +132,17 @@ presubmits: name: "" resources: requests: - cpu: 10000000000m + cpu: 10m + volumeMounts: + - mountPath: /etc/sentry-dsn + name: sentry-dsn + readOnly: true serviceAccountName: ci-operator - trigger: '(?m)^/test (?:.*? )?images(?: .*?)?$' + volumes: + - name: sentry-dsn + secret: + secretName: sentry-dsn + trigger: (?m)^/test( | .* )images,?($|\s.*) - agent: kubernetes always_run: true branches: @@ -165,6 +179,296 @@ presubmits: cpu: 10m serviceAccountName: ci-operator trigger: ((?m)^/test( all| integration),?(\s+|$)) + - agent: kubernetes + always_run: true + branches: + - master + context: ci/prow/multistage + decorate: true + decoration_config: + skip_cloning: true + labels: + ci-operator.openshift.io/prowgen-controlled: "true" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-super-trooper-master-multistage + rerun_command: /test multistage + spec: + containers: + - args: + - --artifact-dir=$(ARTIFACTS) + - --branch=master + - --give-pr-author-access-to-namespace=true + - --org=super + - --repo=trooper + - --resolver-address=http://ci-operator-configresolver-ci.svc.ci.openshift.org + - --secret-dir=/usr/local/multistage-cluster-profile + - --sentry-dsn-path=/etc/sentry-dsn/ci-operator + - --target=multistage + command: + - ci-operator + env: + - name: CONFIG_SPEC + valueFrom: + configMapKeyRef: + key: super-trooper-master.yaml + name: ci-operator-master-configs + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /usr/local/multistage-cluster-profile + name: cluster-profile + - mountPath: /etc/sentry-dsn + name: sentry-dsn + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: cluster-profile + projected: + sources: + - secret: + name: cluster-secrets- + - configMap: + name: cluster-profile- + - name: sentry-dsn + secret: + secretName: sentry-dsn + trigger: (?m)^/test( | .* )multistage,?($|\s.*) + - agent: kubernetes + always_run: true + branches: + - master + context: ci/prow/multistage2 + decorate: true + decoration_config: + skip_cloning: true + labels: + ci-operator.openshift.io/prowgen-controlled: "true" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-super-trooper-master-multistage2 + rerun_command: /test multistage2 + spec: + containers: + - args: + - --artifact-dir=$(ARTIFACTS) + - --branch=master + - --give-pr-author-access-to-namespace=true + - --org=super + - --repo=trooper + - --resolver-address=http://ci-operator-configresolver-ci.svc.ci.openshift.org + - --secret-dir=/usr/local/multistage2-cluster-profile + - --sentry-dsn-path=/etc/sentry-dsn/ci-operator + - --target=multistage2 + command: + - ci-operator + env: + - name: CONFIG_SPEC + valueFrom: + configMapKeyRef: + key: super-trooper-master.yaml + name: ci-operator-master-configs + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /usr/local/multistage2-cluster-profile + name: cluster-profile + - mountPath: /etc/sentry-dsn + name: sentry-dsn + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: cluster-profile + projected: + sources: + - secret: + name: cluster-secrets- + - configMap: + name: cluster-profile- + - name: sentry-dsn + secret: + secretName: sentry-dsn + trigger: (?m)^/test( | .* )multistage2,?($|\s.*) + - agent: kubernetes + always_run: true + branches: + - master + context: ci/prow/multistage3 + decorate: true + decoration_config: + skip_cloning: true + labels: + ci-operator.openshift.io/prowgen-controlled: "true" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-super-trooper-master-multistage3 + rerun_command: /test multistage3 + spec: + containers: + - args: + - --artifact-dir=$(ARTIFACTS) + - --branch=master + - --give-pr-author-access-to-namespace=true + - --org=super + - --repo=trooper + - --resolver-address=http://ci-operator-configresolver-ci.svc.ci.openshift.org + - --secret-dir=/usr/local/multistage3-cluster-profile + - --sentry-dsn-path=/etc/sentry-dsn/ci-operator + - --target=multistage3 + command: + - ci-operator + env: + - name: CONFIG_SPEC + valueFrom: + configMapKeyRef: + key: super-trooper-master.yaml + name: ci-operator-master-configs + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /usr/local/multistage3-cluster-profile + name: cluster-profile + - mountPath: /etc/sentry-dsn + name: sentry-dsn + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: cluster-profile + projected: + sources: + - secret: + name: cluster-secrets- + - configMap: + name: cluster-profile- + - name: sentry-dsn + secret: + secretName: sentry-dsn + trigger: (?m)^/test( | .* )multistage3,?($|\s.*) + - agent: kubernetes + always_run: true + branches: + - master + context: ci/prow/multistage4 + decorate: true + decoration_config: + skip_cloning: true + labels: + ci-operator.openshift.io/prowgen-controlled: "true" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-super-trooper-master-multistage4 + rerun_command: /test multistage4 + spec: + containers: + - args: + - --artifact-dir=$(ARTIFACTS) + - --branch=master + - --give-pr-author-access-to-namespace=true + - --org=super + - --repo=trooper + - --resolver-address=http://ci-operator-configresolver-ci.svc.ci.openshift.org + - --secret-dir=/usr/local/multistage4-cluster-profile + - --sentry-dsn-path=/etc/sentry-dsn/ci-operator + - --target=multistage4 + command: + - ci-operator + env: + - name: CONFIG_SPEC + valueFrom: + configMapKeyRef: + key: super-trooper-master.yaml + name: ci-operator-master-configs + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /usr/local/multistage4-cluster-profile + name: cluster-profile + - mountPath: /etc/sentry-dsn + name: sentry-dsn + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: cluster-profile + projected: + sources: + - secret: + name: cluster-secrets- + - configMap: + name: cluster-profile- + - name: sentry-dsn + secret: + secretName: sentry-dsn + trigger: (?m)^/test( | .* )multistage4,?($|\s.*) + - agent: kubernetes + always_run: true + branches: + - master + context: ci/prow/multistage5 + decorate: true + decoration_config: + skip_cloning: true + labels: + ci-operator.openshift.io/prowgen-controlled: "true" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-super-trooper-master-multistage5 + rerun_command: /test multistage5 + spec: + containers: + - args: + - --artifact-dir=$(ARTIFACTS) + - --branch=master + - --give-pr-author-access-to-namespace=true + - --org=super + - --repo=trooper + - --resolver-address=http://ci-operator-configresolver-ci.svc.ci.openshift.org + - --secret-dir=/usr/local/multistage5-cluster-profile + - --sentry-dsn-path=/etc/sentry-dsn/ci-operator + - --target=multistage5 + command: + - ci-operator + env: + - name: CONFIG_SPEC + valueFrom: + configMapKeyRef: + key: super-trooper-master.yaml + name: ci-operator-master-configs + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /usr/local/multistage5-cluster-profile + name: cluster-profile + - mountPath: /etc/sentry-dsn + name: sentry-dsn + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: cluster-profile + projected: + sources: + - secret: + name: cluster-secrets- + - configMap: + name: cluster-profile- + - name: sentry-dsn + secret: + secretName: sentry-dsn + trigger: (?m)^/test( | .* )multistage5,?($|\s.*) - agent: kubernetes always_run: true branches: @@ -174,6 +478,7 @@ presubmits: decoration_config: skip_cloning: true labels: + ci-operator.openshift.io/prowgen-controlled: "true" pj-rehearse.openshift.io/can-be-rehearsed: "true" name: pull-ci-super-trooper-master-unit rerun_command: /test unit @@ -181,7 +486,12 @@ presubmits: containers: - args: - --artifact-dir=$(ARTIFACTS) + - --branch=master - --give-pr-author-access-to-namespace=true + - --org=super + - --repo=trooper + - --resolver-address=http://ci-operator-configresolver-ci.svc.ci.openshift.org + - --sentry-dsn-path=/etc/sentry-dsn/ci-operator - --target=unit command: - ci-operator @@ -195,12 +505,18 @@ presubmits: imagePullPolicy: Always name: "" resources: - limits: - cpu: 500m requests: cpu: 10m + volumeMounts: + - mountPath: /etc/sentry-dsn + name: sentry-dsn + readOnly: true serviceAccountName: ci-operator - trigger: ((?m)^/test( all| unit),?(\s+|$)) + volumes: + - name: sentry-dsn + secret: + secretName: sentry-dsn + trigger: (?m)^/test( | .* )unit,?($|\s.*) - agent: jenkins always_run: false branches: diff --git a/test/pj-rehearse-integration/expected.yaml b/test/pj-rehearse-integration/expected.yaml index 652dfc4cf3d..fd0fd0f4ffc 100644 --- a/test/pj-rehearse-integration/expected.yaml +++ b/test/pj-rehearse-integration/expected.yaml @@ -491,6 +491,7 @@ prow.k8s.io/job: rehearse-1234-pull-ci-super-duper-ciop-cfg-change-images creationTimestamp: null labels: + ci-operator.openshift.io/prowgen-controlled: "true" ci.openshift.org/rehearse: "1234" created-by-prow: "true" pj-rehearse.openshift.io/can-be-rehearsed: "true" @@ -532,6 +533,7 @@ - args: - --artifact-dir=$(ARTIFACTS) - --give-pr-author-access-to-namespace=true + - --sentry-dsn-path=/etc/sentry-dsn/ci-operator - --target=[images] command: - ci-operator @@ -571,7 +573,15 @@ resources: requests: cpu: 10m + volumeMounts: + - mountPath: /etc/sentry-dsn + name: sentry-dsn + readOnly: true serviceAccountName: ci-operator + volumes: + - name: sentry-dsn + secret: + secretName: sentry-dsn refs: base_ref: master base_sha: 328cef7c6235073b55754d503b98c9233eaa9955 @@ -1417,6 +1427,134 @@ requests: cpu: 1000m memory: 2Gi + - as: multistage2 + commands: "" + literal_steps: + cluster_profile: "" + post: + - as: ipi-deprovision-must-gather + commands: | + gather + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + - as: ipi-deprovision-deprovision + commands: | + openshift-cluster destroy + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + pre: + - as: ipi-install-rbac + commands: | + setup-rbac-2 + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + - as: ipi-install-install + commands: | + openshift-cluster install --newFlag + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + test: + - as: e2e + commands: make integration + from: my-image + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + - as: multistage3 + commands: "" + literal_steps: + cluster_profile: azure + post: + - as: ipi-deprovision-must-gather + commands: | + gather + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + - as: ipi-deprovision-deprovision + commands: | + openshift-cluster destroy + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + pre: + - as: ipi-install-rbac + commands: | + setup-rbac-2 + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + - as: ipi-install-install + commands: | + openshift-cluster install --newFlag + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + test: + - as: e2e + commands: make integration + from: my-image + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + - as: multistage4 + commands: "" + literal_steps: + cluster_profile: "" + test: + - as: e2e + commands: make integration + from: my-image + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + - as: multistage5 + commands: "" + literal_steps: + cluster_profile: "" + test: + - as: e2e + commands: make integration + from: my-image + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi image: ci-operator:latest imagePullPolicy: Always name: "" @@ -1581,6 +1719,134 @@ requests: cpu: 1000m memory: 2Gi + - as: multistage2 + commands: "" + literal_steps: + cluster_profile: "" + post: + - as: ipi-deprovision-must-gather + commands: | + gather + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + - as: ipi-deprovision-deprovision + commands: | + openshift-cluster destroy + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + pre: + - as: ipi-install-rbac + commands: | + setup-rbac-2 + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + - as: ipi-install-install + commands: | + openshift-cluster install --newFlag + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + test: + - as: e2e + commands: make integration + from: my-image + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + - as: multistage3 + commands: "" + literal_steps: + cluster_profile: azure + post: + - as: ipi-deprovision-must-gather + commands: | + gather + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + - as: ipi-deprovision-deprovision + commands: | + openshift-cluster destroy + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + pre: + - as: ipi-install-rbac + commands: | + setup-rbac-2 + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + - as: ipi-install-install + commands: | + openshift-cluster install --newFlag + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + test: + - as: e2e + commands: make integration + from: my-image + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + - as: multistage4 + commands: "" + literal_steps: + cluster_profile: "" + test: + - as: e2e + commands: make integration + from: my-image + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + - as: multistage5 + commands: "" + literal_steps: + cluster_profile: "" + test: + - as: e2e + commands: make integration + from: my-image + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi - name: JOB_NAME_SAFE value: e2e-aws - name: TEST_COMMAND @@ -1629,23 +1895,24 @@ kind: ProwJob metadata: annotations: - prow.k8s.io/job: rehearse-1234-pull-ci-super-trooper-master-images + prow.k8s.io/job: rehearse-1234-pull-ci-super-trooper-master-multistage creationTimestamp: null labels: + ci-operator.openshift.io/prowgen-controlled: "true" ci.openshift.org/rehearse: "1234" created-by-prow: "true" pj-rehearse.openshift.io/can-be-rehearsed: "true" - prow.k8s.io/job: rehearse-1234-pull-ci-super-trooper-master-images + prow.k8s.io/job: rehearse-1234-pull-ci-super-trooper-master-multistage prow.k8s.io/refs.org: openshift prow.k8s.io/refs.pull: "1234" prow.k8s.io/refs.repo: release prow.k8s.io/type: presubmit - name: df02ebf3-2e1e-11e9-bbf5-8c16455629bd + name: 72fccf67-1b9d-11ea-a5f6-8c1645feb4f4 namespace: test-namespace spec: agent: kubernetes cluster: default - context: ci/rehearse/super/trooper/master/images + context: ci/rehearse/super/trooper/master/multistage decoration_config: gcs_configuration: bucket: origin-ci-test @@ -1666,14 +1933,16 @@ org: super repo: trooper workdir: true - job: rehearse-1234-pull-ci-super-trooper-master-images + job: rehearse-1234-pull-ci-super-trooper-master-multistage namespace: test-namespace pod_spec: containers: - args: - --artifact-dir=$(ARTIFACTS) - --give-pr-author-access-to-namespace=true - - --target=[images] + - --secret-dir=/usr/local/multistage-cluster-profile + - --sentry-dsn-path=/etc/sentry-dsn/ci-operator + - --target=multistage command: - ci-operator env: @@ -1760,14 +2029,771 @@ requests: cpu: 1000m memory: 2Gi - image: ci-operator:latest - imagePullPolicy: Always - name: "" - resources: - requests: - cpu: 10M - serviceAccountName: ci-operator - refs: + - as: multistage2 + commands: "" + literal_steps: + cluster_profile: "" + post: + - as: ipi-deprovision-must-gather + commands: | + gather + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + - as: ipi-deprovision-deprovision + commands: | + openshift-cluster destroy + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + pre: + - as: ipi-install-rbac + commands: | + setup-rbac-2 + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + - as: ipi-install-install + commands: | + openshift-cluster install --newFlag + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + test: + - as: e2e + commands: make integration + from: my-image + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + - as: multistage3 + commands: "" + literal_steps: + cluster_profile: azure + post: + - as: ipi-deprovision-must-gather + commands: | + gather + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + - as: ipi-deprovision-deprovision + commands: | + openshift-cluster destroy + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + pre: + - as: ipi-install-rbac + commands: | + setup-rbac-2 + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + - as: ipi-install-install + commands: | + openshift-cluster install --newFlag + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + test: + - as: e2e + commands: make integration + from: my-image + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + - as: multistage4 + commands: "" + literal_steps: + cluster_profile: "" + test: + - as: e2e + commands: make integration + from: my-image + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + - as: multistage5 + commands: "" + literal_steps: + cluster_profile: "" + test: + - as: e2e + commands: make integration + from: my-image + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /usr/local/multistage-cluster-profile + name: cluster-profile + - mountPath: /etc/sentry-dsn + name: sentry-dsn + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: cluster-profile + projected: + sources: + - secret: + name: cluster-secrets- + - configMap: + name: cluster-profile- + - name: sentry-dsn + secret: + secretName: sentry-dsn + refs: + base_ref: master + base_sha: 9691f0df19066bb68113f19dad0389184279fefe + org: openshift + pulls: + - author: petr-muller + number: 1234 + sha: bd54f9c2b25d95fbcde47597e52c6866be831382 + repo: release + report: true + rerun_auth_config: {} + rerun_command: /test pj-rehearse + type: presubmit + status: + startTime: "2019-12-10T22:36:04Z" + state: triggered +- apiVersion: prow.k8s.io/v1 + kind: ProwJob + metadata: + annotations: + prow.k8s.io/job: rehearse-1234-pull-ci-super-trooper-master-multistage3 + creationTimestamp: null + labels: + ci-operator.openshift.io/prowgen-controlled: "true" + ci.openshift.org/rehearse: "1234" + created-by-prow: "true" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + prow.k8s.io/job: rehearse-1234-pull-ci-super-trooper-master-multistage3 + prow.k8s.io/refs.org: openshift + prow.k8s.io/refs.pull: "1234" + prow.k8s.io/refs.repo: release + prow.k8s.io/type: presubmit + name: 72fcd110-1b9d-11ea-a5f6-8c1645feb4f4 + namespace: test-namespace + spec: + agent: kubernetes + cluster: default + context: ci/rehearse/super/trooper/master/multistage3 + decoration_config: + gcs_configuration: + bucket: origin-ci-test + default_org: openshift + default_repo: origin + path_strategy: single + gcs_credentials_secret: gce-sa-credentials-gcs-publisher + grace_period: 15s + skip_cloning: true + timeout: 4h0m0s + utility_images: + clonerefs: gcr.io/k8s-prow/clonerefs:v20190129-0a3c54c + entrypoint: gcr.io/k8s-prow/entrypoint:v20190129-0a3c54c + initupload: gcr.io/k8s-prow/initupload:v20190129-0a3c54c + sidecar: gcr.io/k8s-prow/sidecar:v20190129-0a3c54c + extra_refs: + - base_ref: master + org: super + repo: trooper + workdir: true + job: rehearse-1234-pull-ci-super-trooper-master-multistage3 + namespace: test-namespace + pod_spec: + containers: + - args: + - --artifact-dir=$(ARTIFACTS) + - --give-pr-author-access-to-namespace=true + - --secret-dir=/usr/local/multistage3-cluster-profile + - --sentry-dsn-path=/etc/sentry-dsn/ci-operator + - --target=multistage3 + command: + - ci-operator + env: + - name: CONFIG_SPEC + value: | + base_images: + base: + cluster: https://api.ci.openshift.org + name: origin-v4.0 + namespace: openshift + tag: base + build_root: + image_stream_tag: + cluster: https://api.ci.openshift.org + name: release + namespace: openshift + tag: golang-1.10 + images: + - from: base + to: test-image + resources: + '*': + limits: + cpu: 500Mi + requests: + cpu: 10Mi + tag_specification: + cluster: https://api.ci.openshift.org + name: origin-v4.0 + namespace: openshift + tests: + - as: unit + commands: make unit CHANGED + container: + from: src + - as: multistage + commands: "" + literal_steps: + cluster_profile: "" + post: + - as: ipi-deprovision-must-gather + commands: | + gather + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + - as: ipi-deprovision-deprovision + commands: | + openshift-cluster destroy + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + pre: + - as: ipi-install-rbac + commands: | + setup-rbac-2 + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + - as: ipi-install-install + commands: | + openshift-cluster install --newFlag + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + test: + - as: e2e + commands: make integration + from: my-image + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + - as: multistage2 + commands: "" + literal_steps: + cluster_profile: "" + post: + - as: ipi-deprovision-must-gather + commands: | + gather + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + - as: ipi-deprovision-deprovision + commands: | + openshift-cluster destroy + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + pre: + - as: ipi-install-rbac + commands: | + setup-rbac-2 + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + - as: ipi-install-install + commands: | + openshift-cluster install --newFlag + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + test: + - as: e2e + commands: make integration + from: my-image + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + - as: multistage3 + commands: "" + literal_steps: + cluster_profile: azure + post: + - as: ipi-deprovision-must-gather + commands: | + gather + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + - as: ipi-deprovision-deprovision + commands: | + openshift-cluster destroy + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + pre: + - as: ipi-install-rbac + commands: | + setup-rbac-2 + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + - as: ipi-install-install + commands: | + openshift-cluster install --newFlag + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + test: + - as: e2e + commands: make integration + from: my-image + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + - as: multistage4 + commands: "" + literal_steps: + cluster_profile: "" + test: + - as: e2e + commands: make integration + from: my-image + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + - as: multistage5 + commands: "" + literal_steps: + cluster_profile: "" + test: + - as: e2e + commands: make integration + from: my-image + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /usr/local/multistage3-cluster-profile + name: cluster-profile + - mountPath: /etc/sentry-dsn + name: sentry-dsn + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: cluster-profile + projected: + sources: + - secret: + name: cluster-secrets- + - configMap: + name: cluster-profile- + - name: sentry-dsn + secret: + secretName: sentry-dsn + refs: + base_ref: master + base_sha: 9691f0df19066bb68113f19dad0389184279fefe + org: openshift + pulls: + - author: petr-muller + number: 1234 + sha: bb928f30f5790ce48231cb1b2601a135869da8cc + repo: release + report: true + rerun_auth_config: {} + rerun_command: /test pj-rehearse + type: presubmit + status: + startTime: "2019-02-11T17:02:53Z" + state: triggered +- apiVersion: prow.k8s.io/v1 + kind: ProwJob + metadata: + annotations: + prow.k8s.io/job: rehearse-1234-pull-ci-super-trooper-master-multistage5 + creationTimestamp: null + labels: + ci-operator.openshift.io/prowgen-controlled: "true" + ci.openshift.org/rehearse: "1234" + created-by-prow: "true" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + prow.k8s.io/job: rehearse-1234-pull-ci-super-trooper-master-multistage5 + prow.k8s.io/refs.org: openshift + prow.k8s.io/refs.pull: "1234" + prow.k8s.io/refs.repo: release + prow.k8s.io/type: presubmit + name: 72fccbb1-1b9d-11ea-a5f6-8c1645feb4f4 + namespace: test-namespace + spec: + agent: kubernetes + cluster: default + context: ci/rehearse/super/trooper/master/multistage5 + decoration_config: + gcs_configuration: + bucket: origin-ci-test + default_org: openshift + default_repo: origin + path_strategy: single + gcs_credentials_secret: gce-sa-credentials-gcs-publisher + grace_period: 15s + skip_cloning: true + timeout: 4h0m0s + utility_images: + clonerefs: gcr.io/k8s-prow/clonerefs:v20190129-0a3c54c + entrypoint: gcr.io/k8s-prow/entrypoint:v20190129-0a3c54c + initupload: gcr.io/k8s-prow/initupload:v20190129-0a3c54c + sidecar: gcr.io/k8s-prow/sidecar:v20190129-0a3c54c + extra_refs: + - base_ref: master + org: super + repo: trooper + workdir: true + job: rehearse-1234-pull-ci-super-trooper-master-multistage5 + namespace: test-namespace + pod_spec: + containers: + - args: + - --artifact-dir=$(ARTIFACTS) + - --give-pr-author-access-to-namespace=true + - --secret-dir=/usr/local/multistage5-cluster-profile + - --sentry-dsn-path=/etc/sentry-dsn/ci-operator + - --target=multistage5 + command: + - ci-operator + env: + - name: CONFIG_SPEC + value: | + base_images: + base: + cluster: https://api.ci.openshift.org + name: origin-v4.0 + namespace: openshift + tag: base + build_root: + image_stream_tag: + cluster: https://api.ci.openshift.org + name: release + namespace: openshift + tag: golang-1.10 + images: + - from: base + to: test-image + resources: + '*': + limits: + cpu: 500Mi + requests: + cpu: 10Mi + tag_specification: + cluster: https://api.ci.openshift.org + name: origin-v4.0 + namespace: openshift + tests: + - as: unit + commands: make unit CHANGED + container: + from: src + - as: multistage + commands: "" + literal_steps: + cluster_profile: "" + post: + - as: ipi-deprovision-must-gather + commands: | + gather + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + - as: ipi-deprovision-deprovision + commands: | + openshift-cluster destroy + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + pre: + - as: ipi-install-rbac + commands: | + setup-rbac-2 + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + - as: ipi-install-install + commands: | + openshift-cluster install --newFlag + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + test: + - as: e2e + commands: make integration + from: my-image + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + - as: multistage2 + commands: "" + literal_steps: + cluster_profile: "" + post: + - as: ipi-deprovision-must-gather + commands: | + gather + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + - as: ipi-deprovision-deprovision + commands: | + openshift-cluster destroy + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + pre: + - as: ipi-install-rbac + commands: | + setup-rbac-2 + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + - as: ipi-install-install + commands: | + openshift-cluster install --newFlag + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + test: + - as: e2e + commands: make integration + from: my-image + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + - as: multistage3 + commands: "" + literal_steps: + cluster_profile: azure + post: + - as: ipi-deprovision-must-gather + commands: | + gather + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + - as: ipi-deprovision-deprovision + commands: | + openshift-cluster destroy + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + pre: + - as: ipi-install-rbac + commands: | + setup-rbac-2 + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + - as: ipi-install-install + commands: | + openshift-cluster install --newFlag + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + test: + - as: e2e + commands: make integration + from: my-image + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + - as: multistage4 + commands: "" + literal_steps: + cluster_profile: "" + test: + - as: e2e + commands: make integration + from: my-image + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + - as: multistage5 + commands: "" + literal_steps: + cluster_profile: "" + test: + - as: e2e + commands: make integration + from: my-image + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /usr/local/multistage5-cluster-profile + name: cluster-profile + - mountPath: /etc/sentry-dsn + name: sentry-dsn + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: cluster-profile + projected: + sources: + - secret: + name: cluster-secrets- + - configMap: + name: cluster-profile- + - name: sentry-dsn + secret: + secretName: sentry-dsn + refs: base_ref: master base_sha: a1e0de27c562d86647c901554094d12d7c358ba8 org: openshift @@ -1790,6 +2816,7 @@ prow.k8s.io/job: rehearse-1234-pull-ci-super-trooper-master-unit creationTimestamp: null labels: + ci-operator.openshift.io/prowgen-controlled: "true" ci.openshift.org/rehearse: "1234" created-by-prow: "true" pj-rehearse.openshift.io/can-be-rehearsed: "true" @@ -1831,6 +2858,7 @@ - args: - --artifact-dir=$(ARTIFACTS) - --give-pr-author-access-to-namespace=true + - --sentry-dsn-path=/etc/sentry-dsn/ci-operator - --target=unit command: - ci-operator @@ -1918,15 +2946,149 @@ requests: cpu: 1000m memory: 2Gi + - as: multistage2 + commands: "" + literal_steps: + cluster_profile: "" + post: + - as: ipi-deprovision-must-gather + commands: | + gather + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + - as: ipi-deprovision-deprovision + commands: | + openshift-cluster destroy + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + pre: + - as: ipi-install-rbac + commands: | + setup-rbac-2 + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + - as: ipi-install-install + commands: | + openshift-cluster install --newFlag + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + test: + - as: e2e + commands: make integration + from: my-image + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + - as: multistage3 + commands: "" + literal_steps: + cluster_profile: azure + post: + - as: ipi-deprovision-must-gather + commands: | + gather + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + - as: ipi-deprovision-deprovision + commands: | + openshift-cluster destroy + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + pre: + - as: ipi-install-rbac + commands: | + setup-rbac-2 + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + - as: ipi-install-install + commands: | + openshift-cluster install --newFlag + from: installer + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + test: + - as: e2e + commands: make integration + from: my-image + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + - as: multistage4 + commands: "" + literal_steps: + cluster_profile: "" + test: + - as: e2e + commands: make integration + from: my-image + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi + - as: multistage5 + commands: "" + literal_steps: + cluster_profile: "" + test: + - as: e2e + commands: make integration + from: my-image + resources: + limits: null + requests: + cpu: 1000m + memory: 2Gi image: ci-operator:latest imagePullPolicy: Always name: "" resources: - limits: - cpu: 500m requests: cpu: 10m + volumeMounts: + - mountPath: /etc/sentry-dsn + name: sentry-dsn + readOnly: true serviceAccountName: ci-operator + volumes: + - name: sentry-dsn + secret: + secretName: sentry-dsn refs: base_ref: master base_sha: a1e0de27c562d86647c901554094d12d7c358ba8 diff --git a/test/pj-rehearse-integration/master/ci-operator/config/super/trooper/super-trooper-master.yaml b/test/pj-rehearse-integration/master/ci-operator/config/super/trooper/super-trooper-master.yaml index 11b78a48714..5bf0dc0e6e0 100644 --- a/test/pj-rehearse-integration/master/ci-operator/config/super/trooper/super-trooper-master.yaml +++ b/test/pj-rehearse-integration/master/ci-operator/config/super/trooper/super-trooper-master.yaml @@ -29,3 +29,47 @@ tests: commands: make unit container: from: src +- as: multistage + steps: + workflow: ipi + test: + - as: e2e + from: my-image + commands: make integration + resources: + requests: + cpu: 1000m + memory: 2Gi +- as: multistage2 # identical to above; should be ignored by rehearse tool + steps: + workflow: ipi + test: + - as: e2e + from: my-image + commands: make integration + resources: + requests: + cpu: 1000m + memory: 2Gi +- as: multistage3 # new cluster_profile field; should be rehearsed + steps: + cluster_profile: azure + workflow: ipi + test: + - as: e2e + from: my-image + commands: make integration + resources: + requests: + cpu: 1000m + memory: 2Gi +- as: multistage4 # shouldn't get rehearsed since it doesn't use changed registry components + steps: + test: + - as: e2e + from: my-image + commands: make integration + resources: + requests: + cpu: 1000m + memory: 2Gi diff --git a/test/pj-rehearse-integration/master/ci-operator/jobs/super/duper/super-duper-ciop-cfg-change-presubmits.yaml b/test/pj-rehearse-integration/master/ci-operator/jobs/super/duper/super-duper-ciop-cfg-change-presubmits.yaml index 4ef04b1d725..b5318f3f6dd 100644 --- a/test/pj-rehearse-integration/master/ci-operator/jobs/super/duper/super-duper-ciop-cfg-change-presubmits.yaml +++ b/test/pj-rehearse-integration/master/ci-operator/jobs/super/duper/super-duper-ciop-cfg-change-presubmits.yaml @@ -4,20 +4,24 @@ presubmits: always_run: true branches: - ciop-cfg-change - context: ci/prow/images + clone_depth: 123 + clone_uri: thing + context: ci/prow/custom decorate: true decoration_config: skip_cloning: true labels: - pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-super-duper-ciop-cfg-change-images - rerun_command: /test images + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-super-duper-ciop-cfg-change-custom + path_alias: foobar + rerun_command: /test custom + skip_submodules: true spec: containers: - args: - - --artifact-dir=$(ARTIFACTS) + - --artifact-dir=$(CHANGED) - --give-pr-author-access-to-namespace=true - - --target=[images] + - --target=custom command: - ci-operator env: @@ -25,37 +29,41 @@ presubmits: valueFrom: configMapKeyRef: key: super-duper-ciop-cfg-change.yaml - name: ci-operator-misc-configs + name: ci-operator-ciop-cfg-change-configs image: ci-operator:latest imagePullPolicy: Always name: "" resources: + limits: + cpu: 1500m requests: cpu: 10m serviceAccountName: ci-operator - trigger: '(?m)^/test (?:.*? )?images(?: .*?)?$' + trigger: ((?m)^/test( all| custom),?(\s+|$)) - agent: kubernetes always_run: true branches: - ciop-cfg-change - context: ci/prow/custom + context: ci/prow/images decorate: true - path_alias: foobar - clone_uri: thing - skip_submodules: true - clone_depth: 123 decoration_config: skip_cloning: true labels: + ci-operator.openshift.io/prowgen-controlled: "true" pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-super-duper-ciop-cfg-change-custom - rerun_command: /test custom + name: pull-ci-super-duper-ciop-cfg-change-images + rerun_command: /test images spec: containers: - args: - - --artifact-dir=$(CHANGED) + - --artifact-dir=$(ARTIFACTS) + - --branch=ciop-cfg-change - --give-pr-author-access-to-namespace=true - - --target=custom + - --org=super + - --repo=duper + - --resolver-address=http://ci-operator-configresolver-ci.svc.ci.openshift.org + - --sentry-dsn-path=/etc/sentry-dsn/ci-operator + - --target=[images] command: - ci-operator env: @@ -63,14 +71,20 @@ presubmits: valueFrom: configMapKeyRef: key: super-duper-ciop-cfg-change.yaml - name: ci-operator-ciop-cfg-change-configs + name: ci-operator-misc-configs image: ci-operator:latest imagePullPolicy: Always name: "" resources: - limits: - cpu: 1500m requests: cpu: 10m + volumeMounts: + - mountPath: /etc/sentry-dsn + name: sentry-dsn + readOnly: true serviceAccountName: ci-operator - trigger: ((?m)^/test( all| custom),?(\s+|$)) \ No newline at end of file + volumes: + - name: sentry-dsn + secret: + secretName: sentry-dsn + trigger: (?m)^/test( | .* )images,?($|\s.*) diff --git a/test/pj-rehearse-integration/master/ci-operator/jobs/super/duper/super-duper-master-presubmits.yaml b/test/pj-rehearse-integration/master/ci-operator/jobs/super/duper/super-duper-master-presubmits.yaml index b6fe9b889fe..2a814576395 100644 --- a/test/pj-rehearse-integration/master/ci-operator/jobs/super/duper/super-duper-master-presubmits.yaml +++ b/test/pj-rehearse-integration/master/ci-operator/jobs/super/duper/super-duper-master-presubmits.yaml @@ -99,13 +99,21 @@ presubmits: decorate: true decoration_config: skip_cloning: true + labels: + ci-operator.openshift.io/prowgen-controlled: "true" + pj-rehearse.openshift.io/can-be-rehearsed: "true" name: pull-ci-super-duper-master-images rerun_command: /test images spec: containers: - args: - --artifact-dir=$(ARTIFACTS) + - --branch=master - --give-pr-author-access-to-namespace=true + - --org=super + - --repo=duper + - --resolver-address=http://ci-operator-configresolver-ci.svc.ci.openshift.org + - --sentry-dsn-path=/etc/sentry-dsn/ci-operator - --target=[images] command: - ci-operator @@ -121,8 +129,16 @@ presubmits: resources: requests: cpu: 10m + volumeMounts: + - mountPath: /etc/sentry-dsn + name: sentry-dsn + readOnly: true serviceAccountName: ci-operator - trigger: '(?m)^/test (?:.*? )?images(?: .*?)?$' + volumes: + - name: sentry-dsn + secret: + secretName: sentry-dsn + trigger: (?m)^/test( | .* )images,?($|\s.*) - agent: kubernetes always_run: true branches: @@ -157,50 +173,6 @@ presubmits: cpu: 10m serviceAccountName: ci-operator trigger: ((?m)^/test( all| integration),?(\s+|$)) - - agent: kubernetes - always_run: true - branches: - - master - context: ci/prow/unit - decorate: true - decoration_config: - skip_cloning: true - name: pull-ci-super-duper-master-unit - rerun_command: /test unit - spec: - containers: - - args: - - --artifact-dir=$(ARTIFACTS) - - --give-pr-author-access-to-namespace=true - - --target=unit - command: - - ci-operator - env: - - name: CONFIG_SPEC - valueFrom: - configMapKeyRef: - key: super-duper-master.yaml - name: ci-operator-master-configs - image: ci-operator:latest - imagePullPolicy: Always - name: "" - resources: - limits: - cpu: 500m - requests: - cpu: 10m - serviceAccountName: ci-operator - trigger: ((?m)^/test( all| unit),?(\s+|$)) - - agent: jenkins - always_run: false - branches: - - master - context: ci/openshift-jenkins/extended_gssapi - labels: - master: ci.openshift.redhat.com - name: test_pull_request_origin_extended_gssapi - rerun_command: /test extended_gssapi - trigger: ((?m)^/test extended_gssapi,?(\s+|$)) - agent: kubernetes always_run: true branches: @@ -314,4 +286,48 @@ presubmits: - configMap: name: prow-job-cluster-launch-installer-e2e name: job-definition - trigger: ((?m)^/test( all| test-template-e2e-openstack),?(\s+|$)) \ No newline at end of file + trigger: ((?m)^/test( all| test-template-e2e-openstack),?(\s+|$)) + - agent: kubernetes + always_run: true + branches: + - master + context: ci/prow/unit + decorate: true + decoration_config: + skip_cloning: true + name: pull-ci-super-duper-master-unit + rerun_command: /test unit + spec: + containers: + - args: + - --artifact-dir=$(ARTIFACTS) + - --give-pr-author-access-to-namespace=true + - --target=unit + command: + - ci-operator + env: + - name: CONFIG_SPEC + valueFrom: + configMapKeyRef: + key: super-duper-master.yaml + name: ci-operator-master-configs + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + limits: + cpu: 500m + requests: + cpu: 10m + serviceAccountName: ci-operator + trigger: ((?m)^/test( all| unit),?(\s+|$)) + - agent: jenkins + always_run: false + branches: + - master + context: ci/openshift-jenkins/extended_gssapi + labels: + master: ci.openshift.redhat.com + name: test_pull_request_origin_extended_gssapi + rerun_command: /test extended_gssapi + trigger: ((?m)^/test extended_gssapi,?(\s+|$)) diff --git a/test/pj-rehearse-integration/master/ci-operator/jobs/super/duper/super-duper-periodics.yaml b/test/pj-rehearse-integration/master/ci-operator/jobs/super/duper/super-duper-periodics.yaml index eacd683650f..1bdd9e072e7 100644 --- a/test/pj-rehearse-integration/master/ci-operator/jobs/super/duper/super-duper-periodics.yaml +++ b/test/pj-rehearse-integration/master/ci-operator/jobs/super/duper/super-duper-periodics.yaml @@ -1,12 +1,10 @@ periodics: - agent: kubernetes - cron: "" decorate: true interval: 24h - name: periodic-ci-super-duper-e2e - skip_cloning: true labels: pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: periodic-ci-super-duper-e2e spec: containers: - args: @@ -56,11 +54,9 @@ periodics: name: prow-job-cluster-launch-src name: job-definition - agent: kubernetes - cron: "" decorate: true interval: 24h name: periodic-ci-super-duper-no-ciop - skip_cloning: true spec: containers: - args: @@ -80,4 +76,3 @@ periodics: requests: cpu: 10m serviceAccountName: ci-operator - \ No newline at end of file diff --git a/test/pj-rehearse-integration/master/ci-operator/jobs/super/trooper/super-trooper-master-presubmits.yaml b/test/pj-rehearse-integration/master/ci-operator/jobs/super/trooper/super-trooper-master-presubmits.yaml index 49392f22d13..064a1ae583f 100644 --- a/test/pj-rehearse-integration/master/ci-operator/jobs/super/trooper/super-trooper-master-presubmits.yaml +++ b/test/pj-rehearse-integration/master/ci-operator/jobs/super/trooper/super-trooper-master-presubmits.yaml @@ -104,6 +104,7 @@ presubmits: decoration_config: skip_cloning: true labels: + ci-operator.openshift.io/prowgen-controlled: "true" pj-rehearse.openshift.io/can-be-rehearsed: "true" name: pull-ci-super-trooper-master-images rerun_command: /test images @@ -111,7 +112,12 @@ presubmits: containers: - args: - --artifact-dir=$(ARTIFACTS) + - --branch=master - --give-pr-author-access-to-namespace=true + - --org=super + - --repo=trooper + - --resolver-address=http://ci-operator-configresolver-ci.svc.ci.openshift.org + - --sentry-dsn-path=/etc/sentry-dsn/ci-operator - --target=[images] command: - ci-operator @@ -127,8 +133,16 @@ presubmits: resources: requests: cpu: 10m + volumeMounts: + - mountPath: /etc/sentry-dsn + name: sentry-dsn + readOnly: true serviceAccountName: ci-operator - trigger: '(?m)^/test (?:.*? )?images(?: .*?)?$' + volumes: + - name: sentry-dsn + secret: + secretName: sentry-dsn + trigger: (?m)^/test( | .* )images,?($|\s.*) - agent: kubernetes always_run: true branches: @@ -165,6 +179,238 @@ presubmits: cpu: 10m serviceAccountName: ci-operator trigger: ((?m)^/test( all| integration),?(\s+|$)) + - agent: kubernetes + always_run: true + branches: + - master + context: ci/prow/multistage + decorate: true + decoration_config: + skip_cloning: true + labels: + ci-operator.openshift.io/prowgen-controlled: "true" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-super-trooper-master-multistage + rerun_command: /test multistage + spec: + containers: + - args: + - --artifact-dir=$(ARTIFACTS) + - --branch=master + - --give-pr-author-access-to-namespace=true + - --org=super + - --repo=trooper + - --resolver-address=http://ci-operator-configresolver-ci.svc.ci.openshift.org + - --secret-dir=/usr/local/multistage-cluster-profile + - --sentry-dsn-path=/etc/sentry-dsn/ci-operator + - --target=multistage + command: + - ci-operator + env: + - name: CONFIG_SPEC + valueFrom: + configMapKeyRef: + key: super-trooper-master.yaml + name: ci-operator-master-configs + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /usr/local/multistage-cluster-profile + name: cluster-profile + - mountPath: /etc/sentry-dsn + name: sentry-dsn + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: cluster-profile + projected: + sources: + - secret: + name: cluster-secrets- + - configMap: + name: cluster-profile- + - name: sentry-dsn + secret: + secretName: sentry-dsn + trigger: (?m)^/test( | .* )multistage,?($|\s.*) + - agent: kubernetes + always_run: true + branches: + - master + context: ci/prow/multistage2 + decorate: true + decoration_config: + skip_cloning: true + labels: + ci-operator.openshift.io/prowgen-controlled: "true" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-super-trooper-master-multistage2 + rerun_command: /test multistage2 + spec: + containers: + - args: + - --artifact-dir=$(ARTIFACTS) + - --branch=master + - --give-pr-author-access-to-namespace=true + - --org=super + - --repo=trooper + - --resolver-address=http://ci-operator-configresolver-ci.svc.ci.openshift.org + - --secret-dir=/usr/local/multistage2-cluster-profile + - --sentry-dsn-path=/etc/sentry-dsn/ci-operator + - --target=multistage2 + command: + - ci-operator + env: + - name: CONFIG_SPEC + valueFrom: + configMapKeyRef: + key: super-trooper-master.yaml + name: ci-operator-master-configs + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /usr/local/multistage2-cluster-profile + name: cluster-profile + - mountPath: /etc/sentry-dsn + name: sentry-dsn + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: cluster-profile + projected: + sources: + - secret: + name: cluster-secrets- + - configMap: + name: cluster-profile- + - name: sentry-dsn + secret: + secretName: sentry-dsn + trigger: (?m)^/test( | .* )multistage2,?($|\s.*) + - agent: kubernetes + always_run: true + branches: + - master + context: ci/prow/multistage3 + decorate: true + decoration_config: + skip_cloning: true + labels: + ci-operator.openshift.io/prowgen-controlled: "true" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-super-trooper-master-multistage3 + rerun_command: /test multistage3 + spec: + containers: + - args: + - --artifact-dir=$(ARTIFACTS) + - --branch=master + - --give-pr-author-access-to-namespace=true + - --org=super + - --repo=trooper + - --resolver-address=http://ci-operator-configresolver-ci.svc.ci.openshift.org + - --secret-dir=/usr/local/multistage3-cluster-profile + - --sentry-dsn-path=/etc/sentry-dsn/ci-operator + - --target=multistage3 + command: + - ci-operator + env: + - name: CONFIG_SPEC + valueFrom: + configMapKeyRef: + key: super-trooper-master.yaml + name: ci-operator-master-configs + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /usr/local/multistage3-cluster-profile + name: cluster-profile + - mountPath: /etc/sentry-dsn + name: sentry-dsn + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: cluster-profile + projected: + sources: + - secret: + name: cluster-secrets- + - configMap: + name: cluster-profile- + - name: sentry-dsn + secret: + secretName: sentry-dsn + trigger: (?m)^/test( | .* )multistage3,?($|\s.*) + - agent: kubernetes + always_run: true + branches: + - master + context: ci/prow/multistage4 + decorate: true + decoration_config: + skip_cloning: true + labels: + ci-operator.openshift.io/prowgen-controlled: "true" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-super-trooper-master-multistage4 + rerun_command: /test multistage4 + spec: + containers: + - args: + - --artifact-dir=$(ARTIFACTS) + - --branch=master + - --give-pr-author-access-to-namespace=true + - --org=super + - --repo=trooper + - --resolver-address=http://ci-operator-configresolver-ci.svc.ci.openshift.org + - --secret-dir=/usr/local/multistage4-cluster-profile + - --sentry-dsn-path=/etc/sentry-dsn/ci-operator + - --target=multistage4 + command: + - ci-operator + env: + - name: CONFIG_SPEC + valueFrom: + configMapKeyRef: + key: super-trooper-master.yaml + name: ci-operator-master-configs + image: ci-operator:latest + imagePullPolicy: Always + name: "" + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /usr/local/multistage4-cluster-profile + name: cluster-profile + - mountPath: /etc/sentry-dsn + name: sentry-dsn + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: cluster-profile + projected: + sources: + - secret: + name: cluster-secrets- + - configMap: + name: cluster-profile- + - name: sentry-dsn + secret: + secretName: sentry-dsn + trigger: (?m)^/test( | .* )multistage4,?($|\s.*) - agent: kubernetes always_run: true branches: @@ -174,6 +420,7 @@ presubmits: decoration_config: skip_cloning: true labels: + ci-operator.openshift.io/prowgen-controlled: "true" pj-rehearse.openshift.io/can-be-rehearsed: "true" name: pull-ci-super-trooper-master-unit rerun_command: /test unit @@ -181,7 +428,12 @@ presubmits: containers: - args: - --artifact-dir=$(ARTIFACTS) + - --branch=master - --give-pr-author-access-to-namespace=true + - --org=super + - --repo=trooper + - --resolver-address=http://ci-operator-configresolver-ci.svc.ci.openshift.org + - --sentry-dsn-path=/etc/sentry-dsn/ci-operator - --target=unit command: - ci-operator @@ -195,12 +447,18 @@ presubmits: imagePullPolicy: Always name: "" resources: - limits: - cpu: 500m requests: cpu: 10m + volumeMounts: + - mountPath: /etc/sentry-dsn + name: sentry-dsn + readOnly: true serviceAccountName: ci-operator - trigger: ((?m)^/test( all| unit),?(\s+|$)) + volumes: + - name: sentry-dsn + secret: + secretName: sentry-dsn + trigger: (?m)^/test( | .* )unit,?($|\s.*) - agent: jenkins always_run: false branches: diff --git a/test/pj-rehearse-integration/run.sh b/test/pj-rehearse-integration/run.sh index 1d4b7541e61..0c9634e1574 100755 --- a/test/pj-rehearse-integration/run.sh +++ b/test/pj-rehearse-integration/run.sh @@ -57,7 +57,7 @@ make_testing_repository readonly REHEARSED_JOBS="${WORKDIR}/rehearsals.yaml" echo "[INFO] Running pj-rehearse in dry-mode..." -if ! pj-rehearse --dry-run=true --no-fail=false --allow-volumes=true --candidate-path "${FAKE_OPENSHIFT_RELEASE}" > "${REHEARSED_JOBS}" 2> "${WORKDIR}/pj-rehearse-stderr.log"; then +if ! pj-rehearse --dry-run=true --no-fail=false --allow-volumes=true --candidate-path "${FAKE_OPENSHIFT_RELEASE}" --rehearsal-limit 20 > "${REHEARSED_JOBS}" 2> "${WORKDIR}/pj-rehearse-stderr.log"; then echo "ERROR: pj-rehearse failed:" cat "${WORKDIR}/pj-rehearse-stderr.log" exit 1