25 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
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
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
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
Sebastien Vermeille
5437c58656
BUILD-2950 Use GITHUB_OUTPUT instead of deprecated set-output 2023-05-11 16:51:10 +02: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
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
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
9ca6bea345
RULEAPI-657: Set up a cron job for rule_coverage/coverage.py (#385) 2021-09-23 10:15:02 +02:00