Commit Graph

102 Commits

Author SHA1 Message Date
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
Rakshith R
6e100dde2d ci: skip mutli-arch-build for doc and mergify prs
Signed-off-by: Rakshith R <rar@redhat.com>
2022-08-19 15:42:16 +02:00
Humble Chirammal
8d3e63a2b2 build: remove release 3.5 backport rule
considering we have 3.7 release in place, this commit remove
the release 3.5 backporting based on the labels in the repo.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2022-08-19 08:12:27 +05:30
Humble Chirammal
7e44e557f0 build: add mergify rule for backport PRs in release 3.7 branch
This commit add rule for backporting to release 3.7 branch with
label backport-to-release-v3.7

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2022-08-19 08:12:27 +05:30
Rakshith R
1ea4a1b790 ci: fix invalid mergifyio configuration
Comment out `comment: ` settings, since it
does not have any options set, otherwise
throws the following error.
```
The current Mergify configuration is invalid
required key not provided @ defaults → actions → comment → message
```

Signed-off-by: Rakshith R <rar@redhat.com>
2022-08-08 13:35:30 +05:30
Madhu Rajanna
3ddec80346 ci: update mergify rules for kubernetes 1.24
Updating mergify rules to consider CI run on
Kubernetes 1.24 and discard CI run on kubernetes
1.21 as we no longer need it.

updates: #3086

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2022-07-25 09:37:02 +02:00
Madhu Rajanna
6333c4b1e6 ci: remove duplicate release-3.5 merge rules
we already have generic rules to merge the PR's
in devel and release branches with `automatic merge`
rules. Removing the duplicate release-3.5 rule.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2022-04-06 20:59:07 +05:30
Madhu Rajanna
519202629e ci: remove release-v3.4 mergify rules
as we have deprecated the 3.4 release
removing the mergify rules for the same.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2022-04-06 20:59:07 +05:30
Madhu Rajanna
1b52256a22 ci: add mergify rule for 3.6 backport
added mergify rules to create the backport
PR for release-3.6 branch.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2022-04-06 20:59:07 +05:30
Niels de Vos
9fe3870874 ci: add "component/nfs" label with Mergify
"component/nfs" has been added to the labels in the repository, and
Mergify should be able to add that to PRs.

Updates: #2913
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2022-03-17 14:10:57 +01:00
Niels de Vos
a553157b15 ci: don't dismiss review if PR has not merged
Pull requests are not going to be queued if at the same time the pull
request review are dismiss

Original-author: Mehdi ABAAKOUK <sileht@sileht.net>
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2022-01-27 20:57:15 +05:30
Humble Chirammal
177cc078e1 ci: remove duplicate validation DCO in default rule
removing duplicated validation of DCO from the default
rule.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2022-01-27 16:07:45 +01:00
Humble Chirammal
63913141a4 ci: add mergify rules for release-3.5 backport
This add automatic backport rules for version 3.5

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2022-01-13 15:25:05 +05:30
Niels de Vos
0c109c5dec ci: remove queue actions from non-merge rules in Mergify config
By the addition of the queue rules in the Mrgify configuration, all PRs
that require changes, or have been updated and review should be dropped,
are now added to the queue for merging. This is obviously not what we
want.

Fixes: 43fc945 ("ci: move from merge action to queue action")
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2022-01-11 13:57:17 +05:30
Humble Chirammal
43fc945be6 ci: move from merge action to queue action
as mentioned in the below blog the support for strict mode
and merge action will be done soon in mergify. This brings
the change requested for the same.

Ref# https://blog.mergify.com/strict-mode-deprecation/

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2022-01-11 09:11:46 +01:00
Madhu Rajanna
99b814fe94 ci: remove kubernetes 1.20 from condition
as we added kubernetes 1.23 for mergify, removing
older version i.e 1.20 as we will run tests
only on latest 3 kubernetes releases.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2021-12-10 13:11:38 +05:30
Madhu Rajanna
8b48ded21f ci: add mergify condition for kubernetes 1.23
as we are running tests on kubernetes 1.23 by
default, adding mergify condition to check test
passed on kubernetes 1.23 also.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2021-12-10 13:11:38 +05:30
Madhu Rajanna
0bcaffc433 ci: remove release-v3.3 rules
as we are no longer supporting
the release 3.3.x removing the
mergify rules for the same.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2021-12-10 13:11:38 +05:30
Niels de Vos
58074109d1 Revert "ci: have Mergify label PRs for actions/ with ci/skip/e2e"
It seems that the matching condition on the modified files with

    -files~=^(!?actions/)

