Skip to content

Commit fa7d363

Browse files
miyadavPhaow
andcommitted
OCPQE-29735: Adding shard option to actual run command to work
test the changes informing main chain as well of the param in the step Update ci-operator/step-registry/openshift-extended/test/openshift-extended-test-ref.yaml Update ci-operator/step-registry/openshift-extended/test/openshift-extended-test-commands.sh Update ci-operator/step-registry/openshift/e2e/test/clusterinfra-qe/openshift-e2e-test-clusterinfra-qe-ref.yaml Co-authored-by: Penghao <pewang@redhat.com>
1 parent f531df3 commit fa7d363

File tree

5 files changed

+171
-5
lines changed

5 files changed

+171
-5
lines changed

ci-operator/config/openshift/machine-api-provider-azure/openshift-machine-api-provider-azure-main.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ tests:
9292
- as: regression-clusterinfra-azure-ipi-mapi
9393
optional: true
9494
run_if_changed: ^(go\.mod|go\.sum)$
95+
shard_count: 3
9596
steps:
9697
cluster_profile: azure4
9798
env:

ci-operator/jobs/openshift/machine-api-provider-azure/openshift-machine-api-provider-azure-main-presubmits.yaml

Lines changed: 159 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ presubmits:
526526
- ^main$
527527
- ^main-
528528
cluster: build03
529-
context: ci/prow/regression-clusterinfra-azure-ipi-mapi
529+
context: ci/prow/regression-clusterinfra-azure-ipi-mapi-1of3
530530
decorate: true
531531
decoration_config:
532532
timeout: 7h0m0s
@@ -535,16 +535,17 @@ presubmits:
535535
ci-operator.openshift.io/cloud-cluster-profile: azure4
536536
ci.openshift.io/generator: prowgen
537537
pj-rehearse.openshift.io/can-be-rehearsed: "true"
538-
name: pull-ci-openshift-machine-api-provider-azure-main-regression-clusterinfra-azure-ipi-mapi
538+
name: pull-ci-openshift-machine-api-provider-azure-main-regression-clusterinfra-azure-ipi-mapi-1of3
539539
optional: true
540-
rerun_command: /test regression-clusterinfra-azure-ipi-mapi
540+
rerun_command: /test regression-clusterinfra-azure-ipi-mapi-1of3
541541
run_if_changed: ^(go\.mod|go\.sum)$
542542
spec:
543543
containers:
544544
- args:
545545
- --gcs-upload-secret=/secrets/gcs/service-account.json
546546
- --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson
547547
- --lease-server-credentials-file=/etc/boskos/credentials
548+
- --multi-stage-param=SHARD_ARGS="--shard-count 3 --shard-id 1"
548549
- --report-credentials-file=/etc/report/credentials
549550
- --secret-dir=/secrets/ci-pull-credentials
550551
- --target=regression-clusterinfra-azure-ipi-mapi
@@ -595,7 +596,161 @@ presubmits:
595596
- name: result-aggregator
596597
secret:
597598
secretName: result-aggregator
598-
trigger: (?m)^/test( | .* )regression-clusterinfra-azure-ipi-mapi,?($|\s.*)
599+
trigger: (?m)^/test( | .* )regression-clusterinfra-azure-ipi-mapi-1of3,?($|\s.*)
600+
- agent: kubernetes
601+
always_run: false
602+
branches:
603+
- ^main$
604+
- ^main-
605+
cluster: build03
606+
context: ci/prow/regression-clusterinfra-azure-ipi-mapi-2of3
607+
decorate: true
608+
decoration_config:
609+
timeout: 7h0m0s
610+
labels:
611+
ci-operator.openshift.io/cloud: azure4
612+
ci-operator.openshift.io/cloud-cluster-profile: azure4
613+
ci.openshift.io/generator: prowgen
614+
pj-rehearse.openshift.io/can-be-rehearsed: "true"
615+
name: pull-ci-openshift-machine-api-provider-azure-main-regression-clusterinfra-azure-ipi-mapi-2of3
616+
optional: true
617+
rerun_command: /test regression-clusterinfra-azure-ipi-mapi-2of3
618+
run_if_changed: ^(go\.mod|go\.sum)$
619+
spec:
620+
containers:
621+
- args:
622+
- --gcs-upload-secret=/secrets/gcs/service-account.json
623+
- --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson
624+
- --lease-server-credentials-file=/etc/boskos/credentials
625+
- --multi-stage-param=SHARD_ARGS="--shard-count 3 --shard-id 2"
626+
- --report-credentials-file=/etc/report/credentials
627+
- --secret-dir=/secrets/ci-pull-credentials
628+
- --target=regression-clusterinfra-azure-ipi-mapi
629+
command:
630+
- ci-operator
631+
image: ci-operator:latest
632+
imagePullPolicy: Always
633+
name: ""
634+
resources:
635+
requests:
636+
cpu: 10m
637+
volumeMounts:
638+
- mountPath: /etc/boskos
639+
name: boskos
640+
readOnly: true
641+
- mountPath: /secrets/ci-pull-credentials
642+
name: ci-pull-credentials
643+
readOnly: true
644+
- mountPath: /secrets/gcs
645+
name: gcs-credentials
646+
readOnly: true
647+
- mountPath: /secrets/manifest-tool
648+
name: manifest-tool-local-pusher
649+
readOnly: true
650+
- mountPath: /etc/pull-secret
651+
name: pull-secret
652+
readOnly: true
653+
- mountPath: /etc/report
654+
name: result-aggregator
655+
readOnly: true
656+
serviceAccountName: ci-operator
657+
volumes:
658+
- name: boskos
659+
secret:
660+
items:
661+
- key: credentials
662+
path: credentials
663+
secretName: boskos-credentials
664+
- name: ci-pull-credentials
665+
secret:
666+
secretName: ci-pull-credentials
667+
- name: manifest-tool-local-pusher
668+
secret:
669+
secretName: manifest-tool-local-pusher
670+
- name: pull-secret
671+
secret:
672+
secretName: registry-pull-credentials
673+
- name: result-aggregator
674+
secret:
675+
secretName: result-aggregator
676+
trigger: (?m)^/test( | .* )regression-clusterinfra-azure-ipi-mapi-2of3,?($|\s.*)
677+
- agent: kubernetes
678+
always_run: false
679+
branches:
680+
- ^main$
681+
- ^main-
682+
cluster: build03
683+
context: ci/prow/regression-clusterinfra-azure-ipi-mapi-3of3
684+
decorate: true
685+
decoration_config:
686+
timeout: 7h0m0s
687+
labels:
688+
ci-operator.openshift.io/cloud: azure4
689+
ci-operator.openshift.io/cloud-cluster-profile: azure4
690+
ci.openshift.io/generator: prowgen
691+
pj-rehearse.openshift.io/can-be-rehearsed: "true"
692+
name: pull-ci-openshift-machine-api-provider-azure-main-regression-clusterinfra-azure-ipi-mapi-3of3
693+
optional: true
694+
rerun_command: /test regression-clusterinfra-azure-ipi-mapi-3of3
695+
run_if_changed: ^(go\.mod|go\.sum)$
696+
spec:
697+
containers:
698+
- args:
699+
- --gcs-upload-secret=/secrets/gcs/service-account.json
700+
- --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson
701+
- --lease-server-credentials-file=/etc/boskos/credentials
702+
- --multi-stage-param=SHARD_ARGS="--shard-count 3 --shard-id 3"
703+
- --report-credentials-file=/etc/report/credentials
704+
- --secret-dir=/secrets/ci-pull-credentials
705+
- --target=regression-clusterinfra-azure-ipi-mapi
706+
command:
707+
- ci-operator
708+
image: ci-operator:latest
709+
imagePullPolicy: Always
710+
name: ""
711+
resources:
712+
requests:
713+
cpu: 10m
714+
volumeMounts:
715+
- mountPath: /etc/boskos
716+
name: boskos
717+
readOnly: true
718+
- mountPath: /secrets/ci-pull-credentials
719+
name: ci-pull-credentials
720+
readOnly: true
721+
- mountPath: /secrets/gcs
722+
name: gcs-credentials
723+
readOnly: true
724+
- mountPath: /secrets/manifest-tool
725+
name: manifest-tool-local-pusher
726+
readOnly: true
727+
- mountPath: /etc/pull-secret
728+
name: pull-secret
729+
readOnly: true
730+
- mountPath: /etc/report
731+
name: result-aggregator
732+
readOnly: true
733+
serviceAccountName: ci-operator
734+
volumes:
735+
- name: boskos
736+
secret:
737+
items:
738+
- key: credentials
739+
path: credentials
740+
secretName: boskos-credentials
741+
- name: ci-pull-credentials
742+
secret:
743+
secretName: ci-pull-credentials
744+
- name: manifest-tool-local-pusher
745+
secret:
746+
secretName: manifest-tool-local-pusher
747+
- name: pull-secret
748+
secret:
749+
secretName: registry-pull-credentials
750+
- name: result-aggregator
751+
secret:
752+
secretName: result-aggregator
753+
trigger: (?m)^/test( | .* )regression-clusterinfra-azure-ipi-mapi-3of3,?($|\s.*)
599754
- agent: kubernetes
600755
always_run: true
601756
branches:

ci-operator/step-registry/openshift-extended/test/openshift-extended-test-commands.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,9 @@ function run {
348348
fi
349349

350350
echo "final scenarios: ${test_scenarios}"
351-
extended-platform-tests run all --dry-run | \
351+
echo "SHARD_ARGS=\"${SHARD_ARGS}\""
352+
353+
extended-platform-tests run all --dry-run extended-platform-tests run all --dry-run "${SHARD_ARGS:-}" | \
352354
grep -E "${test_scenarios}" | grep -E "${TEST_IMPORTANCE}" > ./case_selected
353355

354356
hardcoded_filters="~NonUnifyCI&;~Flaky&;~DEPRECATED&;~SUPPLEMENTARY&;~VMonly&;~ProdrunOnly&;~StagerunOnly&"

ci-operator/step-registry/openshift-extended/test/openshift-extended-test-ref.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ ref:
6363
documentation: |-
6464
Indicates if the active cluster is an OpenShift cluster or a derivative (e.g., Hypershift, Microshift).
6565
A value of "true" means the cluster is OpenShift or a derivative, while "false" means it is not (e.g., AKS).
66+
- name: SHARD_ARGS
67+
default: ""
68+
documentation: |-
69+
Arguments to be passed to 'extended-platform-tests' regarding the sharding parameters of this run
6670
- name: MULTI_STAGE_OVERRIDE_NETOBSERV_CS_IMAGE
6771
default: ""
6872
documentation: |-

ci-operator/step-registry/openshift/e2e/test/clusterinfra-qe/openshift-e2e-test-clusterinfra-qe-ref.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ ref:
2222
documentation: |-
2323
Indicates if the active cluster is an OpenShift cluster or a derivative (e.g., Hypershift, Microshift).
2424
A value of "true" means the cluster is OpenShift or a derivative, while "false" means it is not (e.g., AKS).
25+
- name: SHARD_ARGS
26+
default: ""
27+
documentation: |-
28+
Arguments to be passed to 'extended-platform-tests' regarding the sharding parameters of this run
2529
resources:
2630
requests:
2731
cpu: "1"

0 commit comments

Comments
 (0)