Skip to content

Commit

Permalink
Merge pull request #10773 from camptocamp/c2cciutils-upgrade
Browse files Browse the repository at this point in the history
CI updates
  • Loading branch information
sbrunner authored Oct 13, 2023
2 parents 83e8044 + 993d545 commit dbae56b
Show file tree
Hide file tree
Showing 6 changed files with 2,255 additions and 55 deletions.
52 changes: 33 additions & 19 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
extends: ['config:base'],
'extends': ['config:base'],
timezone: 'Europe/Zurich',
schedule: 'after 5pm on the first day of the month',
semanticCommits: 'disabled',
Expand All @@ -12,20 +12,29 @@
baseBranches: ['master', '2.6', '2.7', '2.8'],
'pre-commit': {enabled: true},
regexManagers: [
/** Do updates on pre-commit additional dependencies */
{
fileMatch: ['^.pre-commit-config.yaml$'],
fileMatch: ['^\\.pre\\-commit\\-config\\.yaml$'],
matchStrings: [" +- '?(?<depName>[^' @=]+)(@|==)(?<currentValue>[^' @=]+)'? # (?<datasource>.+)"],
},
{
fileMatch: ['^ci/applications-versions.yaml$'],
matchStrings: ['(?<depName>[^\\s]+): (?<currentValue>[^\\s]+) # (?<datasource>[^\\s]+)'],
},
/** Do update on the schema present in the ci/config.yaml */
{
'fileMatch': ['^ci/config\\\\.yaml$'],
'matchStrings': [
'.*https://raw\\\\.githubusercontent\\\\.com/(?<depName>[^\\\\s]+)/(?<currentValue>[0-9\\\\.]+)/.*',
fileMatch: ['^ci/config\\.yaml$'],
matchStrings: [
'.*https://raw\\.githubusercontent\\.com/(?<depName>[^\\s]+)/(?<currentValue>[0-9\\.]+)/.*',
],
'datasourceTemplate': 'github-tags',
datasourceTemplate: 'github-tags',
},
/** Do update on packages update (trigger a rebuild) */
{
fileMatch: ['^ci/dpkg\\-versions\\.yaml$'],
matchStrings: [" *(?<depName>[^'\\s]+): '?(?<currentValue>[^'\\s/]*[0-9][^'\\s/]*)'?"],
datasourceTemplate: 'repology',
versioningTemplate: 'loose',
},
],
packageRules: [
Expand Down Expand Up @@ -55,17 +64,18 @@
matchPackageNames: ['ghcr.io/osgeo/gdal'],
versioning: 'regex:^(?<compatibility>.*)-(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)?$',
},
/** Automerge the patch, the minor and the dev dependency */
/** Auto merge the dev dependency update */
{
matchDepTypes: ['devDependencies'],
automerge: true,
},
/** Group the patch and the minor */
/** Group and auto merge the patch updates */
{
matchUpdateTypes: ['patch'],
groupName: 'all patch versions',
automerge: true,
},
/** Group and auto merge the minor updates */
{
matchUpdateTypes: ['minor'],
groupName: 'all minor versions',
Expand Down Expand Up @@ -97,18 +107,14 @@
},
/** Accept only the patch on stabilization branches */
{
matchBaseBranches: ['/2\\..*/'],
matchBaseBranches: ['/^[0-9]+\\.[0-9]+$/'],
matchUpdateTypes: ['major', 'minor', 'pin', 'digest', 'lockFileMaintenance', 'rollback', 'bump'],
enabled: false,
},
/** Mounsly update on stabilization branches */
{
matchBaseBranches: ['/2\\..*/'],
schedule: ['on the 1st day of the month'],
},
/** Support the 4 parts of shellcheck-py version with a v prefix */
{
'matchPackageNames': ['shellcheck-py/shellcheck-py'],
'versioning': 'regex:^v(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)\\.(?<build>\\d+)$',
matchPackageNames: ['shellcheck-py/shellcheck-py'],
versioning: 'regex:^v(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)\\.(?<build>\\d+)$',
},
/** Don't update the project minimal requirements */
{
Expand All @@ -120,9 +126,9 @@
* For 2.6
*/
{
'matchPackagePatterns': ['^sphinxcontrib-.*'],
'matchPaths': ['doc/Pipfile'],
'enabled': false,
matchPackagePatterns: ['^sphinxcontrib-.*'],
matchPaths: ['doc/Pipfile'],
enabled: false,
},
/** Disable upgrading the supported Python version */
{
Expand All @@ -141,5 +147,13 @@
matchPackageNames: ['c2cciutils'],
enabled: false,
},
/** Update dpkg versions at any time */
{
matchBaseBranches: ['/^[0-9]+\\.[0-9]+$/'],
matchPaths: ['^ci/dpkg\\-versions\\.yaml$'],
schedule: ['at any time'],
groupName: 'dpkg',
automerge: true,
},
],
}
1 change: 0 additions & 1 deletion .github/workflows/audit.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
name: Audit

on:
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/dependency-auto-review.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Auto reviews updates

on:
pull_request:
types:
- opened
- reopened

jobs:
auto-merge:
name: Auto reviews updates
runs-on: ubuntu-22.04
timeout-minutes: 5
if: github.event.pull_request.user.login == 'renovate[bot]'

steps:
- uses: actions/github-script@v6
with:
script: |-
github.rest.pulls.createReview({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
event: 'APPROVE',
})
30 changes: 0 additions & 30 deletions .github/workflows/dependency-update-review.yaml

This file was deleted.

6 changes: 1 addition & 5 deletions ci/config.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/camptocamp/c2cciutils/1.5.8/c2cciutils/schema.json
# yaml-language-server: $schema=https://raw.githubusercontent.com/camptocamp/c2cciutils/1.6.10/c2cciutils/schema.json

checks:
black: false
codespell: false
prettier: false
audit:
snyk:
files_no_install:
Expand Down
Loading

0 comments on commit dbae56b

Please sign in to comment.