From 3a83875208bd1a126ee487f9282f13f88bed5e46 Mon Sep 17 00:00:00 2001 From: mjanez <96422458+mjanez@users.noreply.github.com> Date: Tue, 24 Sep 2024 08:47:48 +0200 Subject: [PATCH 1/2] Update READMEs --- README.md | 38 +++++++++++++++++++------------------- src/README.md | 3 +-- 2 files changed, 20 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 137e32a7..58b583eb 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@
Overview • @@ -60,7 +60,7 @@ Optional HTTP Endpoint ([`docker-compose.apache.yml`](/docker-compose.apache.yml | Compose files | Repository | Type | Docker tag | Size | Notes | | --- | --- | --- | --- | --- | --- | -| [`docker-compose.yml`](/docker-compose.yml) / [`docker-compose.apache.yml`](/docker-compose.apache.yml) | CKAN 2.9.11 | custom image | [`mjanez/ckan-docker:ckan-2.9.11`](https://github.com/mjanez/ckan-docker/pkgs/container/ckan-docker) | 800 MB | Custom Dockerfile: [`ckan/Dockerfile`](/ckan/Dockerfile) | +| [`docker-compose.yml`](/docker-compose.yml) / [`docker-compose.apache.yml`](/docker-compose.apache.yml) | CKAN 2.10.5 | custom image | [`mjanez/ckan-docker:ckan-2.10.5`](https://github.com/mjanez/ckan-docker/pkgs/container/ckan-docker) | 800 MB | Custom Dockerfile: [`ckan/Dockerfile`](/ckan/Dockerfile) | | [`docker-compose.yml`](/docker-compose.yml) / [`docker-compose.apache.yml`](/docker-compose.apache.yml) | PostgreSQL 15 | base image | [`postgres/postgres:15-alpine`](https://hub.docker.com/layers/library/postgres/15-alpine/images/sha256-53a02ecbe9d18ff6476e6651c34811da39f054424c725fc15d2b480fc3fab877?context=explore) | 89.74 MB | Custom Dockerfile: [`postgresql/Dockerfile`](/postgresql/Dockerfile) | | [`docker-compose.yml`](/docker-compose.yml) / [`docker-compose.apache.yml`](/docker-compose.apache.yml) | Solr 9 | custom image | [`ckan/ckan-solr:2.9-solr9-spatial`](https://registry.hub.docker.com/layers/ckan/ckan-solr/2.9-solr9-spatial/images/sha256-b5ee4979891c7dd1f10d2ac2cbdd4d80ff656879edb0f0493616be7b4cf8bc3a?context=explore) | 331.1 MB | CKAN's [pre-configured spatial Solr image](https://github.com/ckan/ckan-solr). | | [`docker-compose.yml`](/docker-compose.yml) / [`docker-compose.apache.yml`](/docker-compose.apache.yml) | Redis 7 | base image | [`redis/redis:7-alpine`](https://hub.docker.com/layers/library/redis/7-alpine/images/sha256-98f4ea44e912d0941d29015a4e2448151b94411109c896b5627d94d79306eea7?context=explore) | 11.82 MB | - | @@ -81,21 +81,21 @@ Information about extensions installed in the `main` image. More info described | **Element** | **Description** | **version** | **Status** | **DEV**[^3] | **PRO**[^4] | **Remarks** | |-------------|-----------------------------------------------------------------------------------------|-------------|------------------------------|---------|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Core | [CKAN](https://github.com/mjanez/ckan-docker) | 2.9.11 | Completed | ✔️ | ✔️ | Stable installation for version 2.9.11 (Production & Dev images) via Docker Compose based on [official images](https://github.com/ckan/ckan-docker-base)). Initial configuration, basic customisation and operation guide. | -| Core + | [Datastore](https://github.com/mjanez/ckan-docker) | 2.9.11 | Completed | ✔️ | ✔️ | Stable installation (Production & Dev images) via Docker Compose. | +| Core | [CKAN](https://github.com/mjanez/ckan-docker) | 2.10.5 | Stable | ✔️ | ✔️ | Stable installation for version 2.10.5 (Production & Dev images) via Docker Compose based on [official images](https://github.com/ckan/ckan-docker-base)). Initial configuration, basic customisation and operation guide. | +| Core + | [Datastore](https://github.com/mjanez/ckan-docker) | 2.10.5 | Stable | ✔️ | ✔️ | Stable installation (Production & Dev images) via Docker Compose. | | Core + | [~~Datapusher~~](https://github.com/mjanez/ckan-docker) | 0.0.19 | Deprecated | ❌ | ❌ | Updated to [xloader](https://github.com/ckan/ckanext-xloader), an express Loader - quickly load data into DataStore. | -| Extension | [ckanext-xloader](https://github.com/ckan/ckanext-xloader) | 1.0.1 | Completed | ✔️ | ✔️ | Stable installation, a replacement for DataPusher because it offers ten times the speed and more robustness | -| Extension | [ckanext-harvest](https://github.com/ckan/ckanext-harvest) | v1.5.6 | Completed | ✔️ | ✔️ | Stable installation, necessary for the implementation of the Collector ([ogc_ckan](#recollector-ckan)) | -| Extension | [ckanext-geoview](https://github.com/ckan/ckanext-geoview) | 0.0.20 | Completed | ✔️ | ✔️ | Stable installation. | -| Extension | [ckanext-spatial](https://github.com/ckan/ckanext-spatial) | 2.0.0 | Completed | ✔️ | ✔️ | Stable installation, necessary for the implementation of the Collector ([ogc_ckan](#recollector-ckan)) | -| Extension | [ckanext-dcat](https://github.com/mjanez/ckanext-dcat) | 1.1.0 | Completed | ✔️ | ✔️ | Stable installation, include DCAT-AP 2.1 profile compatible with GeoDCAT-AP. | -| Extension | [ckanext-scheming](https://github.com/mjanez/ckanext-scheming) | 3.0.0 | WIP | ✔️ | ✔️ | Stable installation. Customised ckanext schema[^5] based on the [Spanish Metadata Core](https://datos.gob.es/es/doc-tags/nti-risp) with the aim of completing the minimum metadata elements included in the current datasets in accordance with [GeoDCAT-AP](https://semiceu.github.io/GeoDCAT-AP/releases/) and [INSPIRE](https://inspire.ec.europa.eu/about-inspire). | -| Extension | [ckanext-resourcedictionary](https://github.com/OpenDataGIS/ckanext-resourcedictionary) | v1.0.1 | Completed | ✔️ | ✔️ | Stable installation. This extension extends the default CKAN Data Dictionary functionality by adding possibility to create data dictionary before actual data is uploaded to datastore. | -| Extension | [ckanext-pages](https://github.com/ckan/ckanext-pages) | 0.5.2 | Completed | ✔️ | ✔️ | Stable installation. This extension gives you an easy way to add simple pages to CKAN. | -| Extension | [ckanext-pdfview](https://github.com/ckan/ckanext-pdfview) | 0.0.8 | Completed | ✔️ | ✔️ | Stable installation. This extension provides a view plugin for PDF files using an html object tag. | -| Extension | [ckanext-schemingdcat](https://github.com/mjanez/ckanext-schemingdcat) | 2.0.0 | Completed | ✔️ | ✔️ | Stable installation for version 1.2.0, provides functions and templates specifically designed to extend [ckanext-scheming](https://github.com/mjanez/ckanext-scheming) and includes DCAT enhancements to adapt CKAN schema to GeoDCAT-AP and several improvements such as multilang for datasets, orgs and groups or new theming. | -| Extension | [ckanext-fluent](https://github.com/mjanez/ckanext-fluent) | 1.0.1 | Completed | ✔️ | ✔️ | Multilingual fields for CKAN, stable version. | -| Software | [ckan-pycsw](https://github.com/mjanez/ckan-pycsw) | main | Completed | ✔️ | ✔️ | Stable installation. PyCSW Endpoint of Open Data Portal with docker compose config. Harvest the CKAN catalogue in a CSW endpoint based on existing spatial datasets in the open data portal. | +| Extension | [ckanext-xloader](https://github.com/mjanez/ckanext-xloader) | 1.0.1-stable | 🚧 WIP | ✔️ | ✔️ | Custom development from [`ckan/ckanext-xloader`](https://github.com/ckan/ckanext-xloader), a replacement for DataPusher because it offers ten times the speed and more robustness | +| Extension | [ckanext-harvest](https://github.com/ckan/ckanext-harvest) | v1.5.6 | Stable | ✔️ | ✔️ | Stable installation, necessary for the implementation of the Collector ([ogc_ckan](#recollector-ckan)) | +| Extension | [ckanext-geoview](https://github.com/ckan/ckanext-geoview) | 0.0.20 | Stable | ✔️ | ✔️ | Stable installation. | +| Extension | [ckanext-spatial](https://github.com/ckan/ckanext-spatial) | v2.1.1 | Stable | ✔️ | ✔️ | Stable installation, required for implementing custom harvesters: ([ckanext-schemingdcat/harvesters](https://github.com/mjanez/ckanext-schemingdcat?tab=readme-ov-file#harvesters)) | +| Extension | [ckanext-dcat](https://github.com/mjanez/ckanext-dcat) | v1.8.0 | 🚧 WIP | ✔️ | ✔️ | Latest stable version of vanilla [`ckanext-dcat`](https://github.com/ckan/ckanext-dcat) with minor fixes, includes base DCAT-AP 2/3 profiles extended by [`ckanext-schemingdcat`](https://github.com/mjanez/ckanext-schemingdcat) | +| Extension | [ckanext-scheming](https://github.com/ckan/ckanext-scheming) | release-3.0.0 | Stable | ✔️ | ✔️ | Provides a way to configure and share metadata schemas using a YAML or JSON schema description. Custom validation and template snippets for editing and display are supported. | +| Extension | [ckanext-resourcedictionary](https://github.com/OpenDataGIS/ckanext-resourcedictionary) | v1.0.1 | 🚧 WIP | ✔️ | ✔️ | This extension extends the default CKAN Data Dictionary functionality by adding possibility to create data dictionary before actual data is uploaded to datastore. | +| Extension | [ckanext-pages](https://github.com/ckan/ckanext-pages) | v0.5.2 | Stable | ✔️ | ✔️ | This extension gives you an easy way to add simple pages to CKAN. | +| Extension | [ckanext-pdfview](https://github.com/ckan/ckanext-pdfview) | 0.0.8 | Stable | ✔️ | ✔️ | This extension provides a view plugin for PDF files using an html object tag. | +| Extension | [ckanext-schemingdcat](https://github.com/mjanez/ckanext-schemingdcat) | 4.0.0 | 🚧 WIP | ✔️ | ✔️ | Custom development to provide functions and templates specifically designed to extend [ckanext-scheming](https://github.com/mjanez/ckanext-scheming) and [`ckanext-dcat`](https://github.com/mjanez/ckanext-dcat). Customized ckanext schema[^5] and profiles based on the [Spanish Metadata Core](https://datos.gob.es/es/doc-tags/nti-risp) with the aim of completing the minimum metadata elements contained in the current datasets according to [GeoDCAT-AP](https://semiceu.github.io/GeoDCAT-AP/releases/) and [INSPIRE](https://inspire.ec.europa.eu/about-inspire). Also includes DCAT profile improvements and several enhancements like multilang for datasets, orgs and groups, themes, CLI, ... | +| Extension | [ckanext-fluent](https://github.com/mjanez/ckanext-fluent) | v1.0.1 | 🚧 WIP | ✔️ | ✔️ | Multilingual fields for CKAN, custom version with fixes and enhancements. | +| Software | [ckan-pycsw](https://github.com/mjanez/ckan-pycsw) | main | 🚧 WIP | ✔️ | ✔️ | PyCSW Endpoint of Open Data Portal with docker compose config. Harvest the CKAN catalogue in a CSW endpoint based on existing spatial datasets in the open data portal. | ## Environment: docker @@ -322,7 +322,7 @@ ckan -c /srv/app/ckan.ini validation init-db And then in our `Dockerfile.dev` file we install the extension and copy the initialization scripts: ```Dockerfile -FROM ckan/ckan-base-spatial:2.9.11 +FROM ckan/ckan-base-spatial:2.10.5 RUN pip install -e git+https://github.com/frictionlessdata/ckanext-validation.git#egg=ckanext-validation && \ pip install -r https://raw.githubusercontent.com/frictionlessdata/ckanext-validation/master/requirements.txt @@ -938,7 +938,7 @@ http://www.fsf.org/licensing/licenses/agpl-3.0.html [^1]: Official CKAN repo: https://github.com/ckan/ckan-docker-base [^2]: Contains fields needed for the [ckanext-spatial geo search](https://docs.ckan.org/projects/ckanext-spatial/en/latest/spatial-search.html) -[^3]: Development environment. -[^4]: Production environment. +[^3]: Development environment, check the [`src/README`](./src/README.md) +[^4]: Production environment, check the [`ckan/Dockerfile`](./ckan/Dockerfile) [^5]: [ckan_geodcatap](https://github.com/mjanez/ckanext-scheming/blob/036b8c6503059e0d42b0eba180d5bd39205c64a3/ckanext/scheming/ckan_geodcatap.yaml), more info: https://github.com/mjanez/ckanext-scheming/pull/1 [^6]: A fork of [COATNor/coat2pycsw](https://github.com/COATnor/coat2pycsw) that has been extended to meet the needs of harvesting GeoDCAT-AP metadata according to INSPIRE ISO19139. \ No newline at end of file diff --git a/src/README.md b/src/README.md index c6e73072..e96db272 100644 --- a/src/README.md +++ b/src/README.md @@ -28,8 +28,7 @@ declare -A repos=( ["ckan/ckanext-pages"]="v0.5.2" ["ckan/ckanext-pdfview"]="0.0.8" ["mjanez/ckanext-fluent"]="v1.0.1" - ["mjanez/ckanext-schemingdcat"]="develop" - ["mjanez/ckanext-mqa"]="develop" + ["mjanez/ckanext-schemingdcat"]="v4.0.0" ) # Detect if the script is running on Windows From d8f5bbe39f49fb34029a178276b62c169a0d331a Mon Sep 17 00:00:00 2001 From: mjanez <96422458+mjanez@users.noreply.github.com> Date: Tue, 24 Sep 2024 08:48:00 +0200 Subject: [PATCH 2/2] Update GitHub Actions workflow to set VERSION to 'master' when the github.head_ref is 'master'. This prevents attempting to extract a version from the branch name when on the master branch, ensuring the Docker image is tagged correctly. --- .github/workflows/docker-build.yml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index eead1f3a..151179a9 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -3,13 +3,13 @@ name: Build and push ckan-docker image from PR Merge on: pull_request: types: - - closed + - closed branches: - - master - - 'ckan-*.*.*' - - '!dev/ckan-*.*.*' - - '!feature/*' - - '!fix/*' + - master + - 'ckan-*.*.*' + - '!dev/ckan-*.*.*' + - '!feature/*' + - '!fix/*' env: REGISTRY: ghcr.io @@ -45,7 +45,12 @@ jobs: - name: Extract tag version from branch name id: extract_tag_version - run: echo "VERSION=$(echo ${{ github.head_ref }} | sed 's/^ckan-//')" >> $GITHUB_ENV + run: | + if [ "${{ github.head_ref }}" = "master" ]; then + echo "VERSION=master" >> $GITHUB_ENV + else + echo "VERSION=$(echo ${{ github.head_ref }} | sed 's/^ckan-//')" >> $GITHUB_ENV + fi - name: Extract Docker metadata id: meta @@ -81,7 +86,7 @@ jobs: image-ref: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} format: sarif output: trivy-results.sarif - + - name: Upload Trivy scan results to GitHub Security tab uses: github/codeql-action/upload-sarif@v3 if: always()