validates to 'true' when that is not intended. The example in the
Mergify documentation does not seem to be correct :-/

This reverts commit 411bf33a3d.

See-also: https://docs.mergify.com/examples/#merging-based-on-modified-files
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2021-11-23 16:02:27 +01:00
Niels de Vos
1ec7c0e5d8 ci: ignore case when matching Mergify config update
PRs that contain `mergify` or `Mergify` in the subject should both match
the rule to add labels. The regular expressions can include `(?i)` to
make the matching case-insensitive.

See-also: https://docs.mergify.com/configuration/#regular-expressions
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2021-11-23 15:35:28 +01:00
Niels de Vos
411bf33a3d ci: have Mergify label PRs for actions/ with ci/skip/e2e
The matching checks the list of modified files, and if it does not
contain anything outside the `actions/` directory, the labels are
applied.

Actions are not tested with e2e, so changes can be labelled to skip
these time and resource intensive tests.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2021-11-23 15:35:28 +01:00
Rakshith R
191b603974 ci: remove gh action gosec linter,since it is already part of golangci
This commit removes gosec standalone linter and related parts,
since golangci linter runs gosec linter too.

Signed-off-by: Rakshith R <rar@redhat.com>
2021-11-16 12:29:56 +01:00
Niels de Vos
dfc8f64bdd ci: require passing of k8s-e2e-external-storage jobs for merge
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2021-09-29 12:45:02 +05:30
Niels de Vos
96ba1d4799 ci: prevent mergify conflict message for dependabot PRs
There is no use in having Mergify posting messages to Dependabot and
asking for resolving of merge conflicts. Dependabot will try to do that
automatically, and posts a message when some other action is needed.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2021-09-02 12:32:30 +05:30
Niels de Vos
1b30a58e53 ci: skip commitlint for dependabot PRs
Dependabot creates commit messages that commitlint fails to parse
correctly. The messages contain simple references to which dependencies
are updated, and do not need full validation like manual written
messages do.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2021-08-31 09:02:11 +02:00
Humble Chirammal
92e7f16654 ci: remove the rules for backport on unsupported versions
CSI version v3.3.0 and above are the supported versions now and this
patch also adjust the mergify rules according to that, ie the backport
rules are removed for all unsupported versions here.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2021-08-31 10:56:28 +05:30
Madhu Rajanna
0a7a490496 ci: update mergify rules to include teams
updated mergify rules to consider the teams
approval to merge a PR.

more details at #2367

fixes #2367

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2021-08-25 16:33:56 +05:30
Yug Gupta
bc18732cb7 ci: require job for k8s v1.22 in place of v1.19
As kubernetes v1.19 is heading towards its EOL
on 2021-09-30, run tests on kubernetes v1.22
and require it to pass for merging.

Signed-off-by: Yug Gupta <yuggupta27@gmail.com>
2021-08-12 18:12:27 +05:30
Madhu Rajanna
0b6322afda ci: update mergify for commitlint
updated commitlint mergify rules to
consider the commitlint status to
merge the PR.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2021-08-05 14:50:12 +05:30
Madhu Rajanna
b1e86ee01c ci: disable commitlint mergify rule
currently PR merging is blocked due to
commitlint issue. disabling commitlint
or the release branches now. more details at
https://github.com/ceph/ceph-csi/pull/2342

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2021-08-04 09:48:45 +05:30
Niels de Vos
ce9e54e5bd ci: add Mergify backport rules for release-v3.4
The new `backport-to-release-v3.4` label can be added to PRs and Mergify
will create a backport once the PR for the devel branch has been merged.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2021-07-28 12:53:58 +05:30
Niels de Vos
75f385e881 ci: require CI jobs with Kubernetes 1.21 to pass
Closes: #1963
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2021-06-30 19:10:16 +05:30
Madhu Rajanna
36db988f73 ci: pushing artifacts using github actions
As Travis CI `https://travis-ci.org/` is getting
shutdown date on June 15th. Either we need to move
to new place https://www.travis-ci.com/ or we can
switch to github action to push image and the helm
charts when a PR is merged.

fixes: #1781

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2021-06-10 10:17:19 +05:30
Rakshith R
5cf3b4ab80 cleanup: update mergify.yml to remove bot_account option
Mergify.io has removed bot_account from its free open source plan.
This commit removes bot_account option from comment, merge and rebase
actions default and documenting the implications going forward.

Signed-off-by: Rakshith R <rar@redhat.com>
2021-05-20 13:38:00 +05:30