From efef438f0724318480799c4e8f4a22a17f222eb8 Mon Sep 17 00:00:00 2001 From: tuutti Date: Thu, 4 Apr 2024 09:38:53 +0300 Subject: [PATCH 1/6] Added php 8.3 documentation --- README.md | 9 ++++++--- ci/drupal/README.md | 3 ++- local/drupal/README.md | 3 ++- openshift/drupal/README.md | 4 +++- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 821ea66..045ab8a 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,9 @@ See: - [City-of-Helsinki/drupal-helfi-platform/documentation/openshift.md](https://github.com/City-of-Helsinki/drupal-helfi-platform/blob/main/documentation/openshift.md) for documentation on how to use this image in your own project. - [openshift/drupal/README.md](openshift/drupal/README.md) for developer documentation. -Available PHP versions: `8.2`, `8.1`: +Available PHP versions: `8.3`, `8.2`, `8.1`: +- `ghcr.io/city-of-helsinki/drupal-docker-base:8.3` - `ghcr.io/city-of-helsinki/drupal-docker-base:8.2` - `ghcr.io/city-of-helsinki/drupal-docker-base:8.1` @@ -25,8 +26,9 @@ Based on [druidfi/drupal-web](https://github.com/druidfi/docker-images) with som See [local/drupal/README.md](local/drupal/README.md) for documentation. -Available PHP versions: `8.2`, `8.1`: +Available PHP versions: `8.3`, `8.2`, `8.1`: +- `ghcr.io/city-of-helsinki/drupal-web:8.3` - `ghcr.io/city-of-helsinki/drupal-web:8.2` - `ghcr.io/city-of-helsinki/drupal-web:8.1` @@ -37,8 +39,9 @@ Contains Docker images for testing Drupal. See: - [ci/drupal](ci/drupal) for more documentation about Drupal CI image. -Available PHP versions: `8.2`, `8.1`: +Available PHP versions: `8.3`, `8.2`, `8.1`: +- `ghcr.io/city-of-helsinki/drupal-php-docker:8.3-alpine` - `ghcr.io/city-of-helsinki/drupal-php-docker:8.2-alpine` - `ghcr.io/city-of-helsinki/drupal-php-docker:8.1-alpine` diff --git a/ci/drupal/README.md b/ci/drupal/README.md index 41e6505..eb9ed75 100644 --- a/ci/drupal/README.md +++ b/ci/drupal/README.md @@ -1,7 +1,8 @@ # Drupal CI image -Available PHP versions: `8.2`, `8.1`: +Available PHP versions: `8.3`, `8.2`, `8.1`: +- `ghcr.io/city-of-helsinki/drupal-php-docker:8.3-alpine` - `ghcr.io/city-of-helsinki/drupal-php-docker:8.2-alpine` - `ghcr.io/city-of-helsinki/drupal-php-docker:8.1-alpine` diff --git a/local/drupal/README.md b/local/drupal/README.md index 4ba237c..91507f5 100644 --- a/local/drupal/README.md +++ b/local/drupal/README.md @@ -6,8 +6,9 @@ Based on [druidfi/drupal-web](https://github.com/druidfi/docker-images) with few - Force HTTPS nginx fastcgi parameter `on` to make sure Drupal generates URLs using `https` - Run php-fpm and nginx as same user to prevent some weird permission issues -Available PHP versions: `8.2`, `8.1`: +Available PHP versions: `8.3`, `8.2`, `8.1`: +- `ghcr.io/city-of-helsinki/drupal-web:8.3` - `ghcr.io/city-of-helsinki/drupal-web:8.2` - `ghcr.io/city-of-helsinki/drupal-web:8.1` diff --git a/openshift/drupal/README.md b/openshift/drupal/README.md index 3cd67c1..b72fce0 100644 --- a/openshift/drupal/README.md +++ b/openshift/drupal/README.md @@ -1,7 +1,9 @@ # OpenShift Drupal base images -Supported PHP versions: `8.2`, `8.1`: +Supported PHP versions: `8.3`, `8.2`, `8.1`: +- `ghcr.io/city-of-helsinki/drupal-docker-base:8.3-dev` +- `ghcr.io/city-of-helsinki/drupal-docker-base:8.3` - `ghcr.io/city-of-helsinki/drupal-docker-base:8.2-dev` - `ghcr.io/city-of-helsinki/drupal-docker-base:8.2` - `ghcr.io/city-of-helsinki/drupal-docker-base:8.1-dev` From 8cb028575243f234502bff118285285b12f9d483 Mon Sep 17 00:00:00 2001 From: tuutti Date: Thu, 4 Apr 2024 09:40:32 +0300 Subject: [PATCH 2/6] Removed leftover robo files --- ci/robo/Dockerfile | 36 ------------------------------------ ci/robo/Makefile | 19 ------------------- ci/robo/README.md | 24 ------------------------ 3 files changed, 79 deletions(-) delete mode 100644 ci/robo/Dockerfile delete mode 100644 ci/robo/Makefile delete mode 100644 ci/robo/README.md diff --git a/ci/robo/Dockerfile b/ci/robo/Dockerfile deleted file mode 100644 index 340fbdb..0000000 --- a/ci/robo/Dockerfile +++ /dev/null @@ -1,36 +0,0 @@ -ARG BASE_IMAGE_TAG -FROM python:${BASE_IMAGE_TAG}-alpine3.14 - -ENV PYTHONPYCACHEPREFIX="/var/cache/python/" -# Install system dependencies -RUN apk update; \ - apk --no-cache upgrade; \ - apk --no-cache add \ - chromium \ - chromium-chromedriver \ - imagemagick \ - ; \ - apk add --virtual .build-deps \ - python3-dev \ - automake \ - gcc \ - g++ \ - zlib \ - zlib-dev \ - jpeg-dev \ - libffi-dev \ - ; \ - pip install --upgrade --no-cache-dir pip \ - ; \ - pip install \ - --no-cache-dir \ - --upgrade \ - robotframework-pabot \ - Pillow \ - robotframework \ - robotframework-eyes \ - robotframework-seleniumlibrary \ - ; \ - apk del .build-deps; \ - rm -rf /var/cache/* - diff --git a/ci/robo/Makefile b/ci/robo/Makefile deleted file mode 100644 index d76c868..0000000 --- a/ci/robo/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -REPOSITORY = ghcr.io/city-of-helsinki/drupal-robo -BASE_IMAGE_TAG = 3.9 -BUILDARGS ?= --build-arg BASE_IMAGE_TAG=$(BASE_IMAGE_TAG) - -.PHONY: build push release - -build: - docker build -t $(REPOSITORY):dev $(BUILDARGS) ./ - -push: - docker push $(REPOSITORY):dev - -build-latest: - docker build -t $(REPOSITORY):latest $(BUILDARGS) ./ - -push-latest: - docker push $(REPOSITORY):latest - -release: build push diff --git a/ci/robo/README.md b/ci/robo/README.md deleted file mode 100644 index 11c8e73..0000000 --- a/ci/robo/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# Robotframework CI image - -*_IMPORTANT_: This is no longer updated and should not be used!* - -Docker image used to test Drupal using Robotframework. - -Available tags: - -- `ghcr.io/city-of-helsinki/drupal-robo:dev` -- `ghcr.io/city-of-helsinki/drupal-robo:latest` - -## Development - -It's highly recommended to build `dev` tag first and test the changes locally before pushing them into `latest` tag. - -### Building - -- To build `dev` tag: `make build` -- To build `latest` tag: `make build-latest` - -### Release process - -- To release `dev` tag: `make push` -- To release `latest` tag: `make push-latest` From 1e8f6e5750533c696a2268f0c80a43fa04b78299 Mon Sep 17 00:00:00 2001 From: tuutti Date: Thu, 4 Apr 2024 09:44:34 +0300 Subject: [PATCH 3/6] Updated CI image documentation --- ci/drupal/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/drupal/README.md b/ci/drupal/README.md index eb9ed75..65eee1f 100644 --- a/ci/drupal/README.md +++ b/ci/drupal/README.md @@ -15,8 +15,8 @@ See [test.yml](https://github.com/City-of-Helsinki/drupal-helfi-platform/blob/ma - `SIMPLETEST_DB=mysql://drupal:drupal@db:3306/drupal` - `SIMPLETEST_BASE_URL=http://127.0.0.1:8888` - `COMPOSER_HOME=/tmp/.composer`: The composer home is overridden to mitigate permission issues -- `DRUSH_SECURITY_ADVISORIES_URL`: This is used by `drush pm:security` command to scan project for security updates - `COMPOSER_MIRROR_PATH_REPOS=1`: Individual module tests use `composer config repositories N $GITHUB_WORKSPACE && composer require drupal/$MODULE_NAME` to symlink module's codebase from $GITHUB_WORKSPACE to public/modules/contrib folder. PHPUnit seems to sometimes report an incorrect test coverage if the test folder is a symlink. This setting changes composer to mirror the content instead of symlinking it. See https://helsinkisolutionoffice.atlassian.net/browse/UHF-8566 +- `COMPOSER_DISCARD_CHANGES=true`: Automatically discard uncommitted changes ## Development From ccf95247918f82e226f0bcf3f35b5de8bbe4a6ea Mon Sep 17 00:00:00 2001 From: tuutti Date: Thu, 4 Apr 2024 09:49:48 +0300 Subject: [PATCH 4/6] Link to testing documentation --- ci/drupal/README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ci/drupal/README.md b/ci/drupal/README.md index 65eee1f..2e96052 100644 --- a/ci/drupal/README.md +++ b/ci/drupal/README.md @@ -6,9 +6,11 @@ Available PHP versions: `8.3`, `8.2`, `8.1`: - `ghcr.io/city-of-helsinki/drupal-php-docker:8.2-alpine` - `ghcr.io/city-of-helsinki/drupal-php-docker:8.1-alpine` -All images should include all packages necessary to run all Drupal tests (including FunctionalJavascript tests using `chromium-driver`). +All images should include all packages necessary to run all Drupal tests. -See [test.yml](https://github.com/City-of-Helsinki/drupal-helfi-platform/blob/main/.github/workflows/test.yml.dist) for an example how to run tests using this image. +See: +- [test.yml](https://github.com/City-of-Helsinki/drupal-helfi-platform/blob/main/.github/workflows/test.yml.dist) for an example how to run tests using this image. +- [Automated testing documentation](https://github.com/City-of-Helsinki/drupal-helfi-platform/blob/main/documentation/testing.md) ## Environment variables From acd4416ad432d908181ac4f7500e6c955e09b534 Mon Sep 17 00:00:00 2001 From: tuutti Date: Thu, 4 Apr 2024 09:52:34 +0300 Subject: [PATCH 5/6] Ignore MD files --- .github/workflows/php-ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/php-ci.yml b/.github/workflows/php-ci.yml index a2f544a..bda8456 100644 --- a/.github/workflows/php-ci.yml +++ b/.github/workflows/php-ci.yml @@ -1,10 +1,14 @@ on: pull_request: + paths-ignore: + - '**.md' paths: - 'ci/drupal/**' - '.github/workflows/php-ci.yml' push: branches: [ main ] + paths-ignore: + - '**.md' paths: - 'ci/drupal/**' - '.github/workflows/php-ci.yml' From 69f05dee645cb8f12293e75e1627ecae6eebb9c4 Mon Sep 17 00:00:00 2001 From: tuutti Date: Thu, 4 Apr 2024 09:54:11 +0300 Subject: [PATCH 6/6] Fixed ignored paths --- .github/workflows/php-ci.yml | 6 ++---- .github/workflows/php-openshift.yml | 2 ++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/php-ci.yml b/.github/workflows/php-ci.yml index bda8456..c7fb188 100644 --- a/.github/workflows/php-ci.yml +++ b/.github/workflows/php-ci.yml @@ -1,15 +1,13 @@ on: pull_request: - paths-ignore: - - '**.md' paths: + - '!**.md' - 'ci/drupal/**' - '.github/workflows/php-ci.yml' push: branches: [ main ] - paths-ignore: - - '**.md' paths: + - '!**.md' - 'ci/drupal/**' - '.github/workflows/php-ci.yml' jobs: diff --git a/.github/workflows/php-openshift.yml b/.github/workflows/php-openshift.yml index 0d78216..c736865 100644 --- a/.github/workflows/php-openshift.yml +++ b/.github/workflows/php-openshift.yml @@ -1,11 +1,13 @@ on: pull_request: paths: + - '!**.md' - 'openshift/drupal/**' - '.github/workflows/php-openshift.yml' push: branches: [ main ] paths: + - '!**.md' - 'openshift/drupal/**' - '.github/workflows/php-openshift.yml' jobs: