Skip to content

Commit a3bbef9

Browse files
authored
ptp ci rhel based schedule (openshift#64453)
Signed-off-by: Jack Ding <[email protected]>
1 parent f027333 commit a3bbef9

14 files changed

+49
-38
lines changed

ci-operator/config/openshift/release/openshift-release-master__nightly-4.12.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -834,10 +834,11 @@ tests:
834834
workflow: telco5g-sno-cnf
835835
- as: e2e-telco5g-ptp
836836
cluster: build05
837-
cron: 0 16 * * 6
837+
cron: 0 21 * * 6
838838
restrict_network_access: false
839839
steps:
840840
env:
841+
SKIP_OCP_INSTALL: "false"
841842
T5CI_JOB_TYPE: ptp
842843
T5CI_VERSION: "4.12"
843844
observers:

ci-operator/config/openshift/release/openshift-release-master__nightly-4.13.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -784,10 +784,11 @@ tests:
784784
workflow: ipi-azure
785785
- as: e2e-telco5g-ptp
786786
cluster: build05
787-
cron: 0 18 * * 6
787+
cron: 0 9 * * 6
788788
restrict_network_access: false
789789
steps:
790790
env:
791+
SKIP_OCP_INSTALL: "true"
791792
T5CI_JOB_TYPE: ptp
792793
T5CI_VERSION: "4.13"
793794
observers:

ci-operator/config/openshift/release/openshift-release-master__nightly-4.14.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -797,10 +797,11 @@ tests:
797797
workflow: telco5g-sno-cnf
798798
- as: e2e-telco5g-ptp
799799
cluster: build05
800-
cron: 0 2 * * 1,3,5
800+
cron: 0 21 * * 0,2,4
801801
restrict_network_access: false
802802
steps:
803803
env:
804+
SKIP_OCP_INSTALL: "false"
804805
T5CI_JOB_TYPE: ptp
805806
T5CI_VERSION: "4.14"
806807
observers:

ci-operator/config/openshift/release/openshift-release-master__nightly-4.15.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -868,10 +868,11 @@ tests:
868868
workflow: telco5g-sno-cnf
869869
- as: e2e-telco5g-ptp
870870
cluster: build05
871-
cron: 0 20 * * 6
871+
cron: 0 5 * * 6
872872
restrict_network_access: false
873873
steps:
874874
env:
875+
SKIP_OCP_INSTALL: "false"
875876
T5CI_JOB_TYPE: ptp
876877
T5CI_VERSION: "4.15"
877878
observers:

ci-operator/config/openshift/release/openshift-release-master__nightly-4.16.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -780,10 +780,11 @@ tests:
780780
workflow: telco5g-sno-cnf
781781
- as: e2e-telco5g-ptp
782782
cluster: build05
783-
cron: 0 4 * * *
783+
cron: 0 5 * * 0-5
784784
restrict_network_access: false
785785
steps:
786786
env:
787+
SKIP_OCP_INSTALL: "true"
787788
T5CI_JOB_TYPE: ptp
788789
T5CI_VERSION: "4.16"
789790
observers:

ci-operator/config/openshift/release/openshift-release-master__nightly-4.17.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -753,10 +753,11 @@ tests:
753753
workflow: telco5g-sno-cnf
754754
- as: e2e-telco5g-ptp
755755
cluster: build05
756-
cron: 0 22 * * 6
756+
cron: 0 1 * * 6
757757
restrict_network_access: false
758758
steps:
759759
env:
760+
SKIP_OCP_INSTALL: "false"
760761
T5CI_JOB_TYPE: ptp
761762
T5CI_VERSION: "4.17"
762763
observers:

ci-operator/config/openshift/release/openshift-release-master__nightly-4.18.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -864,10 +864,11 @@ tests:
864864
workflow: telco5g-sno-cnf
865865
- as: e2e-telco5g-ptp
866866
cluster: build05
867-
cron: 0 6 * * *
867+
cron: 0 1 * * 0-5
868868
restrict_network_access: false
869869
steps:
870870
env:
871+
SKIP_OCP_INSTALL: "false"
871872
T5CI_JOB_TYPE: ptp
872873
T5CI_VERSION: "4.18"
873874
observers:

ci-operator/config/openshift/release/openshift-release-master__nightly-4.19.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -872,10 +872,11 @@ tests:
872872
workflow: telco5g-sno-cnf
873873
- as: e2e-telco5g-ptp
874874
cluster: build05
875-
cron: 0 2 * * 2,4,6
875+
cron: 0 23 * * 1,3,5
876876
restrict_network_access: false
877877
steps:
878878
env:
879+
SKIP_OCP_INSTALL: "true"
879880
T5CI_JOB_TYPE: ptp
880881
T5CI_VERSION: "4.19"
881882
observers:

ci-operator/config/openshift/release/openshift-release-master__nightly-4.20.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -852,10 +852,11 @@ tests:
852852
workflow: telco5g-sno-cnf
853853
- as: e2e-telco5g-ptp
854854
cluster: build05
855-
cron: 0 8 * * *
855+
cron: 0 7 * * 0-5
856856
restrict_network_access: false
857857
steps:
858858
env:
859+
SKIP_OCP_INSTALL: "false"
859860
T5CI_JOB_TYPE: ptp
860861
T5CI_VERSION: "4.19"
861862
observers:

ci-operator/jobs/openshift/release/openshift-release-master-periodics.yaml

+9-9
Original file line numberDiff line numberDiff line change
@@ -69343,7 +69343,7 @@ periodics:
6934369343
secretName: result-aggregator
6934469344
- agent: kubernetes
6934569345
cluster: build05
69346-
cron: 0 16 * * 6
69346+
cron: 0 21 * * 6
6934769347
decorate: true
6934869348
decoration_config:
6934969349
skip_cloning: true
@@ -75596,7 +75596,7 @@ periodics:
7559675596
secretName: result-aggregator
7559775597
- agent: kubernetes
7559875598
cluster: build05
75599-
cron: 0 18 * * 6
75599+
cron: 0 9 * * 6
7560075600
decorate: true
7560175601
decoration_config:
7560275602
skip_cloning: true
@@ -82620,7 +82620,7 @@ periodics:
8262082620
secretName: result-aggregator
8262182621
- agent: kubernetes
8262282622
cluster: build05
82623-
cron: 0 2 * * 1,3,5
82623+
cron: 0 21 * * 0,2,4
8262482624
decorate: true
8262582625
decoration_config:
8262682626
skip_cloning: true
@@ -90454,7 +90454,7 @@ periodics:
9045490454
secretName: result-aggregator
9045590455
- agent: kubernetes
9045690456
cluster: build05
90457-
cron: 0 20 * * 6
90457+
cron: 0 5 * * 6
9045890458
decorate: true
9045990459
decoration_config:
9046090460
skip_cloning: true
@@ -100487,7 +100487,7 @@ periodics:
100487100487
secretName: result-aggregator
100488100488
- agent: kubernetes
100489100489
cluster: build05
100490-
cron: 0 4 * * *
100490+
cron: 0 5 * * 0-5
100491100491
decorate: true
100492100492
decoration_config:
100493100493
skip_cloning: true
@@ -110748,7 +110748,7 @@ periodics:
110748110748
secretName: result-aggregator
110749110749
- agent: kubernetes
110750110750
cluster: build05
110751-
cron: 0 22 * * 6
110751+
cron: 0 1 * * 6
110752110752
decorate: true
110753110753
decoration_config:
110754110754
skip_cloning: true
@@ -125133,7 +125133,7 @@ periodics:
125133125133
secretName: result-aggregator
125134125134
- agent: kubernetes
125135125135
cluster: build05
125136-
cron: 0 6 * * *
125136+
cron: 0 1 * * 0-5
125137125137
decorate: true
125138125138
decoration_config:
125139125139
skip_cloning: true
@@ -139815,7 +139815,7 @@ periodics:
139815139815
secretName: result-aggregator
139816139816
- agent: kubernetes
139817139817
cluster: build05
139818-
cron: 0 2 * * 2,4,6
139818+
cron: 0 23 * * 1,3,5
139819139819
decorate: true
139820139820
decoration_config:
139821139821
skip_cloning: true
@@ -154942,7 +154942,7 @@ periodics:
154942154942
secretName: result-aggregator
154943154943
- agent: kubernetes
154944154944
cluster: build05
154945-
cron: 0 8 * * *
154945+
cron: 0 7 * * 0-5
154946154946
decorate: true
154947154947
decoration_config:
154948154948
skip_cloning: true

ci-operator/step-registry/telco5g/ptp-cluster-setup/telco5g-ptp-cluster-setup-commands.sh

+11-5
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ cat << EOF > ~/fetch-kubeconfig.yml
155155
regexp: ' server: https://api.*'
156156
replace: " server: https://${CLUSTER_API_IP}:${CLUSTER_API_PORT}"
157157
delegate_to: localhost
158-
158+
159159
- name: Add docker auth to enable pulling containers from CI registry
160160
shell: >-
161161
kcli ssh root@${CLUSTER_NAME}-installer
@@ -299,13 +299,19 @@ log_chronyd_status() {
299299

300300
#Set status and run playbooks
301301
status=0
302-
ANSIBLE_STDOUT_CALLBACK=debug ansible-playbook -i $SHARED_DIR/inventory ~/ocp-install.yml -vv || status=$?
302+
303+
if [[ "$SKIP_OCP_INSTALL" != "true" ]]; then
304+
ANSIBLE_STDOUT_CALLBACK=debug ansible-playbook -i $SHARED_DIR/inventory ~/ocp-install.yml -vv || status=$?
305+
fi
306+
307+
# Fetch kubeconfig and cluster information
303308
ansible-playbook -i $SHARED_DIR/inventory ~/fetch-kubeconfig.yml -vv || true
304309
ANSIBLE_STDOUT_CALLBACK=debug ansible-playbook -i $SHARED_DIR/inventory ~/fetch-information.yml -vv || true
305-
if [[ "$status" == 0 ]]; then
310+
311+
if [[ "$SKIP_OCP_INSTALL" != "true" && "$status" -eq 0 ]]; then
306312
#installer has issues applying machine-configs with OCP 4.10, using manual way
307-
KUBECONFIG=$SHARED_DIR/kubeconfig oc apply -f $SHARED_DIR/disable_ntp.yml || true
313+
KUBECONFIG="$SHARED_DIR/kubeconfig" oc apply -f "$SHARED_DIR/disable_ntp.yml" || true
308314
wait_for_mcp "2700s" || true
309315
log_chronyd_status || true
310316
fi
311-
exit ${status}
317+
exit $status

ci-operator/step-registry/telco5g/ptp-cluster-setup/telco5g-ptp-cluster-setup-ref.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,8 @@ ref:
2121
- name: T5CI_JOB_TYPE
2222
default: ""
2323
documentation: Job type of Telco5G CI jobs
24+
- name: SKIP_OCP_INSTALL
25+
default: "false"
26+
documentation: Skip ocp install if this is set to "true".
2427
documentation: |-
2528
Set up Telco5G baremetal cluster

ci-operator/step-registry/telco5g/ptp/telco5g-ptp-workflow.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
workflow:
22
as: telco5g-ptp
33
steps:
4-
# pre:
5-
# - ref: telco5g-ptp-cluster-setup
4+
pre:
5+
- ref: telco5g-ptp-cluster-setup
66
test:
77
- ref: telco5g-ptp-tests
88
post:

ci-operator/step-registry/telco5g/ptp/tests/telco5g-ptp-tests-commands.sh

+6-13
Original file line numberDiff line numberDiff line change
@@ -273,10 +273,15 @@ else
273273
fi
274274

275275
if [[ "$T5CI_VERSION" =~ 4.1[2-8]+ ]]; then
276+
echo "Version is less than 4.19"
277+
# release-4.18 consumer image supports event API v1
276278
export CONSUMER_IMG="quay.io/redhat-cne/cloud-event-consumer:release-4.18"
277-
# event API v1 is removed from 4.19 onwards
279+
TEST_MODES=("dualnicbc" "bc" "oc")
278280
else
281+
echo "Version is 4.19 or greater"
279282
export CONSUMER_IMG="quay.io/redhat-cne/cloud-event-consumer:latest"
283+
# Only run tgm and dualfollower tests from 4.19 onwards
284+
TEST_MODES=("tgm" "dualfollower" "dualnicbc" "bc" "oc")
280285
fi
281286

282287
# wait for the linuxptp-daemon to be deployed
@@ -352,18 +357,6 @@ sleep 300
352357
# get RTC logs
353358
print_time
354359

355-
# Only run dual follower tests for versions < 4.19
356-
version=$(oc version -ojson| jq -r '.openshiftVersion')
357-
min_required="4.19"
358-
359-
if [[ "$(printf '%s\n' "$version" "$min_required" | sort -V | head -n1)" != "$min_required" ]]; then
360-
echo "Version is less than 4.19"
361-
TEST_MODES=("dualnicbc" "bc" "oc")
362-
else
363-
echo "Version is 4.19 or greater"
364-
TEST_MODES=("tgm" "dualfollower" "dualnicbc" "bc" "oc")
365-
fi
366-
367360
# Run tests
368361
for mode in "${TEST_MODES[@]}"; do
369362
echo "Running tests for PTP_TEST_MODE=${mode}"

0 commit comments

Comments
 (0)