Skip to content

[WIP] run ptp ci in dev branch #63089

New issue

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

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

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -299,13 +299,15 @@ log_chronyd_status() {

#Set status and run playbooks
status=0
ANSIBLE_STDOUT_CALLBACK=debug ansible-playbook -i $SHARED_DIR/inventory ~/ocp-install.yml -vv || status=$?
#[dev-ci] skip ocp-install to speed up the setup
#ANSIBLE_STDOUT_CALLBACK=debug ansible-playbook -i $SHARED_DIR/inventory ~/ocp-install.yml -vv || status=$?
ansible-playbook -i $SHARED_DIR/inventory ~/fetch-kubeconfig.yml -vv || true
ANSIBLE_STDOUT_CALLBACK=debug ansible-playbook -i $SHARED_DIR/inventory ~/fetch-information.yml -vv || true
if [[ "$status" == 0 ]]; then
#installer has issues applying machine-configs with OCP 4.10, using manual way
KUBECONFIG=$SHARED_DIR/kubeconfig oc apply -f $SHARED_DIR/disable_ntp.yml || true
wait_for_mcp "2700s" || true
log_chronyd_status || true
fi
#[dev-ci] skip this check
# if [[ "$status" == 0 ]]; then
# #installer has issues applying machine-configs with OCP 4.10, using manual way
# KUBECONFIG=$SHARED_DIR/kubeconfig oc apply -f $SHARED_DIR/disable_ntp.yml || true
# wait_for_mcp "2700s" || true
# log_chronyd_status || true
# fi
exit ${status}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ workflow:
test:
- ref: telco5g-ptp-tests
post:
- chain: gather
#[dev-ci] skip gather to speed up the pipeline
# - chain: gather
documentation: |-
Install a cluster through an ssh for telco5g testing
and run telco5g e2e PTP tests on it.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ spec:

set -x

git clone --single-branch --branch OPERATOR_VERSION https://github.com/openshift/ptp-operator.git
#[dev-ci] use forked dev repo
#git clone --single-branch --branch OPERATOR_VERSION https://github.com/openshift/ptp-operator.git
git clone --single-branch --branch OPERATOR_VERSION https://github.com/jzding/ptp-operator.git
cd ptp-operator
export IMG=PTP_IMAGE
export T5CI_VERSION="T5CI_VERSION_VAL"
Expand Down Expand Up @@ -224,6 +226,11 @@ export IMG_VERSION="release-${T5CI_VERSION}"

export KUBECONFIG=$SHARED_DIR/kubeconfig

#[dev-ci] use dev branch for test code if needed
export TEST_BRANCH="remove-consumer-v1"
#[dev-ci] use dev branch for product code
export PTP_UNDER_TEST_BRANCH="remove-consumer-v1"

# Set go version
if [[ "$T5CI_VERSION" =~ 4.1[2-5]+ ]]; then
source $HOME/golang-1.20
Expand All @@ -245,7 +252,9 @@ build_images

# deploy ptp-operator

git clone https://github.com/openshift/ptp-operator.git -b "${PTP_UNDER_TEST_BRANCH}" ptp-operator-under-test
#[dev-ci] use dev branch for product code
#git clone https://github.com/openshift/ptp-operator.git -b "${PTP_UNDER_TEST_BRANCH}" ptp-operator-under-test
git clone https://github.com/jzding/ptp-operator.git -b "${PTP_UNDER_TEST_BRANCH}" ptp-operator-under-test

cd ptp-operator-under-test

Expand Down Expand Up @@ -277,7 +286,7 @@ if [[ "$T5CI_VERSION" =~ 4.1[2-8]+ ]]; then
export CONSUMER_IMG="quay.io/redhat-cne/cloud-event-consumer:release-4.18"
# event API v1 is removed from 4.19 onwards
else
export CONSUMER_IMG="quay.io/redhat-cne/cloud-event-consumer:latest"
export CONSUMER_IMG="quay.io/jacding/cloud-event-consumer:remove-v1"
fi

# wait for the linuxptp-daemon to be deployed
Expand All @@ -286,7 +295,9 @@ retry_with_timeout 400 5 kubectl rollout status daemonset linuxptp-daemon -nopen
# Run ptp conformance test
cd -
echo "running conformance tests from branch ${TEST_BRANCH}"
git clone https://github.com/openshift/ptp-operator.git -b "${TEST_BRANCH}" ptp-operator-conformance-test
#[dev-ci] use dev branch for test code if needed
#git clone https://github.com/openshift/ptp-operator.git -b "${TEST_BRANCH}" ptp-operator-conformance-test
git clone https://github.com/jzding/ptp-operator.git -b "${TEST_BRANCH}" ptp-operator-conformance-test

cd ptp-operator-conformance-test

Expand Down