79 Commits

Author SHA1 Message Date
Arseniy Zaostrovnykh
f18135cc24
Adjust update_coverage GH Action to work with Merge Queue (#4806)
* Try merging with the queue

* Provide github token

* Fix syntax

* Get GITHUB_TOKEN from vault

* Add the PR label

* Wait for the new PR to merge

* Fix working dir

* Inline the script

* Checkout master

* Install python for slack notifications

* Fix logging

* install rspec-tools

* Log actual PR-merge status

* Final adjustments

* Set check interval to 20 seconds

* Test failure

* Fix pr close command

* Revert "Test failure"

This reverts commit c3c2b845feaa047a62ef19fb34c805bf3ef7a23f.

* Update .github/workflows/update_coverage.yml

---------

Co-authored-by: Fred Tingaud <95592999+frederic-tingaud-sonarsource@users.noreply.github.com>
2025-03-21 16:58:53 +00:00
Arseniy Zaostrovnykh
0a35748341
Revert "Update coverage information (#4808)" (#4811)
This reverts commit e240ba5d737b0b0a465ba23a6f99a2e0d41ba5bb.
2025-03-21 09:34:52 +00:00
hashicorp-vault-sonar-prod[bot]
e240ba5d73
Update coverage information (#4808)
* Try merging with the queue

* Provide github token

* Fix syntax

* Get GITHUB_TOKEN from vault

* Add the PR label

* update coverage information

---------

Co-authored-by: Arseniy Zaostrovnykh <necto.ne@gmail.com>
Co-authored-by: SonarTech <sonartech@sonarsource.com>
2025-03-21 08:16:22 +00:00
Massimo Paladin
85743bd38f GH actions: use ubuntu-latest instead of ubuntu-20.04 2025-03-14 16:19:47 +01:00
Pavel Mikula
c9e1585367
Autoclose issues created by Jira integration (#4722)
This will enable the automation to close issues that it created, to keep things more cleaned up.

Manually created issues will not be affected.
2025-03-07 08:30:57 +00:00
Massimo Paladin
1168630c4e
Update GitHub CODEOWNERS (#4630) 2025-01-29 10:43:20 +01:00
Pavel Mikula
8f2f6bee31
Add PullRequesteCreated.yml (#4584)
Co-authored-by: Marco Borgeaud <marco.borgeaud@sonarsource.com>
2025-01-09 10:13:47 +01:00
Pavel Mikula
d81f6652ed
Add Jira integration (#4426) 2024-11-07 16:41:20 +01:00
Michael Jabbour
765538f971
Explicit permissions for GITHUB_TOKEN where write is needed
The default GITHUB_TOKEN permissions will be set to read-only. See https://sonarsource.atlassian.net/browse/SSF-619 for background information.
2024-09-18 12:03:16 +02:00
Fred Tingaud
a20a45637b
Fix coverage script when there is no new coverage
The previous change to the task 'Push the updated coverage to master' made it passthrough because it used {{ as part of the condition, which seems to be forbidden.
Changing the condition to what we usually use to check default_branch in other workflow scripts throughout our repositories.
2024-07-23 11:46:38 +02:00
Mate Molnar
96a10a4174
BUILD-4175 Fix permission issue when canceling the update coverage action (#4081)
* Add missing permission to cancel the action
* Enable manual testing
2024-07-19 11:00:29 +02:00
Mate Molnar
c0a5024363 BUILD-4175: use secrets from Vault
* Fix SQ issue Unexpected string concatenation
* Allow testing of the coverage update workflow by checking out all
  branches and referencing the SHA of the triggering event
* Fix repository url for coverage update
* Add a manual trigger for coverage update
2024-07-17 10:38:43 +02:00
Mate Molnar
0f8222f73b Revert "BUILD-4733: update secrets to use vault instead of github (#4006)"
This reverts commit 1afa0580c46d66881eacaa202a92e49c96a46fac.
2024-07-17 10:38:43 +02:00
Mate Molnar
91afce33c6 Revert "BUILD-4733: Use vault secrets instead of github"
This reverts commit 2cf7447245c572b0e4f9869db588430e987ff014.
2024-07-17 10:38:43 +02:00
Mate Molnar
7d64c96a75 Revert "BUILD-4733: Use COVERAGE_GITHUB_TOKEN from the vault instead of the default GITHUB_TOKEN"
This reverts commit 9a14e956754adfffdfb53bd22d4a230cb97acaae.
2024-07-17 10:38:43 +02:00
Mate Molnar
41422bc2cb Revert "BUILD-5580: Add missing id-token: write permissions for the Vault action and update the action to v3"
This reverts commit 1c285ade7a6638afc8d00893d9756b567fd9c60c.
2024-07-17 10:38:43 +02:00
Mate Molnar
ac0dfabb00 Revert "BUILD-5580: add missing pages:write permission to Build and Deploy"
This reverts commit 6bc94bea019a0dafb4f78933bbe943d74fc329c5.
2024-07-17 10:38:43 +02:00
Mate Molnar
6bc94bea01
BUILD-5580: add missing pages:write permission to Build and Deploy
work-flow and fix the usage of github-pages-deploy-action
2024-07-08 16:59:31 +02:00
Mate Molnar
1c285ade7a
BUILD-5580: Add missing id-token: write permissions for the Vault action and update the action to v3 2024-07-08 14:58:38 +02:00
Tom
9a14e95675 BUILD-4733: Use COVERAGE_GITHUB_TOKEN from the vault instead of the default GITHUB_TOKEN 2024-07-05 17:01:17 +02:00
tomverin
2cf7447245
BUILD-4733: Use vault secrets instead of github 2024-07-01 15:28:02 +00:00
tomverin
1afa0580c4
BUILD-4733: update secrets to use vault instead of github (#4006) 2024-06-26 09:02:57 +02:00
Massimo Paladin
9c91450191
Update CODEOWNERS (#3841) 2024-04-02 16:47:14 +02:00
Loïc Joly
35115fa7ba
Make sure a label is added to each PR 2024-03-29 10:47:44 +01:00
Arseniy Zaostrovnykh
a4126cc80c
Avoid hitting "Next" downtime by postponing the job later in the night
The frontend SQ analysis frequently fails during the night likely because
it runs soon after SQ is redeployed. Move the update_coverage job 2h
later to avoid that.
2024-03-28 13:41:59 +00:00
Arseniy Zaostrovnykh
710031d3d8
Use the new channel name in update_coverage.yml 2024-03-08 16:39:14 +01:00
Fred Tingaud
51e34f4a2f
Update GitHub actions to avoid deprecated Node version
Following Node12's deprecation by GitHub, we started getting the
following message:
```
create_new_rule
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions/setup-python@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
```

From the doc of these actions, it looks like just upgrading the versions
should work transparently.
2023-09-26 11:11:10 +02:00
Arseniy Zaostrovnykh
5d36aa982f
Fix the preview page deployment: require write access for the action 2023-06-14 10:16:57 +00:00
Arseniy Zaostrovnykh
a3b1a2445d
Improve PR-scan rate limiting behavior when listing all new rules under specification
Propagate the GITHUB_TOKEN to the `predeploy` action to enable
authorized read access to the list of open PRs.
Also specify explicitly that the action requires read access to PRs
2023-06-13 17:13:23 +02:00
Arseniy Zaostrovnykh
d4f555ef9c
Add a checkbox for the PR title guidelines 2023-06-12 11:57:47 +02:00
hendrik-buchwald-sonarsource
a315e5de4c
Add review checklist
This PR adds a small checklist for new PRs that will make it more
visible what parts of the RSPEC were reviewed.
2023-06-06 17:04:39 +02:00
Sebastien Vermeille
5437c58656
BUILD-2950 Use GITHUB_OUTPUT instead of deprecated set-output 2023-05-11 16:51:10 +02:00
Arseniy Zaostrovnykh
71af260baf
Fix Build&Deploy action: update package list before installing libkrb5-dev 2023-03-21 13:52:55 +01:00
Arseniy Zaostrovnykh
e0abb5501c
BUILD-1697 enable update_coverage to run cirrus CI checks without human intervention (#1099)
following the @drautureau-sonarsource advice from https://jira.sonarsource.com/browse/BUILD-1697
2022-07-07 08:08:47 +00:00
Arseniy Zaostrovnykh
c475f0d6de RULEAPI-753: Use modern ids and coalesce the coverage for legacy ids 2022-04-13 00:28:19 -07:00
Marco Antognini
dbb8027666 RULEAPI-748: Add new workflow to update quickfix status 2022-02-28 12:08:21 +01:00
Evgeny Mandrikov
34aad572a9
BUILD-1287 Add .github/CODEOWNERS 2022-02-22 17:21:19 +01:00
Arseniy Zaostrovnykh
2d6b5df540
Define all_required_checks task as the convenient waiting point (#813)
`update_coverage` action used to wait for `validate_asciidoc` to succeed as the task that takes the longest. After #782 is merged as f21f23b9860c10d4effb00b6022917bc28e02e61 it is no longer the case. This change introduces `all_required_checks` task that depends on all checks required for a PR to be merged, thus providing a single point that is known to succeed last and can be safely waited upon.
2022-02-11 09:35:24 +01:00
tomasz-kaminski-sonarsource
60ab75fd73
RULEAPI-722: Always cleanup temprary branch for coverage 2022-01-14 08:11:23 +01:00
Arseniy Zaostrovnykh
ab0589ab43
fix deployment: install missing libkrb5 for the from-source build of nodegit v0.27 that is missing in the bin cache (#637) 2021-12-02 13:00:31 +01:00
Pierre-Loup
56832b65c6
Fix "pipenv install" invocation to avoid update of Pipfile.lock (#561) 2021-11-01 14:43:11 +01:00
Arseniy Zaostrovnykh
2b0bf97a85
Fix coverage update: the fantom of the old rule_coverage directory (#447) 2021-10-04 10:02:36 +00:00
Arseniy Zaostrovnykh
0fe8dffe85
RULEAPI-573: Clean and test script generating for each rule the list of plugins covering it (#429) 2021-10-01 14:52:12 +02:00
Arseniy Zaostrovnykh
5f8a2e7ec1
RULEAPI-606: github action and underlying script for adding a new language to an existing rule 2021-09-30 15:47:25 +00:00
Arseniy Zaostrovnykh
9ca6bea345
RULEAPI-657: Set up a cron job for rule_coverage/coverage.py (#385) 2021-09-23 10:15:02 +02:00
Arseniy Zaostrovnykh
6ad54413c4 redeploy the search GH page UI only from the master branch 2021-06-01 18:01:36 +02:00
Arseniy Zaostrovnykh
d0ba9c416a Restrict the deployment only to master+rule/* branches 2021-06-01 17:27:59 +02:00
Arseniy Zaostrovnykh
96a306b823
RULEAPI-629 Refrsh GH page at every commit 2021-06-01 10:32:26 +02:00
Nicolas Harraudeau
5744c7b409 Fix create rule command in create_new_rspec github workflow 2021-02-18 12:32:10 +01:00
Nicolas Harraudeau
8625689e3a Set token in env in create_new_rspec github workflow 2021-02-18 12:03:30 +01:00