Skip to content

Commit

Permalink
Merge pull request #3563 from mapfish/ci-upgrade
Browse files Browse the repository at this point in the history
CI updates
  • Loading branch information
sbrunner authored Feb 7, 2025
2 parents a818334 + 58438b6 commit 80efff8
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 114 deletions.
File renamed without changes.
7 changes: 7 additions & 0 deletions .github/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/camptocamp/tag-publish/0.13.3/tag_publish/schema.json

docker:
images:
- name: camptocamp/mapfish_print
dispatch:
- {}
108 changes: 24 additions & 84 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -1,76 +1,32 @@
{
extends: ['config:base'],
timezone: 'Europe/Zurich',
schedule: 'after 5pm on the first day of the month',
labels: ['dependencies'],
separateMajorMinor: true,
separateMultipleMajor: true,
separateMinorPatch: true,
prHourlyLimit: 0,
prConcurrentLimit: 0,
lockFileMaintenance: {
enabled: true,
automerge: true,
schedule: 'after 5pm on the first day of the month',
},
semanticCommits: 'disabled',
extends: [
'github>camptocamp/gs-renovate-config-preset:base.json5#0.7.1',
'github>camptocamp/gs-renovate-config-preset:group.json5#0.7.0',
'github>camptocamp/gs-renovate-config-preset:stabilization-branches.json5#0.7.0',
'github>camptocamp/gs-renovate-config-preset:preset.json5#0.7.0',
'github>camptocamp/gs-renovate-config-preset:ci.json5#0.7.0',
'github>camptocamp/gs-renovate-config-preset:pre-commit.json5#0.7.0',
'github>camptocamp/gs-renovate-config-preset:docker.json5#0.8.0',
'github>camptocamp/gs-renovate-config-preset:own.json5#0.7.0',
'github>camptocamp/gs-renovate-config-preset:json-schema.json5#0.7.0',
'github>camptocamp/gs-renovate-config-preset:shellcheck.json5#0.7.0',
],
baseBranches: ['3.28', '3.29', '3.30', '3.31', 'master'],
'pre-commit': { enabled: true },
regexManagers: [
/** Do updates on pre-commit additional dependencies */
{
fileMatch: ['^\\.pre\\-commit\\-config\\.yaml$'],
matchStrings: [" +- '?(?<depName>[^' @=]+)(@|==)(?<currentValue>[^' @=]+)'? # (?<datasource>.+)"],
},
customManagers: [
{
fileMatch: ['^build.gradle$', '.*/build.gradle$'],
matchStrings: ['toolVersion = "(?<currentValue>.*)" // (?<depName>.*)'],
datasourceTemplate: 'maven',
},
/** 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\\.]+)/.*',
],
datasourceTemplate: 'github-tags',
},
/** Python version in actions/setup-python action */
{
fileMatch: ['^\\.github/workflows/.*\\.yaml$'],
matchStrings: [' python-version: [\'"](?<currentValue>[0-9\\.]+)[\'"]'],
datasourceTemplate: 'python-version',
depNameTemplate: 'python',
customType: 'regex',
},
],
packageRules: [
/** Docker images versioning */
{
matchDatasources: ['docker'],
versioning: 'loose',
},
{
matchDatasources: ['docker'],
versioning: 'regex:^(?<major>\\d+)\\.(?<minor>\\d+)(\\.(?<patch>\\d+))?(-(?<compatibility>.*))$',
matchDepNames: ['gradle', 'tomcat'],
},
/** Auto merge the dev dependency update */
{
matchDepTypes: ['devDependencies'],
automerge: true,
},
/** 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',
automerge: true,
},
/** Define the groups */
{
matchUpdateTypes: ['major'],
Expand All @@ -86,46 +42,46 @@
matchDepNames: ['camptocamp/geoserver'],
},
{
matchPackagePrefixes: ['org.springframework:', 'org.springframework.security:'],
matchUpdateTypes: ['major'],
groupName: 'spring',
automerge: true,
matchPackageNames: ['/^org\\.springframework:.*/', '/^org\\.springframework\\.security:.*/'],
},
{
matchPackagePrefixes: ['net.sf.jasperreports:'],
matchUpdateTypes: ['major'],
groupName: 'jasperreports',
automerge: true,
matchPackageNames: ['/^net\\.sf\\.jasperreports:.*/'],
},
{
matchPackagePrefixes: ['org.slf4j:'],
matchUpdateTypes: ['major'],
groupName: 'slf4j',
automerge: true,
matchPackageNames: ['/^org\\.slf4j:.*/'],
},
{
matchPackagePrefixes: ['io.dropwizard.metrics:'],
matchUpdateTypes: ['major'],
groupName: 'metrics',
automerge: true,
matchPackageNames: ['/^io\\.dropwizard\\.metrics:.*/'],
},
{
matchPackagePrefixes: ['org.geotools.', 'org.geotools:'],
matchUpdateTypes: ['major'],
groupName: 'geotools',
automerge: true,
matchPackageNames: ['/^org\\.geotools\\..*/', '/^org\\.geotools:.*/'],
},
{
matchPackagePrefixes: ['ch.qos.logback:'],
matchUpdateTypes: ['major'],
groupName: 'logback',
automerge: true,
matchPackageNames: ['/^ch\\.qos\\.logback:.*/'],
},
{
matchPackagePrefixes: ['org.apache.xmlgraphics:batik-'],
matchUpdateTypes: ['major'],
groupName: 'batik',
automerge: true,
matchPackageNames: ['/^org\\.apache\\.xmlgraphics:batik\\-.*/'],
},
/** Use dependencyDashboardApproval of the SpotBugs and Gradle */
{
Expand All @@ -134,32 +90,21 @@
matchDepNames: ['spotbugs', 'gradle'],
},
{
matchPackagePrefixes: ['com.github.spotbugs:spotbugs-'],
matchUpdateTypes: ['major', 'minor'],
dependencyDashboardApproval: true,
matchPackageNames: ['/^com\\.github\\.spotbugs:spotbugs\\-.*/'],
},
/** Group spotbugs */
{
matchPackagePrefixes: ['com.github.spotbugs:spotbugs-', 'spotbugs'],
groupName: 'spotbugs',
matchPackageNames: ['/^com\\.github\\.spotbugs:spotbugs\\-.*/', '/^spotbugs.*/'],
},
/** Accept only the patch on stabilization branches */
{
matchBaseBranches: ['/^[0-9]+\\.[0-9]+$/'],
matchUpdateTypes: ['major', 'minor', 'pin', 'digest', 'lockFileMaintenance', 'rollback', 'bump'],
enabled: false,
},
/** Support the 4 parts of shellcheck-py version with a v prefix */
{
versioning: 'regex:^v(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)\\.(?<build>\\d+)$',
matchDepNames: ['shellcheck-py/shellcheck-py'],
},
/** Group and auto merge the CI dependencies */
{
matchFileNames: ['.github/**', '.pre-commit-config.yaml', 'ci/**'],
groupName: 'CI dependencies',
automerge: true,
},
/** Packages published very recently are not pushed to stabilization branches for security reasons */
{
matchBaseBranches: ['/^[0-9]+\\.[0-9]+$/'],
Expand All @@ -173,15 +118,10 @@
},
/** Ungoup geotools minor and multiple */
{
matchPackagePrefixes: ['org.geotools.', 'org.geotools:'],
automerge: true,
groupName: 'geotools',
separateMultipleMinor: true,
},
/** Ungroup Python dependencies */
{
matchDepNames: ['python'],
groupName: 'Python',
matchPackageNames: ['/^org\\.geotools\\..*/', '/^org\\.geotools:.*/'],
},
/** No update on rebuild workflow */
{
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ jobs:
path: ~/.cache/pre-commit
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
restore-keys: "pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}\npre-commit-"
- run: pre-commit run --all-files
- run: git diff --exit-code --patch > /tmp/pre-commit.patch || true
- run: pre-commit run --all-files --color=always
- run: git diff --exit-code --patch > /tmp/pre-commit.patch; git diff --color; git reset --hard || true
if: failure()
- uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -143,9 +143,11 @@ jobs:
- run: git stash
if: always()
- name: Publish
run: c2cciutils-publish
run: tag-publish
if: env.HAS_SECRETS == 'HAS_SECRETS'
- run: git diff --exit-code --patch > /tmp/dpkg-versions.patch || true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: git diff --exit-code --patch > /tmp/dpkg-versions.patch; git diff --color; git reset --hard || true
if: failure()
- uses: actions/upload-artifact@v4
with:
Expand Down
6 changes: 5 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ repos:
rev: 1.0.0
hooks:
- id: jsonschema-validator
files: ^ci/config\.yaml$
files: |-
(?x)^(
\.github/publish\.yaml
|\.github/ghci\.yaml
)$
- repo: https://github.com/renovatebot/pre-commit-hooks
rev: 39.161.0
hooks:
Expand Down
14 changes: 0 additions & 14 deletions .whitesource

This file was deleted.

9 changes: 0 additions & 9 deletions ci/config.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions ci/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
c2cciutils[checks,publish]==1.7.3
security.md==1.0.0
c2cciutils==1.7.3
pre-commit==4.1.0
tag-publish==0.13.3

0 comments on commit 80efff8

Please sign in to comment.