Commit Graph

92 Commits

Author SHA1 Message Date
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
Niels de Vos
150de619ee ci: have mergify set the component/build label on PRs
Quite a few PRs have the `build:` prefix. It would be good to teach
Mergify to set the label for those.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2021-05-17 09:56:56 +05:30
Niels de Vos
86cfc3dd0c ci: update mergify config for labelling PRs
When the configuration for Mergify itself gets updated, there is not
need to run the e2e tests.

It seems that the `(ci)` part of matching a title for ci/testing PRs
would match partial words like 'capacity'. This is not intended, so
rephrasing the regex and adding `e2e` as match too.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2021-05-07 07:43:40 +05:30
Niels de Vos
90fd12629f ci: use mergify to add labels to PRs
Adding labels to Pull-Requests can be done by Mergify. It is very useful
to filter PRs on their labels so that experts in certain areas can
identify PRs to review.

Adding labels is currently a complete manual process, this adds some
automation for it. There is no intention of it being complete, this is
mostly for getting started and trying things out.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2021-05-05 17:53:13 +05:30
Niels de Vos
70f4f3d5f6 ci: drop quotes for Mergify regex matching
The matching with regexes on the `base=` configuration in Mergify does
not seem to work as intended. Possibly this is due the addtional quotes
around the regex.

Fixes: 8d7c66363 (ci: apply standard Mergify rules for release branches too)
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2021-05-04 14:08:10 +05:30
Niels de Vos
8d7c66363d ci: apply standard Mergify rules for release branches too
It is not always possible to automatically backport PRs to release
branches. That also means that these backport PRs are not created by the
mergify[bot] account. Because of this, it is needed to manually merge
PRs, as Mergify refuses to do it.

By changing the `base=` option to match a regular expression that
includes both `devel` and `release-*` branches, Mergify should assist
with merging PRs to release branches too.

Note that the `ci/centos` branch is different, as runs other tests than
the normal branches.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2021-05-04 12:05:45 +05:30
Rakshith R
e005099549 cleanup: fix author in mergifyio backport conditions
All backport prs are authored by mergify[bot] not ceph-csi-bot
and there is no support for bot_account to create backport pr
currently.
Fixes: #1994

Signed-off-by: Rakshith R <rar@redhat.com>
2021-04-22 15:03:32 +05:30
Madhu Rajanna
a3b3858a97 ci: add mergify rules for release 3.3
as we have a new release-v3.3 branch. adding
the mergify rules for auto merge and auto backport
based on backport-to-release-v3.3 label.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2021-04-15 17:39:49 +05:30
Madhu Rajanna
d94a7ca7e1 revert: cleanup: update mergify.yml to use merge_bot_account option
This reverts commit 31634ede3d.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2021-04-15 17:34:08 +05:30
Rakshith R
31634ede3d cleanup: update mergify.yml to use merge_bot_account option
New version of mergifyio requires the use `merge_bot_account`
instead of `bot_accout` configuration option.

Signed-off-by: Rakshith R <rar@redhat.com>
2021-04-15 12:00:45 +05:30
Yug
f4d9fd0e89 ci: Updated mergify rules for containerized-tests
Since github actions cover all the tests covered by
the containerized tests, disabling them in upstream
to avoid running repetitive tests and properly utilize
CI instances.
The test will still be available to run locally.

Signed-off-by: Yug <yuggupta27@gmail.com>
2021-04-07 18:26:07 +05:30