Commit Graph

135 Commits

Author SHA1 Message Date
Madhu Rajanna
b69c84ba1d ci: update mergify rules
updating mergify rules to drop
3.11 and add 3.13 support.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2024-12-03 15:34:13 +00:00
Nikhil-Ladha
4da71363b5 ci: update mergify config to replace,remove deprecated attributes
update mergify config to remove, replace the deprecated attributes.

Signed-off-by: Nikhil-Ladha <nikhilladha1999@gmail.com>
2024-08-21 20:24:22 +00:00
Madhu Rajanna
b0751cb06e ci: update rules for 3.12 release
updating release for 3.12 release

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2024-08-14 15:11:41 +00:00
Nikhil-Ladha
71cbf3d7eb ci: add test for uncommitted changes in deploy directory
added test for uncommitted changes in deploy directory under go-test GH action.
Also, created a new make target named `make check-deploy-committed` that
can be used to verify the uncommitted changes.

Signed-off-by: Nikhil-Ladha <nikhilladha1999@gmail.com>
2024-08-13 12:17:43 +00:00
Niels de Vos
2fd92573f4 ci: prevent incorrect pattern matching for skipping ci command
Mergify matches `body-raw` as regular expression, but that makes it
difficult (if not impossible) to match the `[` in a string.

Fixes: #4751
Signed-off-by: Niels de Vos <ndevos@ibm.com>
2024-08-09 10:50:56 +00:00
Niels de Vos
4a46ffd2b7 ci: detect [skip ci] in PR descriptions and prevent breakage
When Jenkins jobs are started by a comment, and if the PR contains
`[skip ci]` in the description, Jenkins does not run the requested job,
nor set a status for the job in the PR.

This causes Mergify to add the `ok-to-test` label again, instructing a
GitHub Action to add comments to start jobs in Jenkins. Once all
comments have been posted, the `ok-to-test` label is removed. Mergify
then notices that the jobs were not run, and adds the `ok-to-test` label
again.... Endlessly looping of adding the label, commenting and removing
the label as a result.

By reporting the brokenness of the PR description and marking the PR as
Draft, the looping is prevented.

Signed-off-by: Niels de Vos <ndevos@ibm.com>
2024-08-09 10:06:28 +00:00
Praveen M
ce3ec6acbf ci: remove k8s 1.30 tests from release-v3.11
k8s 1.30 tests were excluded for release-v3.11 but
merigfy had 1.30 tests conditions for release-v3.11.
This commit remove the these conditions for v3.11.

Signed-off-by: Praveen M <m.praveen@ibm.com>
2024-05-28 11:31:32 +00:00
Niels de Vos
53579991eb ci: require k8s-1.30 CI jobs for release-v3.11 and devel branches
Signed-off-by: Niels de Vos <ndevos@ibm.com>
2024-05-02 15:25:58 +00:00
Niels de Vos
3d3c0aae6c ci: do not require k8s-1.26 jobs for release-v3.11
Signed-off-by: Niels de Vos <ndevos@ibm.com>
2024-05-02 15:25:58 +00:00
Niels de Vos
2887747f37 ci: do not require Kubernetes 1.26 tests for the devel branch
Kubernetes 1.26 is End-Of-Life, the next version of Ceph-CSI will not
support that anymore.

Signed-off-by: Niels de Vos <ndevos@ibm.com>
2024-04-24 10:06:30 +00:00
Niels de Vos
c1dd15ae59 ci: do not add the ok-to-test label if there is a conflict
When there is a conflict in merging a PR, the `ok-to-test` label should
not be added automatically. This prevents a loop in triggering CI jobs
for PRs that might not even build.

