diff --git a/.dependabot/config.yml b/.dependabot/config.yml
index b568a3021d..46d8862516 100644
--- a/.dependabot/config.yml
+++ b/.dependabot/config.yml
@@ -70,3 +70,9 @@ update_configs:
allowed_updates:
- match:
update_type: security
+ - package_manager: python
+ directory: /ci
+ update_schedule: live
+ automerged_updates:
+ - match:
+ update_type: all
diff --git a/examples/.editorconfig b/.editorconfig
similarity index 54%
rename from examples/.editorconfig
rename to .editorconfig
index c6c8b36219..87a75a07a6 100644
--- a/examples/.editorconfig
+++ b/.editorconfig
@@ -1,9 +1,20 @@
root = true
[*]
-indent_style = space
-indent_size = 2
end_of_line = lf
+insert_final_newline = true
charset = utf-8
+indent_style = space
+indent_size = 4
trim_trailing_whitespace = true
-insert_final_newline = true
+max_line_length = 110
+quote_type = single
+
+[*.js]
+indent_size = 2
+
+[*.yaml]
+indent_size = 2
+
+[Makefile]
+indent_style = tab
diff --git a/.github/workflows/audit.yaml b/.github/workflows/audit.yaml
deleted file mode 100644
index 0d45f5db52..0000000000
--- a/.github/workflows/audit.yaml
+++ /dev/null
@@ -1,32 +0,0 @@
----
-name: Audit
-
-on:
- schedule:
- - cron: '30 2 * * *'
-
-jobs:
- main:
- runs-on: ubuntu-18.04
- name: Audit
- timeout-minutes: 10
- if: "!startsWith(github.event.head_commit.message, '[skip ci] ')"
-
- strategy:
- fail-fast: false
- matrix:
- branch:
- - '3.20'
- - '3.21'
- - '3.22'
- - '3.23'
- - '3.24'
- - '3.25'
- - '3.26'
-
- steps:
- - uses: actions/checkout@v1
- with:
- ref: ${{ matrix.branch }}
-
- - run: ./gradlew dependencyCheckAnalyze
diff --git a/.github/workflows/backport.yaml b/.github/workflows/backport.yaml
index 647f844fb8..a93400a8df 100644
--- a/.github/workflows/backport.yaml
+++ b/.github/workflows/backport.yaml
@@ -10,6 +10,8 @@ jobs:
backport:
runs-on: ubuntu-18.04
name: Backport
+ timeout-minutes: 5
+
steps:
- uses: camptocamp/backport-action@master
with:
diff --git a/.github/workflows/clean-dockerhub-tag.yaml b/.github/workflows/clean-dockerhub-tag.yaml
deleted file mode 100644
index eed98d82a6..0000000000
--- a/.github/workflows/clean-dockerhub-tag.yaml
+++ /dev/null
@@ -1,18 +0,0 @@
-name: Clean docker hub tags
-
-on: delete
-
-jobs:
- clean:
- runs-on: ubuntu-18.04
- name: Clean docker hub tags
- env:
- SUMMON_PROVIDER: /usr/local/bin/gopass
- steps:
- - uses: actions/checkout@v1
- - uses: camptocamp/initialise-gopass-summon-action@v1
- with:
- ci-gpg-private-key: ${{secrets.CI_GPG_PRIVATE_KEY}}
- github-gopass-ci-token: ${{secrets.GOPASS_CI_GITHUB_TOKEN}}
- - name: Clean docker hub tags
- run: summon --environment dockerhub_user_pass ci/clean-dockerhub-tag
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
deleted file mode 100644
index 6194bb7e48..0000000000
--- a/.github/workflows/codeql-analysis.yml
+++ /dev/null
@@ -1,27 +0,0 @@
-name: 'Code scanning'
-
-on:
- push:
- pull_request:
- schedule:
- - cron: '0 19 * * 0'
-
-jobs:
- CodeQL-Build:
- runs-on: ubuntu-latest
- name: 'Code scanning'
-
- steps:
- - name: Checkout repository
- uses: actions/checkout@v2
- with:
- fetch-depth: 1
-
- - name: Initialize CodeQL
- uses: github/codeql-action/init@v1
-
- - name: Autobuild
- uses: github/codeql-action/autobuild@v1
-
- - name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@v1
diff --git a/.github/workflows/codeql.yaml b/.github/workflows/codeql.yaml
new file mode 100644
index 0000000000..c8114368a2
--- /dev/null
+++ b/.github/workflows/codeql.yaml
@@ -0,0 +1,29 @@
+name: 'Code scanning'
+
+on:
+ push:
+ pull_request:
+ schedule:
+ - cron: '0 19 * * 0'
+
+jobs:
+ CodeQL-Build:
+ runs-on: ubuntu-18.04
+ name: Code scanning
+ timeout-minutes: 15
+ if: "!startsWith(github.event.head_commit.message, '[skip ci] ')"
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v2
+ with:
+ fetch-depth: 1
+
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init@v1
+
+ - name: Autobuild
+ uses: github/codeql-action/autobuild@v1
+
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze@v1
diff --git a/.github/workflows/dependabot-auto-merge.yaml b/.github/workflows/dependabot-auto-merge.yaml
deleted file mode 100644
index 511a50f72c..0000000000
--- a/.github/workflows/dependabot-auto-merge.yaml
+++ /dev/null
@@ -1,26 +0,0 @@
-name: Auto merge Dependabot updates
-
-on:
- check_suite:
- types:
- - completed
- pull_request:
- types:
- - labeled
- - unlabeled
- - synchronize
- - opened
- - edited
- - ready_for_review
- - reopened
- - unlocked
-
-jobs:
- auto-merge:
- name: Auto merge
- runs-on: ubuntu-latest
- steps:
- - name: Auto merge
- uses: ridedott/dependabot-auto-merge-action@master
- with:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/ci.yaml b/.github/workflows/main.yaml
similarity index 91%
rename from .github/workflows/ci.yaml
rename to .github/workflows/main.yaml
index 60bb6163d8..29b200efff 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/main.yaml
@@ -2,20 +2,19 @@ name: Continuous integration
on:
push:
- pull_request:
jobs:
build:
runs-on: ubuntu-18.04
timeout-minutes: 40
name: Continuous integration
+ if: "!startsWith(github.event.head_commit.message, '[skip ci] ')"
env:
- SUMMON_PROVIDER: /usr/local/bin/gopass
SECRETS: ${{ secrets.SECRETS }}
steps:
- - uses: actions/checkout@v1
+ - uses: actions/checkout@v2
- name: Get tag
id: tag2
@@ -27,13 +26,11 @@ jobs:
if: "startsWith(github.ref, 'refs/tags/')"
- run: echo --${{ steps.tag2.outputs.replaced }}--
- - run: git --no-pager diff --check `git log --oneline | tail -1 | cut --fields=1 --delimiter=' '`
- - run: ci/test-eof-newline
-
- - uses: camptocamp/initialise-gopass-summon-action@v1
+ - 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: pypi docker
if: env.SECRETS == 'TRUE'
- run: gpg --export-secret-keys --armor D121AF2DFA8E140688BD968930C9B913FD42EF13 > CI.asc
if: env.SECRETS == 'TRUE'
@@ -41,6 +38,17 @@ jobs:
- run: echo "enablePublishing=true" > gradle.properties
if: env.SECRETS == 'TRUE'
+ - run: |
+ sudo rm /etc/apt/sources.list.d/*.list
+ sudo apt-get update
+ sudo apt-get install python3-wheel python3-setuptools
+
+ - run: echo "${HOME}/.local/bin" >> ${GITHUB_PATH}
+ - run: python3 -m pip install --user --requirement=ci/requirements.txt
+
+ - name: Checks
+ run: c2cciutils-checks
+
- run: make build
- run: make acceptance-tests-up
- run: make acceptance-tests-run
@@ -91,15 +99,8 @@ jobs:
path: /tmp/test_results
if: failure()
- - run: mkdir -p ~/.docker
- - name: Decrypt secrets
- run: summon --environment dockerhub bash -c 'envsubst < ci/docker-config.json.tmpl > ~/.docker/config.json'
- if: env.SECRETS == 'TRUE'
-
- - name: publish
- run: ci/publish
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ - name: Publish
+ run: c2cciutils-publish
if: env.SECRETS == 'TRUE'
- id: version
diff --git a/.github/workflows/rebuild-old.yaml b/.github/workflows/rebuild-old.yaml
deleted file mode 100644
index 155268f231..0000000000
--- a/.github/workflows/rebuild-old.yaml
+++ /dev/null
@@ -1,172 +0,0 @@
-name: Rebuild
-
-on:
- schedule:
- - cron: '0 0 * * *'
-
-jobs:
- rebuild:
- runs-on: ubuntu-18.04
- timeout-minutes: 20
- name: Rebuild
-
- env:
- SUMMON_PROVIDER: /usr/local/bin/gopass
-
- strategy:
- fail-fast: false
- matrix:
- branch:
- - '3.23'
-
- steps:
- - run: echo ${{ github.ref }}
-
- - uses: actions/checkout@v1
- with:
- ref: ${{ matrix.branch }}
-
- - name: Get tag
- id: tag2
- uses: frabert/replace-string-action@v1.1
- with:
- pattern: 'refs/tags/(.*)'
- string: '{{ github.ref }}'
- replace-with: '$1'
- if: "startsWith(github.ref, 'refs/tags/')"
- - run: echo --${{ steps.tag2.outputs.replaced }}--
-
- - uses: actions/setup-java@v1
- with:
- java-version: 8
- - run: java -version
-
- - run: sudo apt update
- - name: Install OS dependencies
- run: sudo apt install fonts-liberation
-
- - run: git --no-pager diff --check `git log --oneline | tail -1 | cut --fields=1 --delimiter=' '`
- - run: ci/test-eof-newline
-
- - uses: camptocamp/initialise-gopass-summon-action@v1
- with:
- ci-gpg-private-key: ${{secrets.CI_GPG_PRIVATE_KEY}}
- github-gopass-ci-token: ${{secrets.GOPASS_CI_GITHUB_TOKEN}}
- - run: gpg --export-secret-keys --armor D121AF2DFA8E140688BD968930C9B913FD42EF13 > CI.asc
-
- - name: Install Cadastra fonts for OEREB example
- run: sudo cp -r examples/src/test/resources/examples/oereb/fonts/Cadastra/ /usr/share/fonts/truetype/
-
- - run: echo "enablePublishing=true" > gradle.properties
- - run: ./gradlew build
-
- - uses: actions/upload-artifact@v1
- with:
- name: Test results
- path: core/build/resources/actual
- if: always()
- - uses: actions/upload-artifact@v1
- with:
- name: Reports examples
- path: examples/build/reports
- if: always()
- - uses: actions/upload-artifact@v1
- with:
- name: Reports core
- path: core/build/reports
- if: always()
- - uses: actions/upload-artifact@v1
- with:
- name: Examples
- path: examples/build/resources/test/examples
- if: always()
-
- - 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@v1
- with:
- name: Test results
- path: /tmp/test_results
- if: failure()
-
- - run: mkdir -p ~/.docker
- - name: Decrypt secrets
- run: summon --environment dockerhub bash -c 'envsubst < ci/docker-config.json.tmpl > ~/.docker/config.json'
-
- - name: publish
- run: ci/publish
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
- - run: ./gradlew :core:libSourcesJar
- if: "startsWith(github.ref, 'refs/tags/')"
- - run: ./gradlew :core:libJavadocJar
- if: "startsWith(github.ref, 'refs/tags/')"
- - id: version
- run: echo "##[set-output name=version;]$(grep version build.gradle|sed "s/ \+version = .\(.*\)./\1/g")"
- - id: tag
- run: echo "##[set-output name=tag;]$(echo github.ref|sed 's%refs/tags/%%g')"
- - name: Create Release
- id: create_release
- uses: actions/create-release@v1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- tag_name: ${{ github.ref }}
- release_name: Release ${{ steps.tag.outputs.tag }}
- draft: false
- prerelease: false
- if: "startsWith(github.ref, 'refs/tags/')"
- - name: Upload Release Asset
- uses: actions/upload-release-asset@v1.0.1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- 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
- if: "startsWith(github.ref, 'refs/tags/')"
- - name: Upload Release Asset
- uses: actions/upload-release-asset@v1.0.1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- 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
- if: "startsWith(github.ref, 'refs/tags/')"
- - name: Upload Release Asset
- uses: actions/upload-release-asset@v1.0.1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- 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
- if: "startsWith(github.ref, 'refs/tags/')"
- - name: Upload Release Asset
- uses: actions/upload-release-asset@v1.0.1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- 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
- if: "startsWith(github.ref, 'refs/tags/')"
- - name: Upload Release Asset
- uses: actions/upload-release-asset@v1.0.1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- 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
- if: "startsWith(github.ref, 'refs/tags/')"
diff --git a/.github/workflows/rebuild.yaml b/.github/workflows/rebuild.yaml
deleted file mode 100644
index a386d2c233..0000000000
--- a/.github/workflows/rebuild.yaml
+++ /dev/null
@@ -1,159 +0,0 @@
-name: Rebuild
-
-on:
- schedule:
- - cron: '0 0 * * *'
-
-jobs:
- rebuild:
- runs-on: ubuntu-18.04
- timeout-minutes: 30
- name: Rebuild
-
- env:
- SUMMON_PROVIDER: /usr/local/bin/gopass
-
- strategy:
- fail-fast: false
- matrix:
- branch:
- - 'master'
- - '3.24'
- - '3.25'
- - '3.26'
-
- steps:
- - run: echo ${{ github.ref }}
-
- - uses: actions/checkout@v1
- with:
- ref: ${{ matrix.branch }}
-
- - name: Get tag
- id: tag2
- uses: frabert/replace-string-action@v1.1
- with:
- pattern: 'refs/tags/(.*)'
- string: '{{ github.ref }}'
- replace-with: '$1'
- if: "startsWith(github.ref, 'refs/tags/')"
- - run: echo --${{ steps.tag2.outputs.replaced }}--
-
- - run: git --no-pager diff --check `git log --oneline | tail -1 | cut --fields=1 --delimiter=' '`
- - run: ci/test-eof-newline
-
- - uses: camptocamp/initialise-gopass-summon-action@v1
- with:
- ci-gpg-private-key: ${{secrets.CI_GPG_PRIVATE_KEY}}
- github-gopass-ci-token: ${{secrets.GOPASS_CI_GITHUB_TOKEN}}
- - run: gpg --export-secret-keys --armor D121AF2DFA8E140688BD968930C9B913FD42EF13 > CI.asc
-
- - run: echo "enablePublishing=true" > gradle.properties
- - 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@v1
- with:
- name: Test results
- path: core/build/resources/actual
- if: failure()
- - uses: actions/upload-artifact@v1
- 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@v1
- with:
- name: Test results
- path: /tmp/test_results
- if: failure()
-
- - run: mkdir -p ~/.docker
- - name: Decrypt secrets
- run: summon --environment dockerhub bash -c 'envsubst < ci/docker-config.json.tmpl > ~/.docker/config.json'
-
- - name: publish
- run: ci/publish
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
- - run: ./gradlew :core:libSourcesJar
- if: "startsWith(github.ref, 'refs/tags/')"
- - run: ./gradlew :core:libJavadocJar
- if: "startsWith(github.ref, 'refs/tags/')"
- - id: version
- run: echo "##[set-output name=version;]$(grep version build.gradle|sed "s/ \+version = .\(.*\)./\1/g")"
- - id: tag
- run: echo "##[set-output name=tag;]$(echo github.ref|sed 's%refs/tags/%%g')"
- - name: Create Release
- id: create_release
- uses: actions/create-release@v1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- tag_name: ${{ github.ref }}
- release_name: Release ${{ steps.tag.outputs.tag }}
- draft: false
- prerelease: false
- if: "startsWith(github.ref, 'refs/tags/')"
- - name: Upload Release Asset
- uses: actions/upload-release-asset@v1.0.1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- 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
- if: "startsWith(github.ref, 'refs/tags/')"
- - name: Upload Release Asset
- uses: actions/upload-release-asset@v1.0.1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- 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
- if: "startsWith(github.ref, 'refs/tags/')"
- - name: Upload Release Asset
- uses: actions/upload-release-asset@v1.0.1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- 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
- if: "startsWith(github.ref, 'refs/tags/')"
- - name: Upload Release Asset
- uses: actions/upload-release-asset@v1.0.1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- 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
- if: "startsWith(github.ref, 'refs/tags/')"
- - name: Upload Release Asset
- uses: actions/upload-release-asset@v1.0.1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- 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
- if: "startsWith(github.ref, 'refs/tags/')"
diff --git a/Makefile b/Makefile
index be195d90d0..31267d73ee 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@ GIT_HEAD_ARG = --build-arg=GIT_HEAD=$(shell git rev-parse HEAD)
.PHONY: build
build:
- # Requred and not nesseerly exists
+ # Required and not nesseerly exists
touch CI.asc
docker build $(GIT_HEAD_ARG) --target=builder --tag=mapfish_print_builder .
diff --git a/SECURITY.md b/SECURITY.md
deleted file mode 100644
index d91a396a1e..0000000000
--- a/SECURITY.md
+++ /dev/null
@@ -1,14 +0,0 @@
-# Security Policy
-
-## Supported Versions
-
-| Version | Supported Until |
-| ------- | --------------- |
-| <= 3.19 | Unsupported |
-| 3.20 | 30/06/2022 |
-| 3.21 | 31/10/2021 |
-| 3.22 | 31/10/2021 |
-| 3.23 | 31/10/2021 |
-| 3.24 | 31/12/2021 |
-| 3.25 | 31/12/2021 |
-| 3.26 | 31/12/2021 |
diff --git a/ci/check-fonts b/ci/check-fonts
index 8cec81e77f..e260ae945b 100755
--- a/ci/check-fonts
+++ b/ci/check-fonts
@@ -4,13 +4,13 @@ import requests
def main():
- responce = requests.get("http://localhost:8080/print/fonts")
+ response = requests.get("http://localhost:8080/print/fonts")
- assert responce.ok, responce.status_code
- assert (
- responce.headers["Content-Type"] == "application/json;charset=utf-8"
- ), responce.headers["Content-Type"]
- fonts_result = responce.json()
+ assert response.ok, response.status_code
+ assert response.headers["Content-Type"] == "application/json;charset=utf-8", response.headers[
+ "Content-Type"
+ ]
+ fonts_result = response.json()
fonts = [
"DejaVu Sans",
@@ -55,9 +55,9 @@ def main():
for font, fontconfig in fonts.items():
font_result = [f for f in fonts_result["fonts"] if f["family"] == font]
assert len(font_result) == 1
- assert font_result[0]["fontconfig"] == fontconfig, "Invalid {}: ".format(
- font
- ) + str(font_result[0]["fontconfig"])
+ assert font_result[0]["fontconfig"] == fontconfig, "Invalid {}: ".format(font) + str(
+ font_result[0]["fontconfig"]
+ )
if __name__ == "__main__":
diff --git a/ci/clean-dockerhub-tag b/ci/clean-dockerhub-tag
deleted file mode 100755
index 03bc0567ad..0000000000
--- a/ci/clean-dockerhub-tag
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/usr/bin/env python3
-# -*- coding: utf-8 -*-
-
-import json
-import os
-import re
-import subprocess
-import sys
-
-import requests
-
-
-def clean():
- token = requests.post(
- "https://hub.docker.com/v2/users/login/",
- headers={"Content-Type": "application/json"},
- data=json.dumps(
- {"username": os.environ["USERNAME"], "password": os.environ["PASSWORD"]}
- ),
- ).json()["token"]
-
- with open(os.environ["GITHUB_EVENT_PATH"]) as event_file:
- ref = json.loads(event_file.read())["ref"]
-
- print("Delete image 'camptocamp/mapfish_print:{}'.".format(ref))
-
- response = requests.head(
- "https://hub.docker.com/v2/repositories/camptocamp/mapfish_print/tags/{tag}/".format(
- tag=ref,
- ),
- headers={"Authorization": "JWT " + token},
- )
- if response.status_code == 404:
- return
-
- if not response.ok:
- print("Error checking image 'camptocamp/{}:{}' status.".format(docker_image, tag))
- print(response.text)
- fail = True
- return
-
- response = requests.delete(
- "https://hub.docker.com/v2/repositories/camptocamp/mapfish_print/tags/{tag}/".format(tag=ref,),
- headers={"Authorization": "JWT " + token,},
- )
- if not response.ok:
- print(response.text)
- sys.exit(2)
-
-
-clean()
diff --git a/ci/config.yaml b/ci/config.yaml
new file mode 100644
index 0000000000..81b1d7f6fa
--- /dev/null
+++ b/ci/config.yaml
@@ -0,0 +1,32 @@
+version:
+ tag_to_version_re:
+ - from: release/([0-9]+\.[0-9]+\.[0-9]+)
+ to: \1
+
+checks:
+ required_workflows:
+ audit.yaml: False
+ rebuild.yaml: False
+ clean.yaml: False
+ dependabot-auto-merge.yaml: False
+ codespell:
+ ignore_re:
+ - ^examples/src/test/resources/examples/.*
+ - ^examples/geoserver-data/.*
+ - ^core/src/test/java/org/mapfish/print/parser/MapfishParserTest\.java$
+ - ^core/src/test/resources/map-data/geojson/states\.json$
+ - ^core/src/test/resources/org/mapfish/print/parser/mapAttributeTest\.json$
+ - ^core/src/test/resources/map-data/openlayers/OpenLayers\.js$
+ - ^core/src/test/resources/map-data/geojson/ny-roads-3857\.json$
+ - ^core/src/main/resources/net/opengis/schemas/.*
+ - ^examples/src/test/resources/examples/oereb/Report_fr\.properties$
+ - ^examples/src/test/resources/examples/oereb/Report_it\.properties$
+ - ^examples/src/test/resources/examples/oereb/requestData\.json$
+ - ^examples/src/test/resources/examples/.*/countries.geojson$
+
+publish:
+ pypi:
+ packages: []
+ docker:
+ images:
+ - name: camptocamp/mapfish_print
diff --git a/ci/docker-config.json.tmpl b/ci/docker-config.json.tmpl
deleted file mode 100644
index 45dc8ddacf..0000000000
--- a/ci/docker-config.json.tmpl
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "auths": {
- "https://index.docker.io/v1/": {
- "auth": "${TOKEN}"
- }
- }
-}
diff --git a/ci/publish b/ci/publish
deleted file mode 100755
index 205881e305..0000000000
--- a/ci/publish
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/usr/bin/env python3
-
-import os
-import re
-import subprocess
-
-
-def publish(docker_version):
- print("Deploying image to Docker hub for tag " + docker_version)
- image_name = "camptocamp/mapfish_print:" + docker_version
- subprocess.check_call(["docker", "tag", "camptocamp/mapfish_print", image_name])
- subprocess.check_call(["docker", "push", image_name])
-
-
-def main():
- if os.environ.get("GITHUB_EVENT_NAME") == "pull_request":
- print("Not deploying image for pull requests")
- exit(0)
-
- branch_match = re.match("^refs/heads/(.*)$", os.environ["GITHUB_REF"])
- tag_match = re.match("^refs/tags/(.*)$", os.environ["GITHUB_REF"])
- if branch_match and branch_match.group(1) == "master":
- publish("latest")
-
- elif tag_match:
- release_match = re.match("^release/(.*)$", tag_match.group(1))
- publish(release_match.group(1) if release_match else tag_match.group(1))
- if release_match:
- print("Publishing")
- subprocess.check_call(["./gradlew", "publish"])
-
- elif branch_match:
- publish(branch_match.group(1).replace("/", "_"))
-
- else:
- print("Not deploying image")
-
-
-if __name__ == "__main__":
- main()
diff --git a/ci/requirements.txt b/ci/requirements.txt
new file mode 100644
index 0000000000..515d795ff8
--- /dev/null
+++ b/ci/requirements.txt
@@ -0,0 +1 @@
+c2cciutils==1.0.dev20201216094446
diff --git a/ci/test-eof-newline b/ci/test-eof-newline
deleted file mode 100755
index 475342377d..0000000000
--- a/ci/test-eof-newline
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/python
-
-import os
-import subprocess
-
-exit_code = 0
-FNULL = open(os.devnull, 'w')
-
-for filename in subprocess.check_output(["git", "ls-files"]).split("\n"):
- if os.path.isfile(filename) and not filename.startswith('.idea/'):
- if subprocess.call("git check-attr -a '{}' | grep ' text: set'".format(filename), shell=True, stdout=FNULL) == 0:
- size = os.stat(filename).st_size
- if size != 0:
- with open(filename) as f:
- f.seek(-1, os.SEEK_END)
- if ord(f.read()) != ord("\n"):
- print("No new line at end of '{}' file.".format(filename))
- exit_code = 2
-
-exit(exit_code)
diff --git a/core/src/main/java/org/mapfish/print/FontTools.java b/core/src/main/java/org/mapfish/print/FontTools.java
index b299ccadc6..867c9e0c33 100644
--- a/core/src/main/java/org/mapfish/print/FontTools.java
+++ b/core/src/main/java/org/mapfish/print/FontTools.java
@@ -54,18 +54,18 @@ public static class FontConfigDescription {
}
/**
- * Get matched font from a font familly name.
+ * Get matched font from a font family name.
*
- * @param familly the font family name.
- * @return The matched cont conig atributes.
+ * @param family the font family name.
+ * @return The matched cont config attributes.
*/
- public static List
* Options: arcs, bevel, miter, miter-clip, round, see the SGV documentation about stroke-linejoin
- * For more informations.
+ * For more information.
* Default is miter
*
/usr/local/tomcat/webapps/ROOT/print-apps
.
- You can mount additionnal font in
+ You can mount additional font in
-Maps are included in the report trough subreports. In standard jasper reports,
+Maps are included in the report through subreports. In standard jasper reports,
subreports are as named :
reports inside report. With them, it's possible to access many data different
data source inside the same report.
diff --git a/docs/src/main/resources/templates/tableimages.html b/docs/src/main/resources/templates/tableimages.html
index 913a9baead..ef01eb6881 100644
--- a/docs/src/main/resources/templates/tableimages.html
+++ b/docs/src/main/resources/templates/tableimages.html
@@ -35,7 +35,7 @@
...
- To add formating styles to the printed table there are two possibilities:
+ To add formatting styles to the printed table there are two possibilities:
core/docker/usr/share/fonts/truetype/
,
and verity that she is correctly installed by opening the view
[base URL]/print/fonts
.
diff --git a/docs/src/main/resources/templates/download.html b/docs/src/main/resources/templates/download.html
index b7e752edb6..2eda36e914 100644
--- a/docs/src/main/resources/templates/download.html
+++ b/docs/src/main/resources/templates/download.html
@@ -20,7 +20,7 @@
Command Line Distribution
-
Parameters, Variables and Expressions
parameters and variables.
As described, parameters are values given by an external source of the report.
- In an ordinary application, parameters are often transmited trough a web
+ In an ordinary application, parameters are often transmitted through a web
service.
It is therefore complex (but possible) to add or delete new parameters.
Good news is that once you have you service running, you will not require
@@ -339,7 +339,7 @@ PDF fonts
<textElement textAlignment="Center">
<font pdfFontName="Helvetica-Bold" pdfEncoding=""/>
</textElement>
- <text><![CDATA[Printed trough GeoMapFish]]></text>
+ <text><![CDATA[Printed through GeoMapFish]]></text>
</staticText>
@@ -400,7 +400,7 @@ General workflow for adapting existing templates
-
@@ -432,11 +432,11 @@ Removing Mapfish Print dependencies
@@ -547,7 +547,7 @@
-
-
Preview issues
This manipulation have to be undo just before releasing the new template to
the server.
For such manipulation, open the source tab, copy the problematic part of code
-to a text file, keep and safe it for reseting it later. Concretely, you will do
+to a text file, keep and safe it for resetting it later. Concretely, you will do
such modification for fixing this type of error:
@@ -599,7 +599,7 @@
Configuration of Mapfish Print
small FAQ
What is a subreport for?