diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 5197b8c552..2a8f18e3dc 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -82,8 +82,8 @@ jobs: - run: make build-config # Build and lint QGIS images - - run: QGIS_VERSION=3.28-gdal3.6 make build-qgisserver - - run: QGIS_VERSION=3.28-gdal3.6 make prospector-qgisserver + - run: QGIS_VERSION=3.28-gdal3.7 make build-qgisserver + - run: QGIS_VERSION=3.28-gdal3.7 make prospector-qgisserver # Tests - run: make preparetest diff --git a/.github/workflows/ngeo-2-5.yaml b/.github/workflows/ngeo-2-5.yaml deleted file mode 100644 index 11526615d5..0000000000 --- a/.github/workflows/ngeo-2-5.yaml +++ /dev/null @@ -1,182 +0,0 @@ -name: Update ngeo 2.5 - -on: - repository_dispatch: - types: - - ngeo_25_updated - -jobs: - main: - runs-on: ubuntu-22.04 - name: Update ngeo 2.5 - timeout-minutes: 70 - - env: - MAIN_BRANCH: 2.5 - MAJOR_VERSION: 2.5 - - steps: - - run: df -h - - run: docker system prune --all --force - - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - token: ${{ secrets.GOPASS_CI_GITHUB_TOKEN }} - ref: ${{ env.MAIN_BRANCH }} - - - 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: echo "${HOME}/.local/bin" >> ${GITHUB_PATH} - - run: python3 -m pip install --user --requirement=ci/requirements.txt - - - name: Checks - run: c2cciutils-checks - - - run: scripts/get-version --force-increment --github - id: version - - - run: python3 -m pip install --user --requirement=requirements.txt - - # Global simple lint - - run: make yamllint - if: always() - - # Build images - - run: make build-runner - - run: make build-tools - - run: make checks - if: always() - - run: make build-config - - # Build and lint QGIS images - - run: docker build --target=lint --build-arg=VERSION=3.10 docker/qgisserver - - run: QGIS_VERSION=3.10 make build-qgisserver - - # Tests - - run: make preparetest - if: always() - - run: docker-compose logs --timestamps - if: failure() - # Similar to: make tests-commons - - run: > - ci/run-dc-logs docker-compose exec -T tests coverage run - --source=/opt/c2cgeoportal/commons/c2cgeoportal_commons - --module pytest --verbose --color=yes --junitxml=/tmp/commons.xml - /opt/c2cgeoportal/commons/tests - if: always() - # Similar to: make tests-geoportal - - run: > - ci/run-dc-logs docker-compose exec -T tests coverage run --append - --source=/opt/c2cgeoportal/geoportal/c2cgeoportal_geoportal - --module pytest --verbose --color=yes --junitxml=/tmp/geoportal.xml - /opt/c2cgeoportal/geoportal/tests - if: always() - # Similar to: make tests-admin - - run: > - ci/run-dc-logs docker-compose exec -T tests coverage run --append - --source=/opt/c2cgeoportal/admin/c2cgeoportal_admin - --module pytest --verbose --color=yes --junitxml=/tmp/admin.xml - /opt/c2cgeoportal/admin/tests - if: always() - # Similar to: make tests-qgisserver - - run: > - ci/run-dc-logs docker-compose exec -T qgisserver-tests coverage run - --source=/var/www/plugins/geomapfish_qgisserver - --module pytest --verbose --color=yes --junitxml=/tmp/qgis.xml - /src/tests/functional - if: always() - - name: Extract tests artifacts - run: | - docker-compose exec -T tests coverage report - docker-compose exec -T tests coverage html --directory=/tmp/coverage - docker-compose exec -T qgisserver-tests coverage report - docker-compose exec -T qgisserver-tests coverage html --directory=/tmp/coverage - mkdir --parent artifacts/geoportal-coverage - mkdir --parent artifacts/qgisserver-plugin-coverage - docker cp c2cgeoportal_tests_1:/tmp/coverage/ artifacts/geoportal-coverage/ - docker cp c2cgeoportal_qgisserver-tests_1:/tmp/coverage/ artifacts/qgisserver-plugin-coverage/ - if: always() - - run: docker-compose down - - - uses: actions/upload-artifact@v3 - with: - name: Geoportal coverage - path: artifacts/geoportal-coverage/ - - uses: actions/upload-artifact@v3 - with: - name: QGISserver plugin coverage - path: artifacts/qgisserver-plugin-coverage/ - - # Documentation - - run: > - docker build --tag=camptocamp/geomapfish-doc - --build-arg=MAJOR_VERSION=${MAJOR_VERSION} - --build-arg=MAIN_BRANCH=${MAIN_BRANCH} - doc - - - name: Extract documentation - run: ci/extract-documentation artifacts/documentations/ - if: always() - - - uses: actions/upload-artifact@v3 - with: - name: Documentation - path: artifacts/documentations/ - - # Test App - - run: ci/test-app - - # Test Upgrade - - run: DOCKER_TAG=${{ steps.version.outputs.full }} make build-tools - - run: DOCKER_TAG=${{ steps.version.outputs.full }} make build-runner - - run: DOCKER_TAG=${{ steps.version.outputs.full }} make build-config - - run: docker images | grep "" | awk '{print $3}' | xargs --no-run-if-empty docker rmi || true - - run: ci/test-upgrade init ${HOME}/workspace - - run: ci/test-upgrade 240 ${HOME}/workspace - - run: ci/test-upgrade 250 ${HOME}/workspace - - run: ci/test-upgrade 25 ${HOME}/workspace - - run: ci/test-upgrade cleanup ${HOME}/workspace - - - run: make build-tools - - run: make build-runner - - run: make build-config - - - name: Update the changelog - run: ci/changelog ${{ steps.version.outputs.full }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - run: git diff CHANGELOG.md - - - name: Publish - run: c2cciutils-publish --group=full --type=version_branch --version=${{ steps.version.outputs.major }} - - name: Publish - run: c2cciutils-publish --group=full --type=version_branch --version=${{ steps.version.outputs.full }} - - - run: ci/create-new-project ${HOME}/workspace geomapfish - - run: (cd ${HOME}/workspace/geomapfish/; ./build) - - - name: Publish - run: c2cciutils-publish --type=version_branch --version=${{ steps.version.outputs.major }} - - - name: Push version and changelog - run: | - git add ci/ci.yaml ci/changelog.yaml CHANGELOG.md - git diff --staged --quiet || (\ - git commit -m "[skip ci] Update the minor version" - git push https://${{ secrets.GOPASS_CI_GITHUB_TOKEN }}@github.com/camptocamp/c2cgeoportal.git \ - HEAD:${{ env.MAIN_BRANCH }} - ) - - - name: Notify demo - run: > - curl --request POST --header "Content-Type: application/json" - --header 'Accept: application/vnd.github.v3+json' - --header "Authorization: token ${{ secrets.GOPASS_CI_GITHUB_TOKEN }}" - https://api.github.com/repos/camptocamp/demo_geomapfish/dispatches - --data '{"event_type": "geomapfish_25_updated", - "client_payload": {"version": "'"${{ steps.version.outputs.upgrade_version }}"'"}}' diff --git a/.github/workflows/ngeo-2-6.yaml b/.github/workflows/ngeo-2-6.yaml deleted file mode 100644 index 3d4a32b324..0000000000 --- a/.github/workflows/ngeo-2-6.yaml +++ /dev/null @@ -1,178 +0,0 @@ -name: Update ngeo 2.6 - -on: - repository_dispatch: - types: - - ngeo_2.6_updated - -jobs: - main: - runs-on: ubuntu-22.04 - name: Update ngeo 2.6 - timeout-minutes: 70 - - env: - MAIN_BRANCH: 2.6 - MAJOR_VERSION: 2.6 - - steps: - - run: '! ls BACKPORT_TODO' - - run: df -h - - run: docker system prune --all --force - - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - token: ${{ secrets.GOPASS_CI_GITHUB_TOKEN }} - ref: ${{ env.MAIN_BRANCH }} - - - 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 transifex - - - run: echo "${HOME}/.local/bin" >> ${GITHUB_PATH} - - run: python3 -m pip install --user --requirement=ci/requirements.txt - - - name: Checks - run: c2cciutils-checks - - - run: python3 -m pip install --user --requirement=requirements.txt - - # Build images - - run: make build-runner - - run: make build-tools - - run: make checks - if: always() - - run: make build-config - - # Build and lint QGIS images - - run: docker build --target=lint --build-arg=VERSION=3.16 docker/qgisserver - - run: QGIS_VERSION=3.16 make build-qgisserver - - # Tests - - run: make preparetest - - run: docker-compose logs --timestamps - if: failure() - # Similar to: make tests-commons - - run: > - ci/run-dc-logs docker-compose exec -T tests pytest --verbose --color=yes --junitxml=/tmp/commons.xml - /opt/c2cgeoportal/commons/tests - # Similar to: make tests-geoportal - - run: > - ci/run-dc-logs docker-compose exec -T tests pytest --verbose --color=yes --junitxml=/tmp/geoportal.xml - /opt/c2cgeoportal/geoportal/tests - # Similar to: make tests-admin - - run: > - ci/run-dc-logs docker-compose exec -T tests pytest --verbose --color=yes --junitxml=/tmp/admin.xml - /opt/c2cgeoportal/admin/tests - # Similar to: make tests-qgisserver - - run: > - ci/run-dc-logs docker-compose exec -T qgisserver-tests pytest --verbose --color=yes --junitxml=/tmp/qgis.xml - /src/tests/functional - - run: docker-compose down - # Documentation - - run: > - docker build --tag=camptocamp/geomapfish-doc - --build-arg=MAJOR_VERSION=${MAJOR_VERSION} - --build-arg=MAIN_BRANCH=${MAIN_BRANCH} - doc - - - name: Extract documentation - run: ci/extract-documentation artifacts/documentations/ - if: always() - - - uses: actions/upload-artifact@v3 - if: always() - with: - name: Documentation - path: artifacts/documentations/ - if-no-files-found: ignore - retention-days: 5 - - # Test App - - run: ci/test-app - - run: | - cd ${HOME}/workspace/testgeomapfishapp/ - for service in $(docker-compose config --services) - do - docker-compose logs ${service} - done - if: failure() - continue-on-error: true - - - run: git pull --ff-only origin ${{ env.MAIN_BRANCH }} - - run: scripts/get-version --force-increment --github - id: version - - # Test Upgrade - - run: DOCKER_TAG=${{ steps.version.outputs.full }} make build-tools - - run: DOCKER_TAG=${{ steps.version.outputs.full }} make build-runner - - run: DOCKER_TAG=${{ steps.version.outputs.full }} make build-config - - run: docker images | grep "" | awk '{print $3}' | xargs --no-run-if-empty docker rmi || true - - run: ci/test-upgrade init ${HOME}/workspace - - run: ci/test-upgrade 240 ${HOME}/workspace - - run: ci/test-upgrade cleanup ${HOME}/workspace - - - name: Init Git - run: - git remote set-url origin https://${GITHUB_ACTOR}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository - }} - - run: make build-tools - - run: make build-runner - - run: make build-config - - - run: ci/create-new-project ${HOME}/workspace geomapfishapp - - run: (cd ${HOME}/workspace/geomapfishapp/; ./build) - - - name: Update the changelog - run: ci/changelog ${{ steps.version.outputs.full }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - run: git diff CHANGELOG.md - - - name: Push version and changelog - run: | - set -eux - git add ci/ci.yaml ci/changelog.yaml CHANGELOG.md - git diff --staged --quiet || (\ - git commit -m "[skip ci] Update the minor version"; \ - git push origin HEAD:${{ env.MAIN_BRANCH }} \ - ) - - - name: Publish version branch - run: | - c2cciutils-publish --type=version_branch --version=${{ steps.version.outputs.major }} - c2cciutils-publish --group=full --type=version_branch --version=${{ steps.version.outputs.full }} - - - name: Notify demo - run: > - curl --request POST --header "Content-Type: application/json" - --header 'Accept: application/vnd.github.v3+json' - --header "Authorization: token ${{ secrets.GOPASS_CI_GITHUB_TOKEN }}" - https://api.github.com/repos/camptocamp/demo_geomapfish/dispatches - --data '{"event_type": "geomapfish_${{ env.MAJOR_VERSION }}_updated", - "client_payload": {"version": "'"${{ steps.version.outputs.upgrade_version }}"'"}}' - - - name: Publish to Transifex - run: | - docker build --target=tools --tag=transifex --build-arg=MAJOR_VERSION=${MAJOR_VERSION} . - docker run --name=transifex -ti --rm --detach --volume=${HOME}:/root transifex tail -f /dev/null - docker exec transifex bash -c \ - '(cd /opt/c2cgeoportal; make --makefile=dependencies.mk transifex-send)' - docker stop transifex - - - name: Publish documentation to GitHub.io - run: ci/publish-documentation - - - run: > - docker run --rm --volume=/var/run/docker.sock:/var/run/docker.sock nate/dockviz - images --tree - if: always() - - run: docker images - if: always() - - run: docker system df - if: always() - - run: df -h - if: always() diff --git a/.github/workflows/ngeo-2-7.yaml b/.github/workflows/ngeo-2-7.yaml deleted file mode 100644 index 712b43948b..0000000000 --- a/.github/workflows/ngeo-2-7.yaml +++ /dev/null @@ -1,178 +0,0 @@ -name: Update ngeo 2.7 - -on: - repository_dispatch: - types: - - ngeo_2.7_updated - -env: - HAS_SECRETS: ${{ secrets.HAS_SECRETS }} - -jobs: - main: - runs-on: ubuntu-22.04 - name: Continuous integration - timeout-minutes: 90 - - env: - MAIN_BRANCH: '2.7' - MAJOR_VERSION: '2.7' - - steps: - - run: '! ls BACKPORT_TODO' - - run: df -h - - run: docker system prune --all --force - - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - token: ${{ secrets.GOPASS_CI_GITHUB_TOKEN }} - ref: ${{ env.MAIN_BRANCH }} - - - 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 transifex - - - run: echo "${HOME}/.local/bin" >> ${GITHUB_PATH} - - run: python3 -m pip install --user --requirement=ci/requirements.txt - - - name: Checks - run: c2cciutils-checks - - - run: python3 -m pip install --user --requirement=requirements.txt - - # Build images - - run: make build-runner - - run: make build-tools - - run: make checks - if: always() - - run: make build-config - - # Build and lint QGIS images - - run: docker build --target=lint --build-arg=VERSION=3.22 docker/qgisserver - - run: QGIS_VERSION=3.22 make build-qgisserver - - # Tests - - run: make preparetest - - run: docker-compose logs --timestamps - if: failure() - # Similar to: make tests-commons - - run: > - docker-compose exec -T tests pytest --verbose --color=yes --junitxml=/tmp/commons.xml - /opt/c2cgeoportal/commons/tests - - run: c2cciutils-docker-logs - # Similar to: make tests-geoportal - - run: > - docker-compose exec -T tests pytest --verbose --color=yes --junitxml=/tmp/geoportal.xml - /opt/c2cgeoportal/geoportal/tests - - run: c2cciutils-docker-logs - # Similar to: make tests-admin - - run: > - docker-compose exec -T tests pytest --verbose --color=yes --junitxml=/tmp/admin.xml - /opt/c2cgeoportal/admin/tests - - run: c2cciutils-docker-logs - # Similar to: make tests-qgisserver - - run: > - docker-compose exec -T qgisserver-tests pytest --verbose --color=yes --junitxml=/tmp/qgis.xml - /src/tests/functional - - run: c2cciutils-docker-logs - if: always() - - run: docker-compose down - - - run: sudo git clean -fdx - - # Documentation - - run: > - docker build --tag=camptocamp/geomapfish-doc - --build-arg=MAJOR_VERSION=${MAJOR_VERSION} - --build-arg=MAIN_BRANCH=${MAIN_BRANCH} - doc - - - name: Extract documentation - run: ci/extract-documentation artifacts/documentations/ || true - if: always() - - - uses: actions/upload-artifact@v3 - if: always() - with: - name: Documentation - path: artifacts/documentations/ - if-no-files-found: ignore - retention-days: 5 - - # Test App - - run: ci/test-app - - name: Docker logs - run: | - cd ${HOME}/workspace/testgeomapfishapp/ - c2cciutils-docker-logs - if: failure() - continue-on-error: true - - - run: git pull --ff-only origin ${{ env.MAIN_BRANCH }} - - run: scripts/get-version --auto-increment --github - id: version - - # Test Upgrade - - run: DOCKER_TAG=${{ steps.version.outputs.full }} make build-tools - - run: DOCKER_TAG=${{ steps.version.outputs.full }} make build-runner - - run: DOCKER_TAG=${{ steps.version.outputs.full }} make build-config - - run: docker images | grep "" | awk '{print $3}' | xargs --no-run-if-empty docker rmi || true - - run: ci/test-upgrade init ${HOME}/workspace - - run: ci/test-upgrade 240 ${HOME}/workspace - - run: ci/test-upgrade 260 ${HOME}/workspace - - run: ci/test-upgrade 27 ${HOME}/workspace - - run: ci/test-upgrade cleanup ${HOME}/workspace - - - name: Init Git - run: - git remote set-url origin https://${GITHUB_ACTOR}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository - }} - - run: make build-tools - - run: make build-runner - - run: make build-config - - - run: ci/create-new-project ${HOME}/workspace geomapfishapp - - run: (cd ${HOME}/workspace/geomapfishapp/; ./build) - - - name: Update the changelog - run: ci/changelog ${{ steps.version.outputs.full }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - run: git diff CHANGELOG.md - - - name: Push version and changelog - run: | - set -eux - git add ci/ci.yaml ci/changelog.yaml CHANGELOG.md - git diff --staged --quiet || (\ - git commit -m "[skip ci] Update the minor version"; \ - git push origin HEAD:${{ env.MAIN_BRANCH }} \ - ) - - - name: Publish version branch - run: | - c2cciutils-publish --type=version_branch --version=${{ steps.version.outputs.major }} - c2cciutils-publish --group=full --type=version_branch --version=${{ steps.version.outputs.full }} - - - name: Notify demo - run: > - curl --request POST --header "Content-Type: application/json" - --header 'Accept: application/vnd.github.v3+json' - --header "Authorization: token ${{ secrets.GOPASS_CI_GITHUB_TOKEN }}" - https://api.github.com/repos/camptocamp/demo_geomapfish/dispatches - --data '{"event_type": "geomapfish_${{ env.MAJOR_VERSION }}_updated", - "client_payload": {"version": "'"${{ steps.version.outputs.upgrade_version }}"'"}}' - - - run: > - docker run --rm --volume=/var/run/docker.sock:/var/run/docker.sock nate/dockviz - images --tree - if: always() - - run: docker images - if: always() - - run: docker system df - if: always() - - run: df -h - if: always() diff --git a/.github/workflows/qgis.yaml b/.github/workflows/qgis.yaml index 27fd1daa22..58b23d80d2 100644 --- a/.github/workflows/qgis.yaml +++ b/.github/workflows/qgis.yaml @@ -52,13 +52,8 @@ jobs: - 3.28-gdal3.6 - 3.28-gdal3.7 - latest - - master - # Will be soon: - # - 3.28-gdal3.7 - # - ltr - # - lr - # - latest - # - master + - ltr + - lr steps: - uses: actions/checkout@v3 diff --git a/Dockerfile b/Dockerfile index 6e509b5993..628da8095a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Base of all section, install the apt packages -FROM osgeo/gdal:ubuntu-small-3.6.2 as base-all +FROM ghcr.io/osgeo/gdal:ubuntu-small-3.7.2 as base-all LABEL maintainer Camptocamp "info@camptocamp.com" # Fail on error on pipe, see: https://github.com/hadolint/hadolint/wiki/DL4006. diff --git a/ci/ci.yaml b/ci/ci.yaml index a755453201..c4d23c3cbe 100644 --- a/ci/ci.yaml +++ b/ci/ci.yaml @@ -1,2 +1,2 @@ --- -minor: 120 +minor: 0 diff --git a/geoportal/c2cgeoportal_geoportal/scaffolds/create/{{cookiecutter.project}}/docker-compose-lib.yaml b/geoportal/c2cgeoportal_geoportal/scaffolds/create/{{cookiecutter.project}}/docker-compose-lib.yaml index 34f0eb1420..aab530803d 100644 --- a/geoportal/c2cgeoportal_geoportal/scaffolds/create/{{cookiecutter.project}}/docker-compose-lib.yaml +++ b/geoportal/c2cgeoportal_geoportal/scaffolds/create/{{cookiecutter.project}}/docker-compose-lib.yaml @@ -77,7 +77,7 @@ services: - PGOPTIONS mapserver: - image: camptocamp/mapserver:8.0-gdal3.6 + image: camptocamp/mapserver:8.0-gdal3.7 user: www-data restart: unless-stopped entrypoint: [] diff --git a/geoportal/c2cgeoportal_geoportal/scaffolds/create/{{cookiecutter.project}}/env.default b/geoportal/c2cgeoportal_geoportal/scaffolds/create/{{cookiecutter.project}}/env.default index 71269debe4..308a47a1f1 100644 --- a/geoportal/c2cgeoportal_geoportal/scaffolds/create/{{cookiecutter.project}}/env.default +++ b/geoportal/c2cgeoportal_geoportal/scaffolds/create/{{cookiecutter.project}}/env.default @@ -46,7 +46,7 @@ TILECLOUDCHAIN_INTERNAL_PORT=8080 MAPSERVER_URL=http://mapserver:8080/ TINYOWS_URL=http://tinyows:8080/ QGISSERVER_URL=http://qgisserver:8080/mapserv_proxy -QGIS_VERSION=3.28-gdal3.6 +QGIS_VERSION=3.28-gdal3.7 POSTGRES_TAG=13-postgis-3 DEVSERVER_HOST=webpack_dev_server:8080 diff --git a/geoportal/c2cgeoportal_geoportal/scaffolds/update/{{cookiecutter.project}}/CONST_CHANGELOG.txt b/geoportal/c2cgeoportal_geoportal/scaffolds/update/{{cookiecutter.project}}/CONST_CHANGELOG.txt index e97d25ea92..f5d7b6257e 100644 --- a/geoportal/c2cgeoportal_geoportal/scaffolds/update/{{cookiecutter.project}}/CONST_CHANGELOG.txt +++ b/geoportal/c2cgeoportal_geoportal/scaffolds/update/{{cookiecutter.project}}/CONST_CHANGELOG.txt @@ -1,5 +1,14 @@ This file includes migration steps for each release of c2cgeoportal. +============= +Version 2.8.1 +============= + +1. Update dependencies to use GDAL 3.7 + + Use MapServer 8.0 with GDAL 3.7 (instead of 3.6) + Use QGIS server 3.28 with GDAL 3.7 (instead of 3.6) + Use GDAL 3.7 as based image (instead of 3.6) ============= Version 2.8.0