Signed-off-by: Niels de Vos <ndevos@ibm.com>
2024-04-12 06:53:00 +02:00
Madhu Rajanna
66f71aea3a ci: remove auto merge condition
auto merge for release-3.11 is already
convered with regex check and we cannot
auto merge PR to the devel branch.
Removing unwanted checks.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2024-04-04 08:08:30 +02:00
Madhu Rajanna
61eec7e9c8 ci: remove condition for dependabot
dependabot will not create PR on the
release branch and for that reason
removing unused rule

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2024-04-04 08:08:30 +02:00
Madhu Rajanna
884d49e2ab ci: remove mergify rules for 3.11
we dont need a new mergify rule for
3.11 branch and the default mergirfy
with regex for `^(release-.+)$` branch
will cover it.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2024-04-04 08:08:30 +02:00
Rakshith R
4aa53c823e ci: modify mergifyio rules for new release-v3.11
This commit adds support for v3.11 backports
and removes support for v3.9 backports.

Signed-off-by: Rakshith R <rar@redhat.com>
2024-04-02 08:07:30 +00:00
Yati Padia
53b62804f4 ci: remove the merfigy rule for devel branch
this commit removes the automatic merge rule
for devel branch as this is always overwritten
from the conditions above and is not required

Signed-off-by: Yati Padia <ypadia@redhat.com>
2024-02-21 07:31:08 +00:00
Yati Padia
7d2e05b1f4 ci: update the merfigy rule to exclude k8s 1.25
This commit excludes the k8s 1.25 check from the
mergify rules for ready-to-merge label

Signed-off-by: Yati Padia <ypadia@redhat.com>
2024-02-21 07:31:08 +00:00
Niels de Vos
fe050557c9 ci: no need to test the devel branch with k8s v1.26
Signed-off-by: Niels de Vos <ndevos@ibm.com>
2024-02-15 08:22:16 +00:00
Riya Singhal
f464f0b85d ci: update mergify rules for release branches
Signed-off-by: Riya Singhal <rsinghal@redhat.com>
2024-02-15 08:22:16 +00:00
Riya Singhal
581efb3602 ci: update mergify rules for kubernetes 1.29
Signed-off-by: Riya Singhal <rsinghal@redhat.com>
2024-02-15 08:22:16 +00:00
Niels de Vos
60c65d4196 ci: update Mergify config for automatic merging of backports to 3.10
The `queue_rules` were updated earlier, but the rule for moving a
backport PR to the queue was not. By splitting the conditions for
release-v3.9 and other (newer) releases, the PRs can be queued with
their required Kubernetes version tests.

Signed-off-by: Niels de Vos <ndevos@ibm.com>
2023-12-07 13:10:10 +00:00
Niels de Vos
a57953313a ci: use regex comparing ~= for release-v* branch checking
It seems that `base=release-v*` does not match the `release-v3.10`
branch for some reason. Maybe a Mergify update requires stricter
checking of strings, and only allows the `~=` operator for regular
expressions now?

Regular expressions like `base~=^(devel)|(release-.+)$` seem to match
for `release-3.10`, so let's use that notation everywhere.

Signed-off-by: Niels de Vos <ndevos@ibm.com>
2023-12-01 09:32:19 +00:00
Niels de Vos
c8b542e49a ci: the release-v3.10 branch needs Kubernetes 1.28 jobs
With Ceph-CSI v3.10 we do not test Kubernetes 1.25 anymore, and we
expect Kubernetes 1.28 to be used.

Signed-off-by: Niels de Vos <ndevos@ibm.com>
2023-12-01 09:32:19 +00:00
Niels de Vos
bab4856513 ci: allow Mergify to merge PRs that modify the mergify configuration
The new `allow_merging_configuration_change` option can be enabled to

> Allow merging Mergify configuration change.

Which is useful for a more automated process when preparing for a
release.

See-also: https://docs.mergify.com/workflow/actions/merge/#parameters
Signed-off-by: Niels de Vos <ndevos@ibm.com>
2023-11-30 16:41:28 +01:00
Rakshith R
58b74a29e4 ci: modify mergifyio rules for new release-v3.10
This commit adds support for v3.10 backports
and removes support for v3.8 backports.

