141 Commits

Author SHA1 Message Date
Step Security Bot
de8aae1619
[StepSecurity] ci: Harden GitHub Actions in merge-conflict-checker.yml (#6802) 2022-10-08 11:40:43 +05:30
Rohit Yadav
4d41b6bc44 Merge remote-tracking branch 'origin/4.17' 2022-08-09 12:33:39 +02:00
Rohit Yadav
2d0a2e388d .github: add codecov coverage check
It seems codecov can overcome the pull_request_target limitation/issue
compared to sonarcloud coverage. We've some other Apache projects who
use `codecov` now and this ticket to add support with infra:
https://issues.apache.org/jira/browse/INFRA-23561

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-08-09 12:29:19 +02:00
John Bampton
a039250b3b
.github: Lint modified files only with Super-Linter (#6531)
https://github.com/github/super-linter#standard-image
2022-07-07 11:57:29 +05:30
Rohit Yadav
711d4b9f0f Merge remote-tracking branch 'origin/4.17' 2022-07-01 11:26:10 +05:30
Rohit Yadav
85df82c2a9 Revert ".github: try using just sonarcloud job on pull_request target only"
This reverts commit aad73322aff1a5b1393c024949c6ba0b021a4c90.
2022-07-01 11:25:27 +05:30
neilnaveen
15ab481928
chore: Set permissions for GitHub actions (#6467)
Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much.

- Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions

https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs

[Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)

Signed-off-by: neilnaveen <42328488+neilnaveen@users.noreply.github.com>
2022-07-01 11:24:04 +05:30
Rohit Yadav
5fe095ee0a Merge remote-tracking branch 'origin/4.17' 2022-06-30 15:28:55 +05:30
Rohit Yadav
aad73322af .github: try using just sonarcloud job on pull_request target only
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-06-30 15:27:20 +05:30
John Bampton
7ba43e447c
Enable flake8 rule W292 No newline at end of file (#6274)
https://www.flake8rules.com/rules/W292.html
2022-06-30 12:08:27 +05:30
Rohit Yadav
470de7fb54 .github: run coverage for pushes to main branch
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-05-04 02:23:47 +05:30
Rohit Yadav
17afe0510e .github: add support for PR decoration
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-05-04 01:02:38 +05:30
Rohit Yadav
2326b5e22a maven: update sonarcloud project
https://sonarcloud.io/project/configuration?id=apache_cloudstack

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-05-03 18:55:20 +05:30
Rohit Yadav
c379430dab .github: sonarcloud integration fixes
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-04-27 18:15:27 +05:30
Rohit Yadav
a2abd7fdc2 .github: fix typo in passing merge branch name
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-04-26 16:40:09 +05:30
Rohit Yadav
05e4f9515e .github: fix sonarcloud integration
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-04-26 16:35:07 +05:30
Rohit Yadav
9f27c992da .github: skip coverage data when string is empty
This fixes issue of empty rows in the PR coverage data

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-04-26 15:06:06 +05:30
Rohit Yadav
7233c38567 .github: enable PR sonar integration
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-04-26 14:43:23 +05:30
Rohit Yadav
40193a04eb .github: fix coverage issue, don't kick pkging automatically
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-04-20 16:37:32 +05:30
Rohit Yadav
15928f8cc8 .github: detect and kick packaging jobs
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-04-18 17:04:44 +05:30
Rohit Yadav
cc139464f3 .github: use event specific sha and base_sha for comparing changes
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-04-18 15:31:20 +05:30
Rohit Yadav
1b2461b200 .github: debug github event using env variable
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-04-18 15:24:48 +05:30
Rohit Yadav
b2086595ca .github: debug github event
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-04-18 15:19:13 +05:30
Rohit Yadav
976464ccb9 .github: enable fork-point while finding list of changes files
Hit same issue as https://github.com/tj-actions/changed-files/issues/355

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-04-18 14:46:32 +05:30
Rohit Yadav
023305e86d .github: fetch all history for comparing PR changes
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-04-18 14:37:11 +05:30
Rohit Yadav
dcb9143330 .github: use pull_request_target which has access to token
This tries to add support for forked repo pull requests, to be able
to run quality checks on it and send comments on the PR. Hopefully,
this solves the issues faced recently.

Due to the way pull_request_target works, I can't send this as a PR
so committing directly to `main` and then sending a dummy PR from a fork
to test if it works as documented by github and elsewhere.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-04-18 14:28:05 +05:30
Rohit Yadav
2dcdc56115
.github: run coverage on pull request (#6265)
The pull_request_target doesn't seem to work for PRs from forks,
this reverts to use and kick the workflow for pull_request instead.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-04-15 20:35:22 +05:30
John Bampton
cfa4f33940
.github/linters: Enable flake8 W293 blank line contains whitespace (#6268)
https://www.flake8rules.com/rules/W293.html
2022-04-15 20:32:52 +05:30
Rohit Yadav
9067938a0d .github: try kicking coverage via pull_request_target sync
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-04-14 18:03:36 +05:30
Rohit Yadav
cd24cf2daa
.github: improve coverage run (#6238)
Add support to detect and kick UI builds and run quality
build and report coverage for the PR.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-04-14 17:51:36 +05:30
Rohit Yadav
72f13a6cea .github: fix incorrect tagging of PR author
Due to github push events and restrictive github action access, the
statement is changed without tagging the author with the assumption
that the PR author is subscribed to the PR events and should get a
notification and/or email.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-04-12 14:04:40 +05:30
Rohit Yadav
8add4df0fa
.github: fix github actions error
Fixes double wrapping of variable
2022-04-08 19:39:31 +05:30
Rohit Yadav
4c89f08ebf .github: fix github event/pr username for conflict msg advice
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-04-08 15:27:58 +05:30
Rohit Yadav
6bf812cdc9 .github: fix github action workflows
(commiting this directly to main, otherwise the PR will kick the actions
of the PR branch)

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-04-07 22:48:34 +05:30
Rohit Yadav
5630ca4411 .github: update action tag as per https://issues.apache.org/jira/browse/INFRA-23109
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-04-07 21:24:43 +05:30
Rohit Yadav
1cdacccdc0
maven: support JaCoCo and other quality checks (#6228)
This enables jacoco, which didn't run before with the -P quality due to
missing passing of jacoco arg line to surefire plugin.

This also adds support for jacoco/quality builds using Github action and
posting of the PR coverage data using a new action step.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-04-07 20:48:48 +05:30
Rohit Yadav
2b1c4fbe6e
.github: fix workflow settings and allow branch pushes to main by committers (#6225)
This fixes the comment message for merge conflict checker and resets the
github branch protection for main in case of need by the RM.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-04-07 13:49:03 +05:30
Rohit Yadav
1500e1f70c
.github: add merge conflict checker per RM request (#6221)
* .github: add merge conflict checker per RM request

Adds a merge conflict checker workflow per current RM (Nicolas's)
request.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

* Update merge-conflict-checker.yml

* Update merge-conflict-checker.yml
2022-04-06 23:52:55 +05:30
Rohit Yadav
9a8c7b1a8c
.github: fix first PR welcome message by boring-cyborg (#6217)
* .github: fix first PR welcome message

Adds newlines

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

* add community slack link

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

* add rules for storage label

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

* remove semantic yaml which is not needed now

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

* disable the strict check to assist RM

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-04-06 23:52:26 +05:30
Rohit Yadav
133b195688
Probot integrations (#6211)
* .github: add boring-cyborg integration

This add boring-cyborg bot app added to apache org that provides:
- labeling PRs by file paths
- welcome and first msg for new contributors

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

* .github: add semantic title checking app

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2022-04-06 16:50:00 +05:30
John Bampton
182899d0b5
Add Python flake8 linting for W291 trailing whitespace with Super-Linter (#4687)
* refactor: remove trailing whitespace from Python files

* Add the GitHub Super-Linter

Add Python flake8 linting for W291 trailing whitespace

* Add licenses
2022-03-28 11:40:26 -03:00