From 0d1051e80e0b3e0df8c48f095dbeb522ad49d1d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Brunner?= Date: Fri, 31 Jan 2025 11:40:41 +0100 Subject: [PATCH] CI updates This is done by the automated script named upgrade-ci-2025 --- .github/renovate.json5 | 187 --------------------------------- .github/workflows/rebuild.yaml | 163 ---------------------------- 2 files changed, 350 deletions(-) delete mode 100644 .github/renovate.json5 delete mode 100644 .github/workflows/rebuild.yaml diff --git a/.github/renovate.json5 b/.github/renovate.json5 deleted file mode 100644 index 032c6e55c..000000000 --- a/.github/renovate.json5 +++ /dev/null @@ -1,187 +0,0 @@ -{ - 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', - baseBranches: ['master', '3.28', '3.29', '3.30'], - 'pre-commit': { enabled: true }, - regexManagers: [ - /** Do updates on pre-commit additional dependencies */ - { - fileMatch: ['^\\.pre\\-commit\\-config\\.yaml$'], - matchStrings: [" +- '?(?[^' @=]+)(@|==)(?[^' @=]+)'? # (?.+)"], - }, - { - fileMatch: ['^build.gradle$', '.*/build.gradle$'], - matchStrings: ['toolVersion = "(?.*)" // (?.*)'], - datasourceTemplate: 'maven', - }, - /** Do update on the schema present in the ci/config.yaml */ - { - fileMatch: ['^ci/config\\.yaml$'], - matchStrings: [ - '.*https://raw\\.githubusercontent\\.com/(?[^\\s]+)/(?[0-9\\.]+)/.*', - ], - datasourceTemplate: 'github-tags', - }, - /** Python version in actions/setup-python action */ - { - fileMatch: ['^\\.github/workflows/.*\\.yaml$'], - matchStrings: [' python-version: [\'"](?[0-9\\.]+)[\'"]'], - datasourceTemplate: 'python-version', - depNameTemplate: 'python', - }, - ], - packageRules: [ - /** Docker images versioning */ - { - matchDatasources: ['docker'], - versioning: 'loose', - }, - { - matchDatasources: ['docker'], - versioning: 'regex:^(?\\d+)\\.(?\\d+)(\\.(?\\d+))?(-(?.*))$', - 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'], - groupName: 'gradle', - automerge: true, - matchDepNames: ['gradle'], - }, - { - matchDatasources: ['docker'], - matchUpdateTypes: ['major', 'minor'], - groupName: 'geoserver', - automerge: true, - matchDepNames: ['camptocamp/geoserver'], - }, - { - matchPackagePrefixes: ['org.springframework:', 'org.springframework.security:'], - matchUpdateTypes: ['major'], - groupName: 'spring', - automerge: true, - }, - { - matchPackagePrefixes: ['net.sf.jasperreports:'], - matchUpdateTypes: ['major'], - groupName: 'jasperreports', - automerge: true, - }, - { - matchPackagePrefixes: ['org.slf4j:'], - matchUpdateTypes: ['major'], - groupName: 'slf4j', - automerge: true, - }, - { - matchPackagePrefixes: ['io.dropwizard.metrics:'], - matchUpdateTypes: ['major'], - groupName: 'metrics', - automerge: true, - }, - { - matchPackagePrefixes: ['org.geotools.', 'org.geotools:'], - matchUpdateTypes: ['major'], - groupName: 'geotools', - automerge: true, - }, - { - matchPackagePrefixes: ['ch.qos.logback:'], - matchUpdateTypes: ['major'], - groupName: 'logback', - automerge: true, - }, - { - matchPackagePrefixes: ['org.apache.xmlgraphics:batik-'], - matchUpdateTypes: ['major'], - groupName: 'batik', - automerge: true, - }, - /** Use dependencyDashboardApproval of the SpotBugs and Gradle */ - { - matchUpdateTypes: ['major', 'minor'], - dependencyDashboardApproval: true, - matchDepNames: ['spotbugs', 'gradle'], - }, - { - matchPackagePrefixes: ['com.github.spotbugs:spotbugs-'], - matchUpdateTypes: ['major', 'minor'], - dependencyDashboardApproval: true, - }, - /** Group spotbugs */ - { - matchPackagePrefixes: ['com.github.spotbugs:spotbugs-', 'spotbugs'], - groupName: '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(?\\d+)\\.(?\\d+)\\.(?\\d+)\\.(?\\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]+$/'], - minimumReleaseAge: '7 days', - }, - /** Don't update checkstyle on old branches */ - { - matchBaseBranches: ['/^3.2[2-9]$/', '/^3.30$/'], - matchPackageNames: ['com.puppycrawl.tools:checkstyle', 'checkstyle'], - enabled: false, - }, - /** Ungoup geotools minor and multiple */ - { - matchPackagePrefixes: ['org.geotools.', 'org.geotools:'], - automerge: true, - groupName: 'geotools', - separateMultipleMinor: true, - }, - /** Ungroup Python dependencies */ - { - matchDepNames: ['python'], - groupName: 'Python', - }, - ], -} diff --git a/.github/workflows/rebuild.yaml b/.github/workflows/rebuild.yaml deleted file mode 100644 index f2a807451..000000000 --- a/.github/workflows/rebuild.yaml +++ /dev/null @@ -1,163 +0,0 @@ -name: Rebuild - -on: - schedule: - - cron: 0 0 * * * - -jobs: - rebuild: - name: Rebuild - runs-on: ubuntu-24.04 - timeout-minutes: 40 - - strategy: - fail-fast: false - matrix: - branch: - - '3.28' - - '3.29' - - '3.30' - steps: - - run: docker system prune --all --force - - uses: actions/checkout@v4 - with: - ref: ${{ matrix.branch }} - - - name: Get tag - id: tag2 - uses: frabert/replace-string-action@v2.5 - with: - pattern: refs/tags/(.*) - string: '{{ github.ref }}' - replace-with: $1 - if: startsWith(github.ref, 'refs/tags/') - - run: echo --${{ steps.tag2.outputs.replaced }}-- - - - uses: camptocamp/initialise-gopass-summon-action@v2 - with: - ci-gpg-private-key: ${{secrets.CI_GPG_PRIVATE_KEY}} - github-gopass-ci-token: ${{secrets.GOPASS_CI_GITHUB_TOKEN}} - patterns: docker - - - run: gpg --export-secret-keys --armor D121AF2DFA8E140688BD968930C9B913FD42EF13 > CI.asc - - - id: last-tag - run: echo "tag=$(git describe --tags --abbrev=0)" > $GITHUB_OUTPUT - - id: no-tag - run: echo "nb=$(git log --oneline ${{ steps.last-tag.outputs.tag }}..HEAD|wc -l)" > $GITHUB_OUTPUT - - run: sed --in-place 's/version = .*/version = "${{ steps.last-tag.outputs.tag }}"/g' build.gradle - if: steps.no-tag.outputs.nb == 0 - - run: - sed --in-place 's/version = .*/version = "${{ steps.last-tag.outputs.tag }}+${{ steps.no-tag.outputs.nb - }}"/g' build.gradle - if: steps.no-tag.outputs.nb > 0 - - - run: echo "enablePublishing=true" > gradle.properties - - run: git diff - - - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - run: python3 -m pip install --requirement=ci/requirements.txt - - - run: make build - - # Extract artifacts - - run: docker run --rm --detach --name=builder mapfish_print_builder - if: always() - - run: docker cp builder:/src/core/build/ core/build/ - if: always() - - - uses: actions/upload-artifact@v4 - with: - name: Test results - path: core/build/resources/actual - if: failure() - - uses: actions/upload-artifact@v4 - with: - name: Reports core - path: core/build/reports - if: failure() - - - name: Collect test results - run: | - mkdir -p /tmp/test_results/junit - find . -name '*TEST-*.xml' -exec cp -v {} /tmp/test_results/junit/ \; - if: failure() - - uses: actions/upload-artifact@v4 - with: - name: Test results - path: /tmp/test_results - if: failure() - - - name: Publish - run: c2cciutils-publish --type=rebuild --branch=${{ matrix.branch }} - - run: ./gradlew :core:libSourcesJar - if: startsWith(github.ref, 'refs/tags/') - - run: ./gradlew :core:libJavadocJar - if: startsWith(github.ref, 'refs/tags/') - - id: version - run: echo "version=$(grep 'version = ' build.gradle|sed "s/ \+version = .\(.*\)./\1/g")" > $GITHUB_OUTPUT - - id: tag - run: echo "tag=$(echo github.ref|sed 's%refs/tags/%%g')" > $GITHUB_OUTPUT - - name: Create Release - id: create_release - uses: actions/create-release@v1 - with: - tag_name: ${{ github.ref }} - release_name: Release ${{ steps.tag.outputs.tag }} - draft: false - prerelease: false - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - if: startsWith(github.ref, 'refs/tags/') - - name: Upload Release Asset - uses: actions/upload-release-asset@v1.0.2 - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./core/build/libs/print-servlet-${{ steps.version.outputs.version }}.war - asset_name: print-servlet-${{ steps.version.outputs.version }}.war - asset_content_type: application/java-archive - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - if: startsWith(github.ref, 'refs/tags/') - - name: Upload Release Asset - uses: actions/upload-release-asset@v1.0.2 - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./core/build/distributions/core-${{ steps.version.outputs.version }}.zip - asset_name: print-cli-${{ steps.version.outputs.version }}.zip - asset_content_type: application/zip - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - if: startsWith(github.ref, 'refs/tags/') - - name: Upload Release Asset - uses: actions/upload-release-asset@v1.0.2 - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./core/build/libs/print-lib-${{ steps.version.outputs.version }}.jar - asset_name: print-lib-${{ steps.version.outputs.version }}.jar - asset_content_type: application/java-archive - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - if: startsWith(github.ref, 'refs/tags/') - - name: Upload Release Asset - uses: actions/upload-release-asset@v1.0.2 - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./core/build/libs/print-lib-${{ steps.version.outputs.version }}-sources.jar - asset_name: print-lib-${{ steps.version.outputs.version }}-sources.jar - asset_content_type: application/java-archive - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - if: startsWith(github.ref, 'refs/tags/') - - name: Upload Release Asset - uses: actions/upload-release-asset@v1.0.2 - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./core/build/libs/print-lib-${{ steps.version.outputs.version }}-javadoc.jar - asset_name: print-lib-${{ steps.version.outputs.version }}-javadoc.jar - asset_content_type: application/java-archive - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - if: startsWith(github.ref, 'refs/tags/')