Signed-off-by: Rakshith R <rar@redhat.com>
2023-11-30 10:21:27 +01:00
Riya Singhal
4061399bb2 ci: skip testing on k1.28 for the current releases
Signed-off-by: Riya Singhal <rsinghal@redhat.com>
2023-08-28 13:38:34 +02:00
Riya Singhal
6a64394139 ci: skip kube 1.25 check for devel branch
Signed-off-by: Riya Singhal <rsinghal@redhat.com>
2023-08-28 13:38:34 +02:00
Madhu Rajanna
1098751843 ci: update mergify rules for kube v1.28.0
updating mergify rules to consider kubernetes
v1.28.0 ci jobs.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2023-08-21 09:32:25 +02:00
Rakshith R
e99e6174d9 ci: remove mergify rules for release-v3.7
This commit removes mergify rules to backport PR
to release-v3.7 branch.

Signed-off-by: Rakshith R <rar@redhat.com>
2023-06-27 12:15:15 +05:30
Rakshith R
46fbc4868d ci: add mergify rules for release-v3.9
This commit adds mergify rules to backport PR
to release-v3.9 branch.

Signed-off-by: Rakshith R <rar@redhat.com>
2023-06-27 12:15:15 +05:30
Rakshith R
37f1d722d3 ci: remove checks for k8s 1.24 ci tests
K8s 1.24 will be End of Life on 2023-07-28.
Therefore, removing checks for ci tests on
that version.

refer:
https://kubernetes.io/releases/#release-v1-24

Signed-off-by: Rakshith R <rar@redhat.com>
2023-06-16 09:07:18 +02:00
Rakshith R
be57cf9d94 ci: fix author=mergify[bot]
Author of mergifyio created pr is mergify[bot].
It needs the suffix `[bot]` for the condition
to be evaluated to true.

Signed-off-by: Rakshith R <rar@redhat.com>
2023-05-15 09:26:32 +02:00
Niels de Vos
287a854f7f ci: add ok-to-test label to all PRs in the merge queue
It seems that some PRs still get rebased by Mergify, whereas others get
tested for the **merge queue** by creating a new temporary PR. In both
cases the `ok-to-test` label should get set automatically.

Fixes: c4d372e (ci: automatically add `ok-to-test` to PRs created by Mergify)
Signed-off-by: Niels de Vos <ndevos@ibm.com>
2023-05-11 17:37:25 +02:00
Niels de Vos
c4d372e207 ci: automatically add ok-to-test to PRs created by Mergify
Mergify does not automatically rebase PRs that are queued for merging
(anymore?). Instead, it creates a new draft PR that is expected to get
tested by the CI. At the moment someone needs to add the `ok-to-test`
label to the PR. This is cumbersome and can cause delays in the merge
process.

The configuration for Mergify now includes a rule that any PR created by
Mergify, will automatically get the `ok-to-test` label. This should make
it easier to get PR merged.

See-also: #3796
Signed-off-by: Niels de Vos <ndevos@ibm.com>
2023-05-08 14:23:42 +02:00
riya-singhal31
014f81495b ci: update mergify rules for kubernetes 1.27
Signed-off-by: riya-singhal31 <rsinghal@redhat.com>
2023-04-27 10:11:29 +02:00
Madhu Rajanna
8fd0383cbe ci: remove rules for release-v3.6
As release 3.6 is deprecated and not
supported anymore removing its rules
from mergify

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2023-02-23 10:21:05 +01:00
Madhu Rajanna
f5d24628dc ci: add mergify rules for release-v3.8
added mergify rules to backport PR
to release-v3.8 branch.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2023-02-23 10:21:05 +01:00
Madhu Rajanna
cfa173d6ff ci: update mergify rules for Kubernetes 1.26
removed mergify rules for Kubernetes 1.23
and update the rules to consider Kubernetes
1.26

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2023-02-23 10:21:05 +01:00
Niels de Vos
991c21f7fd ci: do not add ok-to-test if CentOS jobs were successful
Mergify does not add the `ok-to-test` label immediately anymore. But
once the CentOS CI jobs have finished, the label still gets added. With
the additional check, this should not be the case anymore.

