-
Notifications
You must be signed in to change notification settings - Fork 547
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
ci: exclude branches from the testing matrix for ok-to-test
comments
#4068
Conversation
It seems that `matrix.*` parameters can not be used in the if-statement for a job. Now using the `exclude:` parameter with a more dynamically constructed value for the branch. If the value for the branch is not part of the initial branch list, the value will not be excluded, so the jobs are expected to run. Signed-off-by: Niels de Vos <[email protected]>
/test ci/centos/k8s-e2e-external-storage |
/test ci/centos/mini-e2e-helm |
/test ci/centos/mini-e2e |
/test ci/centos/upgrade-tests |
branch: devel | ||
branch: > | ||
${{ "devel" == github.base_ref | ||
&& github.base_ref || "no-exclude" }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nixpanic can you point me to the reference to no-exclude? i tried to find one but didn't get any, how about below version
strategy:
matrix:
k8s: ["1.25", "1.26", "1.27", "1.28"]
branch:
- github.base_ref
exclude:
# the next Ceph-CSI version will not be tested with old Kubernetes
- k8s: "1.25"
branch: devel
# Ceph-CSI <= 3.9 was released before Kubernetes 1.28
- k8s: "1.28"
branch: release-v3.8
- k8s: "1.28"
branch: release-v3.9
if: >
(github.event.label.name == 'ok-to-test' &&
github.event.pull_request.merged != true )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no-exclude
is just a placeholder. The branch:
value is expanded to the name of the branch, or the non-existing branch no-exclude
. If the branch:
argument is a non-existing branch, the Kubernetes version will not be excluded (hence included and tested).
It seems that
matrix.*
parameters can not be used in the if-statement for a job. Now using theexclude:
parameter with a more dynamically constructed value for the branch. If the value for the branch is not part of the initial branch list, the value will not be excluded, so the jobs are expected to run.Show available bot commands
These commands are normally not required, but in case of issues, leave any of
the following bot commands in an otherwise empty comment in this PR:
/retest ci/centos/<job-name>
: retest the<job-name>
after unrelatedfailure (please report the failure too!)