Signed-off-by: Niels de Vos <ndevos@ibm.com>
2023-02-22 16:45:20 +01:00
Niels de Vos
b7d2d28e69 ci: only add ok-to-test if there are no pending CentOS jobs
After the `ok-to-test` label was added, the commenter will remove the
label again. There is no need for Mergify to re-add the label while CI
jobs are still running.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2023-02-21 13:25:16 +01:00
Niels de Vos
56c8f1ea0b ci: do not let Mergify remove the ok-to-test label
Sometimes Mergify removed the `ok-to-test` label before the Pull Request
Commentor action have been run. With the updated commentor action, the
`ok-to-test` label is removed after leaving comments. There is no need
for Mergify to remove the label anymore.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2023-02-20 11:10:23 +01:00
Rakshith R
3dd6fb40f1 ci: remove deprecated rebase_fallback from .mergify.yml
This commit removes the deprecated `rebase_fallback` option
from .mergify.yml .

refer: https://docs.mergify.com/actions/merge/#options

Signed-off-by: Rakshith R <rar@redhat.com>
2023-02-14 20:03:05 +01:00
Niels de Vos
c452b56285 ci: prevent always removing ok-to-test label
The check for a rebase always hits, but the actions for that inspect the
event for a real rebase. Removing the `ok-to-test` label is not suitable
in the Mergify check, as the label action does not inspect the event.
This caused the `ok-to-test` label to be removed on every Mergify
validation of the PR.

Fixes: ba68ce6 (ci: drop `ok-to-test` label when a PR is rebased)
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2023-02-08 14:09:33 +01:00
Niels de Vos
567b7df197 ci: bot_account is not available for our Mergify usage
`bot_account` is a feature that is part of the paid subscription. The
Ceph organization does not have that.

Mergify will use the author of the PR for rebasing by default. This
isn't very nice, but we can't change it at the moment.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2023-02-01 14:44:13 +01:00
Niels de Vos
62ec2171e7 ci: use ceph-csi-bot for Mergify actions
The `bot_account` option was not part of the Open Source plan, but now
it is. When Mergify rebases PRs, it sometimes leaves the following
message:

```
This pull request got rebased on behalf of a random user of the
organization. This behavior will change on the 1st February 2023,
Mergify will pick the author of the pull request instead.

To get the future behavior now, you can configure bot_account options
(e.g.: bot_account: { author } or update_bot_account: { author }.

Or you can create a dedicated github account for squash and rebase
operations, and use it in different bot_account options.
```

It is clearer for everyone when the Ceph-CSI Bot is used for automated
actions. Contributers might get confused why the PR was updated in their
name, without them doing anything.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2023-02-01 13:52:33 +01:00
Niels de Vos
ba68ce6437 ci: drop ok-to-test label when a PR is rebased
When reviews are dropped, tests should most often not automatically
start again.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2023-02-01 13:52:33 +01:00
Niels de Vos
9a61d9cbfc ci: do not immediately remove the ok-to-test label
It seems that Mergify removes the `ok-to-test` label as soon as someone
adds it. We don't want that, as it can trigger more CI runs than needed.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2022-11-10 11:40:28 +01:00
Niels de Vos
2518c39956 ci: automatically remove ok-to-test and set it when queuing a PR
The `ok-to-test` label currently needs to be removed and re-added when a
PR is rebased for re-queuing.

It should be possible to automate this, by removing the `ok-to-test`
label when a PR gets queued. It can automatically be added again when
the PR has embarked the merge train.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2022-11-10 15:11:28 +05:30
Madhu Rajanna
f19805a40b ci: consider kubernetes 1.25 for tests
As we have successful runs with kubernetes
1.25 Marking is as default for CI jobs and
required for merging PR.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2022-10-28 15:57:05 +02:00
Madhu Rajanna
4039bf5063 ci: remove kubernetes 1.22 tests
As we need to test with last 3 Kubernetes
releases removing Kubernetes 1.22
as we have 1.23, 1.24 and 1.25

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2022-10-28 15:57:05 +02:00