diff --git a/.github/workflows/documentation.yaml b/.github/workflows/documentation.yaml new file mode 100644 index 00000000..e9dc952f --- /dev/null +++ b/.github/workflows/documentation.yaml @@ -0,0 +1,111 @@ +on: pull_request + +name: Review + +env: + COMPOSE_USER: runner + +jobs: + check-github-actions-documentation: + runs-on: ubuntu-latest + name: Check that Github Actions documentation is up to date + steps: + - uses: actions/checkout@v4 + - uses: arduino/setup-task@v2 + # https://github.com/arduino/setup-task/tree/56d0cc033e3cecc5f07a291fdd39f29388d21800?tab=readme-ov-file#repo-token + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + + # https://github.com/mxschmitt/action-tmate?tab=readme-ov-file#manually-triggered-debug + # Enable tmate debugging if debug logging is enabled (cf. + # https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#runner-context) + - name: Setup tmate session + uses: mxschmitt/action-tmate@v3 + if: 1 == runner.debug + + - run: | + task github-actions:documentation:update + + # Check that documentation has not changed. + - run: | + task github-actions:documentation:diff + + check-github-actions-template-headers: + runs-on: ubuntu-latest + name: Check that Github Actions template headers are up to date + steps: + - uses: actions/checkout@v4 + - uses: arduino/setup-task@v2 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + - run: | + task github-actions:template-headers:update --yes + # Check that files have not changed. + - run: | + git diff --exit-code + + check-config-file-headers: + runs-on: ubuntu-latest + name: Check that config file headers are up to date + steps: + - uses: actions/checkout@v4 + - uses: arduino/setup-task@v2 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + - run: | + task github-actions:config-headers:update --yes + # Check that files have not changed. + - run: | + git diff --exit-code + + check-links: + runs-on: ubuntu-latest + name: Check that workflow and config file links are up to date + steps: + - uses: actions/checkout@v4 + - uses: arduino/setup-task@v2 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + + # https://github.com/mxschmitt/action-tmate?tab=readme-ov-file#manually-triggered-debug + # Enable tmate debugging if debug logging is enabled (cf. + # https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#runner-context) + - name: Setup tmate session + uses: mxschmitt/action-tmate@v3 + if: 1 == runner.debug + + - run: | + task github-actions:link --yes + # Check that files have not changed. + - run: | + git diff --exit-code + + lint-markdown: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: arduino/setup-task@v2 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + - run: | + SKIP_FIX=1 task lint:markdown + + lint-shell-script: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: arduino/setup-task@v2 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + - run: | + SKIP_FIX=1 task lint:shell-script + + lint-yaml: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: arduino/setup-task@v2 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + - run: | + SKIP_FIX=1 task lint:yaml diff --git a/.github/workflows/markdown.yaml b/.github/workflows/markdown.yaml new file mode 100644 index 00000000..60fc0ee5 --- /dev/null +++ b/.github/workflows/markdown.yaml @@ -0,0 +1,43 @@ +# Do not edit this file! Make a pull request on changing +# github/workflows/markdown.yaml in +# https://github.com/itk-dev/devops_itkdev-docker if need be. + +### ### Markdown +### +### Lints Markdown files (`**/*.md`) in the project. +### +### [markdownlint-cli configuration +### files](https://github.com/igorshubovych/markdownlint-cli?tab=readme-ov-file#configuration), +### `.markdownlint.jsonc` and `.markdownlintignore`, control what is actually +### linted and how. +### +### #### Assumptions +### +### 1. A docker compose service named `markdownlint` for running `markdownlint` +### (from +### [markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli)) +### exists. + +name: Markdown + +on: + pull_request: + push: + branches: + - main + - develop + +jobs: + markdown-lint: + runs-on: ubuntu-latest + strategy: + fail-fast: false + steps: + - name: Checkout + uses: actions/checkout@v4 + + - run: | + docker network create frontend + + - run: | + docker compose run --rm markdownlint markdownlint '**/*.md' diff --git a/.github/workflows/workflow-template.yaml b/.github/workflows/workflow-template.yaml new file mode 100644 index 00000000..b7f8cf71 --- /dev/null +++ b/.github/workflows/workflow-template.yaml @@ -0,0 +1,26 @@ +on: pull_request + +name: Workflow templates + +jobs: + check-yaml: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - run: | + docker pull mikefarah/yq + for f in $(find github/workflows/ -name '*.yaml'); do + docker run --rm --volume "$PWD":/workdir mikefarah/yq "$f" > /dev/null + done + + shellcheck: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: arduino/setup-task@v2 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + + - run: | + task lint:shell-script diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..26ba4790 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.task diff --git a/.markdownlint.jsonc b/.markdownlint.jsonc new file mode 100644 index 00000000..37d8959c --- /dev/null +++ b/.markdownlint.jsonc @@ -0,0 +1,19 @@ +// markdownlint-cli configuration file (cf. https://github.com/igorshubovych/markdownlint-cli?tab=readme-ov-file#configuration) +{ + "default": true, + // https://github.com/DavidAnson/markdownlint/blob/main/doc/md013.md + "line-length": { + "line_length": 120, + "code_blocks": false, + "tables": false + }, + // https://github.com/DavidAnson/markdownlint/blob/main/doc/md024.md + "no-duplicate-heading": { + "siblings_only": true + }, + // https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/organizing-information-with-collapsed-sections#creating-a-collapsed-section + // https://github.com/DavidAnson/markdownlint/blob/main/doc/md033.md + "no-inline-html": { + "allowed_elements": ["details", "summary"] + } +} diff --git a/.markdownlintignore b/.markdownlintignore new file mode 100644 index 00000000..3869d411 --- /dev/null +++ b/.markdownlintignore @@ -0,0 +1,8 @@ +# https://github.com/igorshubovych/markdownlint-cli?tab=readme-ov-file#ignoring-files +vendor/ +node_modules/ +LICENSE.md +# Drupal +web/*.md +web/core/ +web/*/contrib/ diff --git a/README.md b/README.md index 4b532d2b..c6244b14 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,7 @@ __Note__: You have to follow the instructions brew writes to get it working (use If you use the [Dory](https://github.com/FreedomBen/dory) revers proxy required to run DDF CMS unmodified you need to install dory. We only use dory for DPL/DDF shared projects (multi supplier projects). + ```sh brew install dory ``` @@ -46,14 +47,20 @@ brew install dory ### Templates The [`templates`](templates/) directory contains templates for adding -the itkdev `docker-compose` setup to new or exiting projects. +the itkdev `docker compose` setup to new or exiting projects. + +Run ```sh -rsync -avz templates// +itkdev-docker-compose template:install --list ``` -Also create an `.env` file beside the `docker-compose.yml` file that contains -`COMPOSE_PROJECT_NAME=` to namespace the docker setup for the projekt. +to see a list of all templates. + +Run `itkdev-docker-compose template:install drupal-10`, say, to install or update a template in a project. + +In addition to the docker compose setup for our projects, installing a template will also add GitHib Actions workflow +files to a project; see [Github Actions templates](docs/github-actions-templates.md) for details. ### Docker commands @@ -112,13 +119,15 @@ LOCAL_PATH='sites/default/files' ## SSL certification support -This setup comes with self-signed wildcard certificates for *.local.itkdev.dk, but other certificates can be generated by using this openssl command on Mac, just change the two places where the domain is written. +This setup comes with self-signed wildcard certificates for *.local.itkdev.dk, but other certificates can be generated +by using this openssl command on Mac, just change the two places where the domain is written. ```sh openssl req -x509 -sha256 -nodes -days 3650 -newkey rsa:2048 -keyout docker.key -out docker.crt -subj "/CN=*.local.itkdev.dk" -reqexts SAN -extensions SAN -config <(cat /usr/local/etc/openssl/openssl.cnf <(printf '[SAN]\nsubjectAltName=DNS:*.local.itkdev.dk')) ``` -To mac browser trust this certificate you need to open it with key-chain right click and select "Get info" and then open the "Trust" tab and select "Always trust". +To mac browser trust this certificate you need to open it with key-chain right click and select "Get info" and then open +the "Trust" tab and select "Always trust". The certificate is located in `./treafik/ssl/docker.crt` in this repository. @@ -158,17 +167,19 @@ The fuld list can be found at [https://hub.docker.com/search?q=itkdev&type=image](https://hub.docker.com/search?q=itkdev&type=image). ## More -For more details about usage see https://docs.itkdev.dk + +For more details about usage see ## Previous versions ### NFS mounts removed From version 3.0.0 the feature to use NFS mounted name-volumes has been removed -because it is no longer compatible with MacOS. (@see https://github.com/docker/for-mac/issues/6544) +because it is no longer compatible with MacOS. (@see ) If you have previously enabled NFS with `nfs:enable` you should clean up as follows: + ```shell sudo nano /etc/exports # Delete the line matching this pattern, and save you changes diff --git a/Taskfile.yml b/Taskfile.yml new file mode 100644 index 00000000..4ec8ed7d --- /dev/null +++ b/Taskfile.yml @@ -0,0 +1,69 @@ +# https://taskfile.dev + +version: '3' + +includes: + github-actions: ./task/Taskfile.github-actions.yml + +vars: + GITHUB_ACTIONS_TEMPLATES_HEADER: | + # Github Actions templates + + This repository contains a number of [GitHub + Actions](https://docs.github.com/en/actions) workflow template files that + are copied to a project when running `itkdev-docker-compose + template:install`. Any changes to the workflows should be made in [this + repository](%THIS_REPOSITORY%) and then the project template must be updated + to match the new templates. + + GITHUB_ACTIONS_TEMPLATES_FOOTER: | + +tasks: + build: + desc: "Build everything" + cmds: + - task: github-actions:template-headers:update + - task: github-actions:documentation:update + - task: github-actions:link + - task: lint:markdown + - task: lint:yaml + + lint:markdown: + desc: "Lint Markdown" + cmds: + - '[[ -n "$SKIP_FIX" ]] || {{.MARKDOWNLINT_COMMAND}} --fix' + - '{{.MARKDOWNLINT_COMMAND}}' + vars: + # We use a block scalar (https://yaml-multiline.info/#block-scalars) here to make escaping (a little) easier. + GLOB: >- + {{.CLI_ARGS | default "'**/*.md'"}} + # I don't (yet) know why, but `itkdev/markdownlint` has an issue with + # permissions when running in GitHub Actions. Therefore we use + # `peterdavehello/markdownlint` + # (https://hub.docker.com/r/peterdavehello/markdownlint) + MARKDOWNLINT_COMMAND: >- + docker run --rm --volume "$PWD":/md peterdavehello/markdownlint markdownlint --dot {{.GLOB}} + + lint:shell-script: + desc: "Lint shell scripts" + cmds: + # https://github.com/koalaman/shellcheck?tab=readme-ov-file#installing + - docker run --rm --volume "$PWD:"/mnt koalaman/shellcheck:stable {{.GLOB}} + vars: + # We use a block scalar (https://yaml-multiline.info/#block-scalars) here to make escaping (a little) easier. + GLOB: >- + {{.CLI_ARGS | default "task/scripts/*"}} + + lint:yaml: + desc: "Lint YAML" + cmds: + - | + # docker pull mikefarah/yq + for f in $(find github/workflows/ -name '*.yaml'); do + docker run --rm --volume "$PWD":/workdir mikefarah/yq "$f" > /dev/null + done + + default: + cmds: + - task --list + silent: true diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 00000000..0869c103 --- /dev/null +++ b/compose.yaml @@ -0,0 +1,16 @@ +services: + markdownlint: + image: itkdev/markdownlint + profiles: + - dev + volumes: + - ./:/md + + jinja2-cli: + # https://hub.docker.com/r/roquie/docker-jinja2-cli + # Is https://hub.docker.com/r/stagex/user-py-jinja2 a better choice? + image: roquie/docker-jinja2-cli + profiles: + - dev + volumes: + - ./:/app diff --git a/config/drupal/php/.phpcs.xml.dist b/config/drupal/php/.phpcs.xml.dist new file mode 100644 index 00000000..c8f54bd8 --- /dev/null +++ b/config/drupal/php/.phpcs.xml.dist @@ -0,0 +1,33 @@ + + + + + + The coding standard. + + web/modules/custom/ + web/themes/custom/ + + + node_modules + vendor + web/*/custom/*/build/ + *.css + *.js + + + + + + + + + + + + + + + + + diff --git a/config/drupal/twig/.twig-cs-fixer.dist.php b/config/drupal/twig/.twig-cs-fixer.dist.php new file mode 100644 index 00000000..0a0f2951 --- /dev/null +++ b/config/drupal/twig/.twig-cs-fixer.dist.php @@ -0,0 +1,16 @@ +in(__DIR__); +// … that are not ignored by VCS +$finder->ignoreVCSIgnored(true); + +$config = new TwigCsFixer\Config\Config(); +$config->setFinder($finder); + +return $config; diff --git a/config/markdown/.markdownlint.jsonc b/config/markdown/.markdownlint.jsonc new file mode 100644 index 00000000..02530965 --- /dev/null +++ b/config/markdown/.markdownlint.jsonc @@ -0,0 +1,22 @@ +// This file is copied from config/markdown/.markdownlint.jsonc in https://github.com/itk-dev/devops_itkdev-docker. +// Feel free to edit the file, but consider making a pull request if you find a general issue with the file. + +// markdownlint-cli configuration file (cf. https://github.com/igorshubovych/markdownlint-cli?tab=readme-ov-file#configuration) +{ + "default": true, + // https://github.com/DavidAnson/markdownlint/blob/main/doc/md013.md + "line-length": { + "line_length": 120, + "code_blocks": false, + "tables": false + }, + // https://github.com/DavidAnson/markdownlint/blob/main/doc/md024.md + "no-duplicate-heading": { + "siblings_only": true + }, + // https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/organizing-information-with-collapsed-sections#creating-a-collapsed-section + // https://github.com/DavidAnson/markdownlint/blob/main/doc/md033.md + "no-inline-html": { + "allowed_elements": ["details", "summary"] + } +} diff --git a/config/markdown/.markdownlintignore b/config/markdown/.markdownlintignore new file mode 100644 index 00000000..d143acee --- /dev/null +++ b/config/markdown/.markdownlintignore @@ -0,0 +1,12 @@ +# This file is copied from config/markdown/.markdownlintignore in https://github.com/itk-dev/devops_itkdev-docker. +# Feel free to edit the file, but consider making a pull request if you find a general issue with the file. + +# https://github.com/igorshubovych/markdownlint-cli?tab=readme-ov-file#ignoring-files +vendor/ +node_modules/ +LICENSE.md +# Drupal +web/*.md +web/core/ +web/libraries/ +web/*/contrib/ diff --git a/config/symfony/php/.php-cs-fixer.dist.php b/config/symfony/php/.php-cs-fixer.dist.php new file mode 100644 index 00000000..c23b927b --- /dev/null +++ b/config/symfony/php/.php-cs-fixer.dist.php @@ -0,0 +1,20 @@ +in(__DIR__); +// … that are not ignored by VCS +$finder->ignoreVCSIgnored(true); + +$config = new PhpCsFixer\Config(); +$config->setFinder($finder); + +$config->setRules([ + '@Symfony' => true, +]); + +return $config; diff --git a/config/symfony/twig/.twig-cs-fixer.dist.php b/config/symfony/twig/.twig-cs-fixer.dist.php new file mode 100644 index 00000000..82425550 --- /dev/null +++ b/config/symfony/twig/.twig-cs-fixer.dist.php @@ -0,0 +1,16 @@ +in(__DIR__); +// … that are not ignored by VCS +$finder->ignoreVCSIgnored(true); + +$config = new TwigCsFixer\Config\Config(); +$config->setFinder($finder); + +return $config; diff --git a/docs/github-actions-templates.md b/docs/github-actions-templates.md new file mode 100644 index 00000000..0a0e6187 --- /dev/null +++ b/docs/github-actions-templates.md @@ -0,0 +1,265 @@ + +# Github Actions templates + +This repository contains a number of [GitHub Actions](https://docs.github.com/en/actions) workflow template files that +are copied to a project when running `itkdev-docker-compose template:install`. Any changes to the workflows should be +made in [this repository](https://github.com/itk-dev/devops_itkdev-docker) and then the project template must be updated +to match the new templates. + +## Naming conventions + +* A workflow file is named after what it is _concerned_ with, not _how_ it's concerned with it and which tools are + actually used, i.e. we have a [`markdown.yaml`](github/workflows/markdown.yaml) file and not a `markdownlint.yaml` + file. +* Some workflows are specific to a project type, currently `drupal` or `symfony`, and these sit in a project type + subfolder, e.g. `github/workflows/drupal`. +* Some tools require configuration files, and these sit in the `config` folder. Some tool configuration may be specific + to a project type (or make sence only for a specific project type), and these specific config files sit in a project + type subfolder, e.g. `config/drupal/php/.phpcs.xml.dist` and `config/drupal/twig/.twig-cs-fixer.dist.php` + +## Templates + +The current list of templates is shown in the following sections. + +--- + +[github/workflows/changelog.yaml](github/workflows/changelog.yaml) + +### Changelog + +Checks that changelog has been updated + +--- + +[github/workflows/composer.yaml](github/workflows/composer.yaml) + +### Composer + +Validates composer.json and checks that it's normalized. + +#### Assumptions + +1. A docker compose service named `phpfpm` can be run and `composer` can be + run inside the `phpfpm` service. +2. [ergebnis/composer-normalize](https://github.com/ergebnis/composer-normalize) + is a dev requirement in `composer.json`: + + ``` shell + docker compose run --rm phpfpm composer require --dev ergebnis/composer-normalize + ``` + + Normalize `composer.json` by running + + ``` shell + docker compose run --rm phpfpm composer normalize + ``` + +--- + +[github/workflows/drupal/javascript.yaml](github/workflows/drupal/javascript.yaml) + +### Drupal JavaScript (and TypeScript) + +Validates JavaScript files. + +#### Assumptions + +1. A docker compose service named `prettier` for running + [Prettier](https://prettier.io/) exists. + +--- + +[github/workflows/drupal/php.yaml](github/workflows/drupal/php.yaml) + +### Drupal PHP + +Checks that PHP code adheres to the [Drupal coding +standards](https://www.drupal.org/docs/develop/standards). + +#### Assumptions + +1. A docker compose service named `phpfpm` can be run and `composer` can be + run inside the `phpfpm` service. +2. [drupal/coder](https://www.drupal.org/project/coder) is a dev requirement +in `composer.json`: + + ``` shell + docker compose run --rm phpfpm composer require --dev drupal/coder + ``` + + Clean up and check code by running + + ``` shell + docker compose run --rm phpfpm vendor/bin/phpcbf + docker compose run --rm phpfpm vendor/bin/phpcs + ``` + +> [!NOTE] +> The template adds `.phpcs.xml.dist` as [a configuration file for +> PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#using-a-default-configuration-file) +> and this makes it possible to override the actual configuration used in a +> project by adding a more important configuration file, e.g. `.phpcs.xml`. + +--- + +[github/workflows/drupal/site.yaml](github/workflows/drupal/site.yaml) + +### Drupal + +Checks that site can be installed and can be updated (from base branch on +pull request). + +#### Assumptions + +1. A docker compose service named `phpfpm` can be run and `composer` can be + run inside the `phpfpm` service. +2. The docker setup contains a database container and other the dependent + services and the default settings match connection credentials for these + services. +3. The Drupal site can be installed from existing config. + +--- + +[github/workflows/drupal/styles.yaml](github/workflows/drupal/styles.yaml) + +### Drupal Styles (CSS and SCSS) + +Validates styles files. + +#### Assumptions + +1. A docker compose service named `prettier` for running + [Prettier](https://prettier.io/) exists. + +--- + +[github/workflows/markdown.yaml](github/workflows/markdown.yaml) + +### Markdown + +Lints Markdown files (`**/*.md`) in the project. + +[markdownlint-cli configuration +files](https://github.com/igorshubovych/markdownlint-cli?tab=readme-ov-file#configuration), +`.markdownlint.jsonc` and `.markdownlintignore`, control what is actually +linted and how. + +#### Assumptions + +1. A docker compose service named `markdownlint` for running `markdownlint` + (from + [markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli)) + exists. + +--- + +[github/workflows/symfony/javascript.yaml](github/workflows/symfony/javascript.yaml) + +### Symfony JavaScript (and TypeScript) + +Validates JavaScript files. + +#### Assumptions + +1. A docker compose service named `prettier` for running + [Prettier](https://prettier.io/) exists. + +--- + +[github/workflows/symfony/php.yaml](github/workflows/symfony/php.yaml) + +### Symfony PHP + +Checks that PHP code adheres to the [Symfony coding +standards](https://symfony.com/doc/current/contributing/code/standards.html). + +#### Assumptions + +1. A docker compose service named `phpfpm` can be run and `composer` can be + run inside the `phpfpm` service. 2. + [friendsofphp/php-cs-fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer) + is a dev requirement in `composer.json`: + + ``` shell + docker compose run --rm phpfpm composer require --dev friendsofphp/php-cs-fixer + ``` + + Clean up and check code by running + + ``` shell + docker compose run --rm phpfpm vendor/bin/php-cs-fixer fix + docker compose run --rm phpfpm vendor/bin/php-cs-fixer fix --dry-run --diff + ``` + +> [!NOTE] The template adds `.php-cs-fixer.dist.php` as [a configuration +> file for PHP CS +> Fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/master/doc/config.rst) +> and this makes it possible to override the actual configuration used in a +> project by adding a more important configuration file, `.php-cs-fixer.php`. + +--- + +[github/workflows/symfony/styles.yaml](github/workflows/symfony/styles.yaml) + +### Symfony Styles (CSS and SCSS) + +Validates styles files. + +#### Assumptions + +1. A docker compose service named `prettier` for running + [Prettier](https://prettier.io/) exists. + +--- + +[github/workflows/twig.yaml](github/workflows/twig.yaml) + +### Twig + +Validates Twig files + +#### Assumptions + +1. A docker compose service named `phpfpm` can be run and `composer` can be + run inside the `phpfpm` service. +2. [vincentlanglet/twig-cs-fixer](https://github.com/VincentLanglet/Twig-CS-Fixer) + is a dev requirement in `composer.json`: + + ``` shell + docker compose run --rm phpfpm composer require --dev vincentlanglet/twig-cs-fixer + ``` + +3. A [Configuration + file](https://github.com/VincentLanglet/Twig-CS-Fixer/blob/main/docs/configuration.md#configuration-file) + in the root of the project defines which files to check and rules to use. + +--- + +## Updating template documentation + +To update this document, run + +``` shell +task github-actions:documentation:update +``` + +### GitHub Actions workflow documentation convention + +Each workflow file must contain a single documentation block with lines starting with `###`, e.g. + +``` markdown +### ### The title +### +### This template … +### +### See … for details. +``` + +> [!IMPORTANT] +> All lines in the documentation block must start with `###` and the documentation block consists of all consecutive +> lines starting with `###`. diff --git a/github/workflows/changelog.yaml b/github/workflows/changelog.yaml new file mode 100644 index 00000000..483da6e9 --- /dev/null +++ b/github/workflows/changelog.yaml @@ -0,0 +1,29 @@ +# Do not edit this file! Make a pull request on changing +# github/workflows/changelog.yaml in +# https://github.com/itk-dev/devops_itkdev-docker if need be. + +### ### Changelog +### +### Checks that changelog has been updated + +name: Changelog + +on: + pull_request: + +jobs: + changelog: + runs-on: ubuntu-latest + strategy: + fail-fast: false + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 2 + + - name: Git fetch + run: git fetch + + - name: Check that changelog has been updated. + run: git diff --exit-code origin/${{ github.base_ref }} -- CHANGELOG.md && exit 1 || exit 0 diff --git a/github/workflows/composer.yaml b/github/workflows/composer.yaml new file mode 100644 index 00000000..fe133512 --- /dev/null +++ b/github/workflows/composer.yaml @@ -0,0 +1,68 @@ +# Do not edit this file! Make a pull request on changing +# github/workflows/composer.yaml in +# https://github.com/itk-dev/devops_itkdev-docker if need be. + +### ### Composer +### +### Validates composer.json and checks that it's normalized. +### +### #### Assumptions +### +### 1. A docker compose service named `phpfpm` can be run and `composer` can be +### run inside the `phpfpm` service. +### 2. [ergebnis/composer-normalize](https://github.com/ergebnis/composer-normalize) +### is a dev requirement in `composer.json`: +### +### ``` shell +### docker compose run --rm phpfpm composer require --dev ergebnis/composer-normalize +### ``` +### +### Normalize `composer.json` by running +### +### ``` shell +### docker compose run --rm phpfpm composer normalize +### ``` + +name: Composer + +env: + COMPOSE_USER: root + +on: + pull_request: + push: + branches: + - main + - develop + +jobs: + composer-validate: + runs-on: ubuntu-latest + strategy: + fail-fast: false + steps: + - uses: actions/checkout@v4 + - run: | + docker network create frontend + docker compose run --rm phpfpm composer validate --strict + + composer-normalized: + runs-on: ubuntu-latest + strategy: + fail-fast: false + steps: + - uses: actions/checkout@v4 + - run: | + docker network create frontend + docker compose run --rm phpfpm composer install + docker compose run --rm phpfpm composer normalize --dry-run + + composer-audit: + runs-on: ubuntu-latest + strategy: + fail-fast: false + steps: + - uses: actions/checkout@v4 + - run: | + docker network create frontend + docker compose run --rm phpfpm composer audit diff --git a/github/workflows/drupal/javascript.yaml b/github/workflows/drupal/javascript.yaml new file mode 100644 index 00000000..65d54681 --- /dev/null +++ b/github/workflows/drupal/javascript.yaml @@ -0,0 +1,36 @@ +# Do not edit this file! Make a pull request on changing +# github/workflows/drupal/javascript.yaml in +# https://github.com/itk-dev/devops_itkdev-docker if need be. + +### ### Drupal JavaScript (and TypeScript) +### +### Validates JavaScript files. +### +### #### Assumptions +### +### 1. A docker compose service named `prettier` for running +### [Prettier](https://prettier.io/) exists. + +name: JavaScript + +on: + pull_request: + push: + branches: + - main + - develop + +jobs: + javascript-lint: + runs-on: ubuntu-latest + strategy: + fail-fast: false + steps: + - name: Checkout + uses: actions/checkout@v4 + + - run: | + docker network create frontend + + - run: | + docker compose run --rm prettier 'web/themes/custom/**/js/**/*.js' --check diff --git a/github/workflows/drupal/php.yaml b/github/workflows/drupal/php.yaml new file mode 100644 index 00000000..1bd5a93a --- /dev/null +++ b/github/workflows/drupal/php.yaml @@ -0,0 +1,55 @@ +# Do not edit this file! Make a pull request on changing +# github/workflows/drupal/php.yaml in +# https://github.com/itk-dev/devops_itkdev-docker if need be. + +### ### Drupal PHP +### +### Checks that PHP code adheres to the [Drupal coding +### standards](https://www.drupal.org/docs/develop/standards). +### +### #### Assumptions +### +### 1. A docker compose service named `phpfpm` can be run and `composer` can be +### run inside the `phpfpm` service. +### 2. [drupal/coder](https://www.drupal.org/project/coder) is a dev requirement +### in `composer.json`: +### +### ``` shell +### docker compose run --rm phpfpm composer require --dev drupal/coder +### ``` +### +### Clean up and check code by running +### +### ``` shell +### docker compose run --rm phpfpm vendor/bin/phpcbf +### docker compose run --rm phpfpm vendor/bin/phpcs +### ``` +### +### > [!NOTE] +### > The template adds `.phpcs.xml.dist` as [a configuration file for +### > PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#using-a-default-configuration-file) +### > and this makes it possible to override the actual configuration used in a +### > project by adding a more important configuration file, e.g. `.phpcs.xml`. + +name: PHP + +env: + COMPOSE_USER: root + +on: + pull_request: + push: + branches: + - main + - develop + +jobs: + coding-standards: + name: PHP - Check Coding Standards + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: | + docker network create frontend + docker compose run --rm phpfpm composer install + docker compose run --rm phpfpm vendor/bin/phpcs diff --git a/github/workflows/drupal/site.yaml b/github/workflows/drupal/site.yaml new file mode 100644 index 00000000..70561cba --- /dev/null +++ b/github/workflows/drupal/site.yaml @@ -0,0 +1,126 @@ +# Do not edit this file! Make a pull request on changing +# github/workflows/drupal/site.yaml in +# https://github.com/itk-dev/devops_itkdev-docker if need be. + +### ### Drupal +### +### Checks that site can be installed and can be updated (from base branch on +### pull request). +### +### #### Assumptions +### +### 1. A docker compose service named `phpfpm` can be run and `composer` can be +### run inside the `phpfpm` service. +### 2. The docker setup contains a database container and other the dependent +### services and the default settings match connection credentials for these +### services. +### 3. The Drupal site can be installed from existing config. + +name: Drupal + +env: + COMPOSE_USER: root + +on: + pull_request: + push: + branches: + - main + - develop + +jobs: + install-site: + name: Check that site can be installed + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Install site + run: | + docker network create frontend + docker compose pull + docker compose up --detach + + # Important: Use --no-interaction to make https://getcomposer.org/doc/06-config.md#discard-changes have effect. + docker compose exec phpfpm composer install --no-interaction + + - name: Install site + run: | + # Add some local settings. + cat > web/sites/default/settings.local.php <<'EOF' + web/sites/default/settings.local.php <<'EOF' + [!NOTE] The template adds `.php-cs-fixer.dist.php` as [a configuration +### > file for PHP CS +### > Fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/master/doc/config.rst) +### > and this makes it possible to override the actual configuration used in a +### > project by adding a more important configuration file, `.php-cs-fixer.php`. + +name: Symfony PHP + +env: + COMPOSE_USER: root + +on: + pull_request: + push: + branches: + - main + - develop + +jobs: + coding-standards: + name: PHP - Check Coding Standards + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: | + docker network create frontend + docker compose run --rm phpfpm composer install + # https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/master/doc/usage.rst#the-check-command + docker compose run --rm phpfpm vendor/bin/php-cs-fixer fix --dry-run --diff diff --git a/github/workflows/symfony/styles.yaml b/github/workflows/symfony/styles.yaml new file mode 100644 index 00000000..c6dec50f --- /dev/null +++ b/github/workflows/symfony/styles.yaml @@ -0,0 +1,36 @@ +# Do not edit this file! Make a pull request on changing +# github/workflows/symfony/styles.yaml in +# https://github.com/itk-dev/devops_itkdev-docker if need be. + +### ### Symfony Styles (CSS and SCSS) +### +### Validates styles files. +### +### #### Assumptions +### +### 1. A docker compose service named `prettier` for running +### [Prettier](https://prettier.io/) exists. + +name: Styles + +on: + pull_request: + push: + branches: + - main + - develop + +jobs: + styles-lint: + runs-on: ubuntu-latest + strategy: + fail-fast: false + steps: + - name: Checkout + uses: actions/checkout@v4 + + - run: | + docker network create frontend + + - run: | + docker compose run --rm prettier 'assets/**/*.?css' --check diff --git a/github/workflows/twig.yaml b/github/workflows/twig.yaml new file mode 100644 index 00000000..9b0e3431 --- /dev/null +++ b/github/workflows/twig.yaml @@ -0,0 +1,48 @@ +# Do not edit this file! Make a pull request on changing +# github/workflows/twig.yaml in +# https://github.com/itk-dev/devops_itkdev-docker if need be. + +### ### Twig +### +### Validates Twig files +### +### #### Assumptions +### +### 1. A docker compose service named `phpfpm` can be run and `composer` can be +### run inside the `phpfpm` service. +### 2. [vincentlanglet/twig-cs-fixer](https://github.com/VincentLanglet/Twig-CS-Fixer) +### is a dev requirement in `composer.json`: +### +### ``` shell +### docker compose run --rm phpfpm composer require --dev vincentlanglet/twig-cs-fixer +### ``` +### +### 3. A [Configuration +### file](https://github.com/VincentLanglet/Twig-CS-Fixer/blob/main/docs/configuration.md#configuration-file) +### in the root of the project defines which files to check and rules to use. + +name: Twig + +env: + COMPOSE_USER: root + +on: + pull_request: + push: + branches: + - main + - develop + +jobs: + twig-lint: + runs-on: ubuntu-latest + strategy: + fail-fast: false + steps: + - name: Checkout + uses: actions/checkout@v4 + + - run: | + docker network create frontend + docker compose run --rm phpfpm composer install + docker compose run --rm phpfpm vendor/bin/twig-cs-fixer lint diff --git a/scripts/itkdev-docker-compose b/scripts/itkdev-docker-compose index b780e4d6..679e357a 100755 --- a/scripts/itkdev-docker-compose +++ b/scripts/itkdev-docker-compose @@ -107,7 +107,9 @@ function template_install { fi echo "${bold}Installing $name template${normal}" - rsync --archive $source_dir $target_dir + # Use --copy-links to copy actual files rather than symlinks (cf. + # https://linux.die.net/man/1/rsync#:~:text=%2DL%2C-,%2D%2Dcopy%2Dlinks,-When%20symlinks%20are) + rsync --archive --copy-links "$source_dir" "$target_dir" local project_name_default=$(basename $target_dir) diff --git a/task/Taskfile.github-actions.yml b/task/Taskfile.github-actions.yml new file mode 100644 index 00000000..a7709ad2 --- /dev/null +++ b/task/Taskfile.github-actions.yml @@ -0,0 +1,105 @@ +version: '3' + +tasks: + documentation:update: + desc: "Update GitHub Actions template documentation" + cmds: + - task: run-script + vars: + SCRIPT: github-documentation-update + - SKIP_FIX=1 task lint:markdown -- docs/github-actions-templates.md + + documentation:diff: + desc: "Diff generated documentation ignoring select lines" + cmds: + # Ignore some PO metadata when git diff'ing, e.g. + # + # "POT-Creation-Date: 2025-03-12 18:18+0100\n" + # "PO-Revision-Date: 2025-03-12 18:18+0100\n" + - git diff --exit-code --ignore-blank-lines --ignore-matching-lines='automatically created' '*.md' + + documentation:checkout: + desc: 'git checkout all translation file changes if only date metadata is changed' + cmds: + - git checkout '*.md' + # https://taskfile.dev/reference/schema#precondition + preconditions: + - sh: task {{.TASK | replace ":checkout" ":diff" }} + msg: | + Translations seem to have changed. + + Run + + task {{.TASK | replace ":checkout" ":diff" }} + + to check. + + template-headers:update: + prompt: "Updating headers may break things, so check result afterwards. Really update headers?" + desc: "Update headers in GitHub Actions templates" + cmds: + - task: run-script + vars: + SCRIPT: template-headers-update + + config-headers:update: + prompt: "Updating headers may break things, so check result afterwards. Really update headers?" + desc: "Update headers in tool config" + cmds: + - task: run-script + vars: + SCRIPT: config-headers-update + + link: + desc: "Set up symlinks" + prompt: "Reset all symlinks?" + cmds: + - task: run-script + vars: + SCRIPT: github-actions-link + - | + for f in $(find templates -mindepth 1 -maxdepth 1 -type d | sort); do + WORKFLOW_FOLDER="$f/.github/workflows" task github-actions:workflow-documentation:update + done + silent: true + + show: + desc: "Show links" + cmds: + - find templates -type l -ls + silent: true + + run-script: + internal: true + cmds: + - docker run --rm --volume "$PWD:/app" --user ${COMPOSE_USER:-deploy} itkdev/php8.4-fpm:latest task/scripts/{{.SCRIPT}} + requires: + vars: + - SCRIPT + + workflow-documentation:update: + cmds: + - defer: rm {{.DATA_PATH}} + - | + : > {{.DATA_PATH}} + ( + echo "repository:" + # TODO Get this URL from `git` + echo " url: 'https://github.com/itk-dev/devops_itkdev-docker'" + echo " name: 'ITK-dev docker setup'" + ) >> {{.DATA_PATH}} + echo "files:" >> {{.DATA_PATH}} + for f in $(find {{.WORKFLOW_FOLDER}} -name '*.yaml' | sort); do + echo " - $(basename "$f")" >> {{.DATA_PATH}} + done + + - cat {{.DATA_PATH}} + + - docker compose run --rm jinja2-cli --strict --format=yaml {{.TEMPLATE_PATH}} {{.DATA_PATH}} | tee {{.WORKFLOW_FOLDER}}/README.workflows.md + - task lint:markdown + vars: + TEMPLATE_PATH: task/templates/README.workflows.md.j2 + DATA_PATH: tmp-data.yaml + requires: + vars: + - WORKFLOW_FOLDER diff --git a/task/docs/github-actions-templates.md b/task/docs/github-actions-templates.md new file mode 100644 index 00000000..e2fad1bb --- /dev/null +++ b/task/docs/github-actions-templates.md @@ -0,0 +1,23 @@ + +# Github Actions templates + +This repository contains a number of [GitHub Actions](https://docs.github.com/en/actions) workflow template files that +are copied to a project when running `itkdev-docker-compose template:install`. Any changes to the workflows should be +made in [this repository](https://github.com/itk-dev/devops_itkdev-docker) and then the project template must be updated +to match the new templates. + +## Naming conventions + +* Named after what a tool is concerned with, not how it's concerned with it. +* Some configuration based on template type (drupal, symfony) + +## Templates + +--- + +[github/workflows/*.yaml](github/workflows/*.yaml) + +--- diff --git a/task/scripts/config-headers-update b/task/scripts/config-headers-update new file mode 100755 index 00000000..035f27df --- /dev/null +++ b/task/scripts/config-headers-update @@ -0,0 +1,41 @@ +#!/usr/bin/env bash + +script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +project_dir=$(cd "$(dirname "$script_dir")/.." && pwd) + +cd "$project_dir" || exit + +# shellcheck disable=SC2044 +for f in $(find config -type f); do + echo "$f" + + # Remove exiting header. + # This is done by deleting all lines from the top of the file to a blank line. + sed -i '1,/^$/d' "$f" + + comment_prefix='' + comment_start='# ' + comment_end='' + if [[ "$f" =~ \.php(\.dist)?$ ]]; then + comment_prefix='' + comment_start='' + fi + # Write header and file into temporary file. + ( + [[ -n "${comment_prefix}" ]] && echo "${comment_prefix}" + echo "${comment_start}This file is copied from $f in https://github.com/itk-dev/devops_itkdev-docker.${comment_end}" + echo "${comment_start}Feel free to edit the file, but consider making a pull request if you find a general issue with the file.${comment_end}" + echo "" + cat "$f" + ) > "$f.tmp" + # Replace original file with temporary file. + mv "$f.tmp" "$f" +done diff --git a/task/scripts/github-actions-link b/task/scripts/github-actions-link new file mode 100755 index 00000000..5b71f4c5 --- /dev/null +++ b/task/scripts/github-actions-link @@ -0,0 +1,84 @@ +#!/usr/bin/env bash +set -o errexit -o errtrace -o noclobber -o nounset -o pipefail +IFS=$'\n\t' + +script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +project_dir=$(cd "$(dirname "$script_dir")/.." && pwd) + +cd "$project_dir" || exit + +# String type (drupal or symfony) from start of name +function strip-project-type() { + name=$1 + + if [[ "$name" =~ ^(drupal|symfony)/(.+) ]]; then + name="${BASH_REMATCH[2]}" + fi + + echo "$name" +} + +find templates -type l -delete + +for template_dir in templates/*; do + template_name=$(basename "$template_dir") + + echo "$template_name" + echo + + project_type="" + if [[ "$template_name" =~ ^drupal- ]]; then + project_type="drupal" + elif [[ "$template_name" =~ ^symfony- ]]; then + project_type="symfony" + else + (>&2 echo "Unknown template type: $template_name") + exit 1 + fi + + for f in $(find github/workflows/ -name '*.yaml' | sort); do + source_file_name='' + # Note: / is NOT a regex delimiter here, but an actual /, i.e. a directory separator. + if [[ "$f" =~ /drupal/ ]]; then + if [[ "$project_type" == "drupal" ]]; then + source_file_name="$(basename "$(dirname "$f")")/$(basename "$f")" + fi + elif [[ "$f" =~ /symfony/ ]]; then + if [[ "$project_type" == "symfony" ]]; then + source_file_name="$(basename "$(dirname "$f")")/$(basename "$f")" + fi + else + source_file_name=$(basename "$f") + fi + + if [[ -n "$source_file_name" ]]; then + # Link GitHub Actions workflow file + target_dir="$template_dir/.github/workflows" + mkdir -p "$target_dir" + ln -sf "../../../../github/workflows/$source_file_name" "$target_dir/$(strip-project-type "$source_file_name")" + + # Check if we need a language configuration as well + language_name=${source_file_name%.yaml} + config_dir="" + # Check for project_type specific configuration first. + if [ -d "config/$project_type/$language_name" ]; then + config_dir="config/$project_type/$language_name" + elif [ -d "config/$language_name" ]; then + config_dir="config/$language_name" + fi + + if [[ -n "$config_dir" ]]; then + # Some config files are hidden + GLOBIGNORE=".:.." + for config_file in "$config_dir"/*; do + if [ -f "$config_file" ]; then + ln -sf "../../$config_file" "$template_dir/" + fi + done + fi + fi + done + + find "$template_dir" -type l -ls + echo +done diff --git a/task/scripts/github-documentation-update b/task/scripts/github-documentation-update new file mode 100755 index 00000000..6eb978d7 --- /dev/null +++ b/task/scripts/github-documentation-update @@ -0,0 +1,60 @@ +#!/usr/bin/env bash +# set -o errexit -o errtrace -o noclobber -o nounset -o pipefail +# IFS=$'\n\t' + +script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +project_dir=$(cd "$(dirname "$script_dir")/.." && pwd) + +cd "$project_dir" || exit + +template_file_name="$script_dir/../templates/github-actions-templates.md" + +placeholder="insert:templates:here" +placeholder_line=$(grep --line-number --no-filename "$placeholder" "$template_file_name" | cut -d: -f1) + +if [[ -z "$placeholder_line" ]]; then + (>&2 echo "Cannot find placeholder $placeholder in $template_file_name") + exit 1 +fi + +output_file_name="docs/$(basename "$template_file_name")" + +mkdir -p "$(dirname "$output_file_name")" + +# Empty the output file +: >| "$output_file_name" + +cat >> "$output_file_name" < +EOF + +# Template content before placeholder +head --lines="$((placeholder_line-1))" "$template_file_name" >> "$output_file_name" + +for f in $(find github/workflows/ -name '*.yaml' | sort); do + # Separator + cat >> "$output_file_name" <> "$output_file_name" +done + +# Template content after placeholder without any leading blank lines (cf. +# https://stackoverflow.com/a/7359879) +tail --lines="+$((placeholder_line+1))" "$template_file_name" | sed '/./,$!d' >> "$output_file_name" + +echo "$output_file_name" diff --git a/task/scripts/template-headers-update b/task/scripts/template-headers-update new file mode 100755 index 00000000..1e3ade3d --- /dev/null +++ b/task/scripts/template-headers-update @@ -0,0 +1,26 @@ +#!/usr/bin/env bash + +script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +project_dir=$(cd "$(dirname "$script_dir")/.." && pwd) + +cd "$project_dir" || exit + +# shellcheck disable=SC2044 +for f in $(find github/workflows/ -name '*.yaml'); do + echo "$f" + + # Remove exiting header. + # This is done by deleting all lines from the top of the file to a blank line. + sed -i '1,/^$/d' "$f" + + # Write header and file into temporary file. + ( + echo "# Do not edit this file! Make a pull request on changing" + echo "# $f in" + echo "# https://github.com/itk-dev/devops_itkdev-docker if need be." + echo "" + cat "$f" + ) > "$f.tmp" + # Replace original file with temporary file. + mv "$f.tmp" "$f" +done diff --git a/task/templates/README.workflows.md.j2 b/task/templates/README.workflows.md.j2 new file mode 100644 index 00000000..03012b92 --- /dev/null +++ b/task/templates/README.workflows.md.j2 @@ -0,0 +1,19 @@ +# Workflow templates + +The {{files|length}} workflow files + +{% for file in files -%} +* [{{ file }}]({{file}}) +{% endfor %} + +in this folder are generated from <{{repository.url}}>. + +See [Github Actions templates]({{repository.url}}/blob/develop/docs/github-actions-templates.md) +for general information on the workflow templates. + +[Create a pull request]({{repository.url}}/pulls) to fix any bugs you find +or to add new or missing features. + +{# Local Variables: #} +{# mode: markdown #} +{# End: #} diff --git a/task/templates/github-actions-templates.md b/task/templates/github-actions-templates.md new file mode 100644 index 00000000..078b0354 --- /dev/null +++ b/task/templates/github-actions-templates.md @@ -0,0 +1,49 @@ +# Github Actions templates + +This repository contains a number of [GitHub Actions](https://docs.github.com/en/actions) workflow template files that +are copied to a project when running `itkdev-docker-compose template:install`. Any changes to the workflows should be +made in [this repository](https://github.com/itk-dev/devops_itkdev-docker) and then the project template must be updated +to match the new templates. + +## Naming conventions + +* A workflow file is named after what it is _concerned_ with, not _how_ it's concerned with it and which tools are + actually used, i.e. we have a [`markdown.yaml`](github/workflows/markdown.yaml) file and not a `markdownlint.yaml` + file. +* Some workflows are specific to a project type, currently `drupal` or `symfony`, and these sit in a project type + subfolder, e.g. `github/workflows/drupal`. +* Some tools require configuration files, and these sit in the `config` folder. Some tool configuration may be specific + to a project type (or make sence only for a specific project type), and these specific config files sit in a project + type subfolder, e.g. `config/drupal/php/.phpcs.xml.dist` and `config/drupal/twig/.twig-cs-fixer.dist.php` + +## Templates + +The current list of templates is shown in the following sections. + + + +--- + +## Updating template documentation + +To update this document, run + +``` shell +task github-actions:documentation:update +``` + +### GitHub Actions workflow documentation convention + +Each workflow file must contain a single documentation block with lines starting with `###`, e.g. + +``` markdown +### ### The title +### +### This template … +### +### See … for details. +``` + +> [!IMPORTANT] +> All lines in the documentation block must start with `###` and the documentation block consists of all consecutive +> lines starting with `###`. diff --git a/templates/drupal-10/.docker/data/README.md b/templates/drupal-10/.docker/data/README.md index 8895d7b1..1dc6b88a 100644 --- a/templates/drupal-10/.docker/data/README.md +++ b/templates/drupal-10/.docker/data/README.md @@ -2,10 +2,13 @@ Please map persistent volumes to this directory on the servers. -If a container needs to persist data between restarts you can map the relevant files in the container to ``docker/data/`. +If a container needs to persist data between restarts you can map the relevant files in the container to +`docker/data/`. ## RabbitMQ example -If you are using RabbitMQ running in a container as a message broker you need to configure a persistent volume for RabbitMQs data directory to avoid losing message on container restarts. + +If you are using RabbitMQ running in a container as a message broker you need to configure a persistent volume for +RabbitMQs data directory to avoid losing message on container restarts. ```yaml # docker-compose.server.override.yml diff --git a/templates/drupal-10/.github/workflows/README.workflows.md b/templates/drupal-10/.github/workflows/README.workflows.md new file mode 100644 index 00000000..cb1d4025 --- /dev/null +++ b/templates/drupal-10/.github/workflows/README.workflows.md @@ -0,0 +1,20 @@ +# Workflow templates + +The 8 workflow files + +* [changelog.yaml](changelog.yaml) +* [composer.yaml](composer.yaml) +* [javascript.yaml](javascript.yaml) +* [markdown.yaml](markdown.yaml) +* [php.yaml](php.yaml) +* [site.yaml](site.yaml) +* [styles.yaml](styles.yaml) +* [twig.yaml](twig.yaml) + +in this folder are generated from . + +See [Github Actions templates](https://github.com/itk-dev/devops_itkdev-docker/blob/develop/docs/github-actions-templates.md) +for general information on the workflow templates. + +[Create a pull request](https://github.com/itk-dev/devops_itkdev-docker/pulls) to fix any bugs you find +or to add new or missing features. diff --git a/templates/drupal-10/.github/workflows/changelog.yaml b/templates/drupal-10/.github/workflows/changelog.yaml new file mode 120000 index 00000000..5ffe5c3c --- /dev/null +++ b/templates/drupal-10/.github/workflows/changelog.yaml @@ -0,0 +1 @@ +../../../../github/workflows/changelog.yaml \ No newline at end of file diff --git a/templates/drupal-10/.github/workflows/composer.yaml b/templates/drupal-10/.github/workflows/composer.yaml new file mode 120000 index 00000000..23955648 --- /dev/null +++ b/templates/drupal-10/.github/workflows/composer.yaml @@ -0,0 +1 @@ +../../../../github/workflows/composer.yaml \ No newline at end of file diff --git a/templates/drupal-10/.github/workflows/javascript.yaml b/templates/drupal-10/.github/workflows/javascript.yaml new file mode 120000 index 00000000..e76b3a56 --- /dev/null +++ b/templates/drupal-10/.github/workflows/javascript.yaml @@ -0,0 +1 @@ +../../../../github/workflows/drupal/javascript.yaml \ No newline at end of file diff --git a/templates/drupal-10/.github/workflows/markdown.yaml b/templates/drupal-10/.github/workflows/markdown.yaml new file mode 120000 index 00000000..ab3eafad --- /dev/null +++ b/templates/drupal-10/.github/workflows/markdown.yaml @@ -0,0 +1 @@ +../../../../github/workflows/markdown.yaml \ No newline at end of file diff --git a/templates/drupal-10/.github/workflows/php.yaml b/templates/drupal-10/.github/workflows/php.yaml new file mode 120000 index 00000000..9367a866 --- /dev/null +++ b/templates/drupal-10/.github/workflows/php.yaml @@ -0,0 +1 @@ +../../../../github/workflows/drupal/php.yaml \ No newline at end of file diff --git a/templates/drupal-10/.github/workflows/site.yaml b/templates/drupal-10/.github/workflows/site.yaml new file mode 120000 index 00000000..001dbf2c --- /dev/null +++ b/templates/drupal-10/.github/workflows/site.yaml @@ -0,0 +1 @@ +../../../../github/workflows/drupal/site.yaml \ No newline at end of file diff --git a/templates/drupal-10/.github/workflows/styles.yaml b/templates/drupal-10/.github/workflows/styles.yaml new file mode 120000 index 00000000..b3e30b71 --- /dev/null +++ b/templates/drupal-10/.github/workflows/styles.yaml @@ -0,0 +1 @@ +../../../../github/workflows/drupal/styles.yaml \ No newline at end of file diff --git a/templates/drupal-10/.github/workflows/twig.yaml b/templates/drupal-10/.github/workflows/twig.yaml new file mode 120000 index 00000000..649f1cd6 --- /dev/null +++ b/templates/drupal-10/.github/workflows/twig.yaml @@ -0,0 +1 @@ +../../../../github/workflows/twig.yaml \ No newline at end of file diff --git a/templates/drupal-10/.markdownlint.jsonc b/templates/drupal-10/.markdownlint.jsonc new file mode 120000 index 00000000..1a3d9afe --- /dev/null +++ b/templates/drupal-10/.markdownlint.jsonc @@ -0,0 +1 @@ +../../config/markdown/.markdownlint.jsonc \ No newline at end of file diff --git a/templates/drupal-10/.markdownlintignore b/templates/drupal-10/.markdownlintignore new file mode 120000 index 00000000..0a61367e --- /dev/null +++ b/templates/drupal-10/.markdownlintignore @@ -0,0 +1 @@ +../../config/markdown/.markdownlintignore \ No newline at end of file diff --git a/templates/drupal-10/.phpcs.xml.dist b/templates/drupal-10/.phpcs.xml.dist new file mode 120000 index 00000000..17295906 --- /dev/null +++ b/templates/drupal-10/.phpcs.xml.dist @@ -0,0 +1 @@ +../../config/drupal/php/.phpcs.xml.dist \ No newline at end of file diff --git a/templates/drupal-10/.twig-cs-fixer.dist.php b/templates/drupal-10/.twig-cs-fixer.dist.php new file mode 120000 index 00000000..7330065d --- /dev/null +++ b/templates/drupal-10/.twig-cs-fixer.dist.php @@ -0,0 +1 @@ +../../config/drupal/twig/.twig-cs-fixer.dist.php \ No newline at end of file diff --git a/templates/drupal-11/.github/workflows/README.workflows.md b/templates/drupal-11/.github/workflows/README.workflows.md new file mode 100644 index 00000000..cb1d4025 --- /dev/null +++ b/templates/drupal-11/.github/workflows/README.workflows.md @@ -0,0 +1,20 @@ +# Workflow templates + +The 8 workflow files + +* [changelog.yaml](changelog.yaml) +* [composer.yaml](composer.yaml) +* [javascript.yaml](javascript.yaml) +* [markdown.yaml](markdown.yaml) +* [php.yaml](php.yaml) +* [site.yaml](site.yaml) +* [styles.yaml](styles.yaml) +* [twig.yaml](twig.yaml) + +in this folder are generated from . + +See [Github Actions templates](https://github.com/itk-dev/devops_itkdev-docker/blob/develop/docs/github-actions-templates.md) +for general information on the workflow templates. + +[Create a pull request](https://github.com/itk-dev/devops_itkdev-docker/pulls) to fix any bugs you find +or to add new or missing features. diff --git a/templates/drupal-11/.github/workflows/changelog.yaml b/templates/drupal-11/.github/workflows/changelog.yaml new file mode 120000 index 00000000..5ffe5c3c --- /dev/null +++ b/templates/drupal-11/.github/workflows/changelog.yaml @@ -0,0 +1 @@ +../../../../github/workflows/changelog.yaml \ No newline at end of file diff --git a/templates/drupal-11/.github/workflows/composer.yaml b/templates/drupal-11/.github/workflows/composer.yaml new file mode 120000 index 00000000..23955648 --- /dev/null +++ b/templates/drupal-11/.github/workflows/composer.yaml @@ -0,0 +1 @@ +../../../../github/workflows/composer.yaml \ No newline at end of file diff --git a/templates/drupal-11/.github/workflows/javascript.yaml b/templates/drupal-11/.github/workflows/javascript.yaml new file mode 120000 index 00000000..e76b3a56 --- /dev/null +++ b/templates/drupal-11/.github/workflows/javascript.yaml @@ -0,0 +1 @@ +../../../../github/workflows/drupal/javascript.yaml \ No newline at end of file diff --git a/templates/drupal-11/.github/workflows/markdown.yaml b/templates/drupal-11/.github/workflows/markdown.yaml new file mode 120000 index 00000000..ab3eafad --- /dev/null +++ b/templates/drupal-11/.github/workflows/markdown.yaml @@ -0,0 +1 @@ +../../../../github/workflows/markdown.yaml \ No newline at end of file diff --git a/templates/drupal-11/.github/workflows/php.yaml b/templates/drupal-11/.github/workflows/php.yaml new file mode 120000 index 00000000..9367a866 --- /dev/null +++ b/templates/drupal-11/.github/workflows/php.yaml @@ -0,0 +1 @@ +../../../../github/workflows/drupal/php.yaml \ No newline at end of file diff --git a/templates/drupal-11/.github/workflows/site.yaml b/templates/drupal-11/.github/workflows/site.yaml new file mode 120000 index 00000000..001dbf2c --- /dev/null +++ b/templates/drupal-11/.github/workflows/site.yaml @@ -0,0 +1 @@ +../../../../github/workflows/drupal/site.yaml \ No newline at end of file diff --git a/templates/drupal-11/.github/workflows/styles.yaml b/templates/drupal-11/.github/workflows/styles.yaml new file mode 120000 index 00000000..b3e30b71 --- /dev/null +++ b/templates/drupal-11/.github/workflows/styles.yaml @@ -0,0 +1 @@ +../../../../github/workflows/drupal/styles.yaml \ No newline at end of file diff --git a/templates/drupal-11/.github/workflows/twig.yaml b/templates/drupal-11/.github/workflows/twig.yaml new file mode 120000 index 00000000..649f1cd6 --- /dev/null +++ b/templates/drupal-11/.github/workflows/twig.yaml @@ -0,0 +1 @@ +../../../../github/workflows/twig.yaml \ No newline at end of file diff --git a/templates/drupal-11/.markdownlint.jsonc b/templates/drupal-11/.markdownlint.jsonc new file mode 120000 index 00000000..1a3d9afe --- /dev/null +++ b/templates/drupal-11/.markdownlint.jsonc @@ -0,0 +1 @@ +../../config/markdown/.markdownlint.jsonc \ No newline at end of file diff --git a/templates/drupal-11/.markdownlintignore b/templates/drupal-11/.markdownlintignore new file mode 120000 index 00000000..0a61367e --- /dev/null +++ b/templates/drupal-11/.markdownlintignore @@ -0,0 +1 @@ +../../config/markdown/.markdownlintignore \ No newline at end of file diff --git a/templates/drupal-11/.phpcs.xml.dist b/templates/drupal-11/.phpcs.xml.dist new file mode 120000 index 00000000..17295906 --- /dev/null +++ b/templates/drupal-11/.phpcs.xml.dist @@ -0,0 +1 @@ +../../config/drupal/php/.phpcs.xml.dist \ No newline at end of file diff --git a/templates/drupal-11/.twig-cs-fixer.dist.php b/templates/drupal-11/.twig-cs-fixer.dist.php new file mode 120000 index 00000000..7330065d --- /dev/null +++ b/templates/drupal-11/.twig-cs-fixer.dist.php @@ -0,0 +1 @@ +../../config/drupal/twig/.twig-cs-fixer.dist.php \ No newline at end of file diff --git a/templates/drupal-7/.docker/data/README.md b/templates/drupal-7/.docker/data/README.md index 8895d7b1..1dc6b88a 100644 --- a/templates/drupal-7/.docker/data/README.md +++ b/templates/drupal-7/.docker/data/README.md @@ -2,10 +2,13 @@ Please map persistent volumes to this directory on the servers. -If a container needs to persist data between restarts you can map the relevant files in the container to ``docker/data/`. +If a container needs to persist data between restarts you can map the relevant files in the container to +`docker/data/`. ## RabbitMQ example -If you are using RabbitMQ running in a container as a message broker you need to configure a persistent volume for RabbitMQs data directory to avoid losing message on container restarts. + +If you are using RabbitMQ running in a container as a message broker you need to configure a persistent volume for +RabbitMQs data directory to avoid losing message on container restarts. ```yaml # docker-compose.server.override.yml diff --git a/templates/drupal-7/.github/workflows/README.workflows.md b/templates/drupal-7/.github/workflows/README.workflows.md new file mode 100644 index 00000000..cb1d4025 --- /dev/null +++ b/templates/drupal-7/.github/workflows/README.workflows.md @@ -0,0 +1,20 @@ +# Workflow templates + +The 8 workflow files + +* [changelog.yaml](changelog.yaml) +* [composer.yaml](composer.yaml) +* [javascript.yaml](javascript.yaml) +* [markdown.yaml](markdown.yaml) +* [php.yaml](php.yaml) +* [site.yaml](site.yaml) +* [styles.yaml](styles.yaml) +* [twig.yaml](twig.yaml) + +in this folder are generated from . + +See [Github Actions templates](https://github.com/itk-dev/devops_itkdev-docker/blob/develop/docs/github-actions-templates.md) +for general information on the workflow templates. + +[Create a pull request](https://github.com/itk-dev/devops_itkdev-docker/pulls) to fix any bugs you find +or to add new or missing features. diff --git a/templates/drupal-7/.github/workflows/changelog.yaml b/templates/drupal-7/.github/workflows/changelog.yaml new file mode 120000 index 00000000..5ffe5c3c --- /dev/null +++ b/templates/drupal-7/.github/workflows/changelog.yaml @@ -0,0 +1 @@ +../../../../github/workflows/changelog.yaml \ No newline at end of file diff --git a/templates/drupal-7/.github/workflows/composer.yaml b/templates/drupal-7/.github/workflows/composer.yaml new file mode 120000 index 00000000..23955648 --- /dev/null +++ b/templates/drupal-7/.github/workflows/composer.yaml @@ -0,0 +1 @@ +../../../../github/workflows/composer.yaml \ No newline at end of file diff --git a/templates/drupal-7/.github/workflows/javascript.yaml b/templates/drupal-7/.github/workflows/javascript.yaml new file mode 120000 index 00000000..e76b3a56 --- /dev/null +++ b/templates/drupal-7/.github/workflows/javascript.yaml @@ -0,0 +1 @@ +../../../../github/workflows/drupal/javascript.yaml \ No newline at end of file diff --git a/templates/drupal-7/.github/workflows/markdown.yaml b/templates/drupal-7/.github/workflows/markdown.yaml new file mode 120000 index 00000000..ab3eafad --- /dev/null +++ b/templates/drupal-7/.github/workflows/markdown.yaml @@ -0,0 +1 @@ +../../../../github/workflows/markdown.yaml \ No newline at end of file diff --git a/templates/drupal-7/.github/workflows/php.yaml b/templates/drupal-7/.github/workflows/php.yaml new file mode 120000 index 00000000..9367a866 --- /dev/null +++ b/templates/drupal-7/.github/workflows/php.yaml @@ -0,0 +1 @@ +../../../../github/workflows/drupal/php.yaml \ No newline at end of file diff --git a/templates/drupal-7/.github/workflows/site.yaml b/templates/drupal-7/.github/workflows/site.yaml new file mode 120000 index 00000000..001dbf2c --- /dev/null +++ b/templates/drupal-7/.github/workflows/site.yaml @@ -0,0 +1 @@ +../../../../github/workflows/drupal/site.yaml \ No newline at end of file diff --git a/templates/drupal-7/.github/workflows/styles.yaml b/templates/drupal-7/.github/workflows/styles.yaml new file mode 120000 index 00000000..b3e30b71 --- /dev/null +++ b/templates/drupal-7/.github/workflows/styles.yaml @@ -0,0 +1 @@ +../../../../github/workflows/drupal/styles.yaml \ No newline at end of file diff --git a/templates/drupal-7/.github/workflows/twig.yaml b/templates/drupal-7/.github/workflows/twig.yaml new file mode 120000 index 00000000..649f1cd6 --- /dev/null +++ b/templates/drupal-7/.github/workflows/twig.yaml @@ -0,0 +1 @@ +../../../../github/workflows/twig.yaml \ No newline at end of file diff --git a/templates/drupal-7/.markdownlint.jsonc b/templates/drupal-7/.markdownlint.jsonc new file mode 120000 index 00000000..1a3d9afe --- /dev/null +++ b/templates/drupal-7/.markdownlint.jsonc @@ -0,0 +1 @@ +../../config/markdown/.markdownlint.jsonc \ No newline at end of file diff --git a/templates/drupal-7/.markdownlintignore b/templates/drupal-7/.markdownlintignore new file mode 120000 index 00000000..0a61367e --- /dev/null +++ b/templates/drupal-7/.markdownlintignore @@ -0,0 +1 @@ +../../config/markdown/.markdownlintignore \ No newline at end of file diff --git a/templates/drupal-7/.phpcs.xml.dist b/templates/drupal-7/.phpcs.xml.dist new file mode 120000 index 00000000..17295906 --- /dev/null +++ b/templates/drupal-7/.phpcs.xml.dist @@ -0,0 +1 @@ +../../config/drupal/php/.phpcs.xml.dist \ No newline at end of file diff --git a/templates/drupal-7/.twig-cs-fixer.dist.php b/templates/drupal-7/.twig-cs-fixer.dist.php new file mode 120000 index 00000000..7330065d --- /dev/null +++ b/templates/drupal-7/.twig-cs-fixer.dist.php @@ -0,0 +1 @@ +../../config/drupal/twig/.twig-cs-fixer.dist.php \ No newline at end of file diff --git a/templates/drupal-8/.docker/data/README.md b/templates/drupal-8/.docker/data/README.md index 8895d7b1..1dc6b88a 100644 --- a/templates/drupal-8/.docker/data/README.md +++ b/templates/drupal-8/.docker/data/README.md @@ -2,10 +2,13 @@ Please map persistent volumes to this directory on the servers. -If a container needs to persist data between restarts you can map the relevant files in the container to ``docker/data/`. +If a container needs to persist data between restarts you can map the relevant files in the container to +`docker/data/`. ## RabbitMQ example -If you are using RabbitMQ running in a container as a message broker you need to configure a persistent volume for RabbitMQs data directory to avoid losing message on container restarts. + +If you are using RabbitMQ running in a container as a message broker you need to configure a persistent volume for +RabbitMQs data directory to avoid losing message on container restarts. ```yaml # docker-compose.server.override.yml diff --git a/templates/drupal-8/.github/workflows/README.workflows.md b/templates/drupal-8/.github/workflows/README.workflows.md new file mode 100644 index 00000000..cb1d4025 --- /dev/null +++ b/templates/drupal-8/.github/workflows/README.workflows.md @@ -0,0 +1,20 @@ +# Workflow templates + +The 8 workflow files + +* [changelog.yaml](changelog.yaml) +* [composer.yaml](composer.yaml) +* [javascript.yaml](javascript.yaml) +* [markdown.yaml](markdown.yaml) +* [php.yaml](php.yaml) +* [site.yaml](site.yaml) +* [styles.yaml](styles.yaml) +* [twig.yaml](twig.yaml) + +in this folder are generated from . + +See [Github Actions templates](https://github.com/itk-dev/devops_itkdev-docker/blob/develop/docs/github-actions-templates.md) +for general information on the workflow templates. + +[Create a pull request](https://github.com/itk-dev/devops_itkdev-docker/pulls) to fix any bugs you find +or to add new or missing features. diff --git a/templates/drupal-8/.github/workflows/changelog.yaml b/templates/drupal-8/.github/workflows/changelog.yaml new file mode 120000 index 00000000..5ffe5c3c --- /dev/null +++ b/templates/drupal-8/.github/workflows/changelog.yaml @@ -0,0 +1 @@ +../../../../github/workflows/changelog.yaml \ No newline at end of file diff --git a/templates/drupal-8/.github/workflows/composer.yaml b/templates/drupal-8/.github/workflows/composer.yaml new file mode 120000 index 00000000..23955648 --- /dev/null +++ b/templates/drupal-8/.github/workflows/composer.yaml @@ -0,0 +1 @@ +../../../../github/workflows/composer.yaml \ No newline at end of file diff --git a/templates/drupal-8/.github/workflows/javascript.yaml b/templates/drupal-8/.github/workflows/javascript.yaml new file mode 120000 index 00000000..e76b3a56 --- /dev/null +++ b/templates/drupal-8/.github/workflows/javascript.yaml @@ -0,0 +1 @@ +../../../../github/workflows/drupal/javascript.yaml \ No newline at end of file diff --git a/templates/drupal-8/.github/workflows/markdown.yaml b/templates/drupal-8/.github/workflows/markdown.yaml new file mode 120000 index 00000000..ab3eafad --- /dev/null +++ b/templates/drupal-8/.github/workflows/markdown.yaml @@ -0,0 +1 @@ +../../../../github/workflows/markdown.yaml \ No newline at end of file diff --git a/templates/drupal-8/.github/workflows/php.yaml b/templates/drupal-8/.github/workflows/php.yaml new file mode 120000 index 00000000..9367a866 --- /dev/null +++ b/templates/drupal-8/.github/workflows/php.yaml @@ -0,0 +1 @@ +../../../../github/workflows/drupal/php.yaml \ No newline at end of file diff --git a/templates/drupal-8/.github/workflows/site.yaml b/templates/drupal-8/.github/workflows/site.yaml new file mode 120000 index 00000000..001dbf2c --- /dev/null +++ b/templates/drupal-8/.github/workflows/site.yaml @@ -0,0 +1 @@ +../../../../github/workflows/drupal/site.yaml \ No newline at end of file diff --git a/templates/drupal-8/.github/workflows/styles.yaml b/templates/drupal-8/.github/workflows/styles.yaml new file mode 120000 index 00000000..b3e30b71 --- /dev/null +++ b/templates/drupal-8/.github/workflows/styles.yaml @@ -0,0 +1 @@ +../../../../github/workflows/drupal/styles.yaml \ No newline at end of file diff --git a/templates/drupal-8/.github/workflows/twig.yaml b/templates/drupal-8/.github/workflows/twig.yaml new file mode 120000 index 00000000..649f1cd6 --- /dev/null +++ b/templates/drupal-8/.github/workflows/twig.yaml @@ -0,0 +1 @@ +../../../../github/workflows/twig.yaml \ No newline at end of file diff --git a/templates/drupal-8/.markdownlint.jsonc b/templates/drupal-8/.markdownlint.jsonc new file mode 120000 index 00000000..1a3d9afe --- /dev/null +++ b/templates/drupal-8/.markdownlint.jsonc @@ -0,0 +1 @@ +../../config/markdown/.markdownlint.jsonc \ No newline at end of file diff --git a/templates/drupal-8/.markdownlintignore b/templates/drupal-8/.markdownlintignore new file mode 120000 index 00000000..0a61367e --- /dev/null +++ b/templates/drupal-8/.markdownlintignore @@ -0,0 +1 @@ +../../config/markdown/.markdownlintignore \ No newline at end of file diff --git a/templates/drupal-8/.phpcs.xml.dist b/templates/drupal-8/.phpcs.xml.dist new file mode 120000 index 00000000..17295906 --- /dev/null +++ b/templates/drupal-8/.phpcs.xml.dist @@ -0,0 +1 @@ +../../config/drupal/php/.phpcs.xml.dist \ No newline at end of file diff --git a/templates/drupal-8/.twig-cs-fixer.dist.php b/templates/drupal-8/.twig-cs-fixer.dist.php new file mode 120000 index 00000000..7330065d --- /dev/null +++ b/templates/drupal-8/.twig-cs-fixer.dist.php @@ -0,0 +1 @@ +../../config/drupal/twig/.twig-cs-fixer.dist.php \ No newline at end of file diff --git a/templates/drupal-9/.docker/data/README.md b/templates/drupal-9/.docker/data/README.md index 8895d7b1..1dc6b88a 100644 --- a/templates/drupal-9/.docker/data/README.md +++ b/templates/drupal-9/.docker/data/README.md @@ -2,10 +2,13 @@ Please map persistent volumes to this directory on the servers. -If a container needs to persist data between restarts you can map the relevant files in the container to ``docker/data/`. +If a container needs to persist data between restarts you can map the relevant files in the container to +`docker/data/`. ## RabbitMQ example -If you are using RabbitMQ running in a container as a message broker you need to configure a persistent volume for RabbitMQs data directory to avoid losing message on container restarts. + +If you are using RabbitMQ running in a container as a message broker you need to configure a persistent volume for +RabbitMQs data directory to avoid losing message on container restarts. ```yaml # docker-compose.server.override.yml diff --git a/templates/drupal-9/.github/workflows/README.workflows.md b/templates/drupal-9/.github/workflows/README.workflows.md new file mode 100644 index 00000000..cb1d4025 --- /dev/null +++ b/templates/drupal-9/.github/workflows/README.workflows.md @@ -0,0 +1,20 @@ +# Workflow templates + +The 8 workflow files + +* [changelog.yaml](changelog.yaml) +* [composer.yaml](composer.yaml) +* [javascript.yaml](javascript.yaml) +* [markdown.yaml](markdown.yaml) +* [php.yaml](php.yaml) +* [site.yaml](site.yaml) +* [styles.yaml](styles.yaml) +* [twig.yaml](twig.yaml) + +in this folder are generated from . + +See [Github Actions templates](https://github.com/itk-dev/devops_itkdev-docker/blob/develop/docs/github-actions-templates.md) +for general information on the workflow templates. + +[Create a pull request](https://github.com/itk-dev/devops_itkdev-docker/pulls) to fix any bugs you find +or to add new or missing features. diff --git a/templates/drupal-9/.github/workflows/changelog.yaml b/templates/drupal-9/.github/workflows/changelog.yaml new file mode 120000 index 00000000..5ffe5c3c --- /dev/null +++ b/templates/drupal-9/.github/workflows/changelog.yaml @@ -0,0 +1 @@ +../../../../github/workflows/changelog.yaml \ No newline at end of file diff --git a/templates/drupal-9/.github/workflows/composer.yaml b/templates/drupal-9/.github/workflows/composer.yaml new file mode 120000 index 00000000..23955648 --- /dev/null +++ b/templates/drupal-9/.github/workflows/composer.yaml @@ -0,0 +1 @@ +../../../../github/workflows/composer.yaml \ No newline at end of file diff --git a/templates/drupal-9/.github/workflows/javascript.yaml b/templates/drupal-9/.github/workflows/javascript.yaml new file mode 120000 index 00000000..e76b3a56 --- /dev/null +++ b/templates/drupal-9/.github/workflows/javascript.yaml @@ -0,0 +1 @@ +../../../../github/workflows/drupal/javascript.yaml \ No newline at end of file diff --git a/templates/drupal-9/.github/workflows/markdown.yaml b/templates/drupal-9/.github/workflows/markdown.yaml new file mode 120000 index 00000000..ab3eafad --- /dev/null +++ b/templates/drupal-9/.github/workflows/markdown.yaml @@ -0,0 +1 @@ +../../../../github/workflows/markdown.yaml \ No newline at end of file diff --git a/templates/drupal-9/.github/workflows/php.yaml b/templates/drupal-9/.github/workflows/php.yaml new file mode 120000 index 00000000..9367a866 --- /dev/null +++ b/templates/drupal-9/.github/workflows/php.yaml @@ -0,0 +1 @@ +../../../../github/workflows/drupal/php.yaml \ No newline at end of file diff --git a/templates/drupal-9/.github/workflows/site.yaml b/templates/drupal-9/.github/workflows/site.yaml new file mode 120000 index 00000000..001dbf2c --- /dev/null +++ b/templates/drupal-9/.github/workflows/site.yaml @@ -0,0 +1 @@ +../../../../github/workflows/drupal/site.yaml \ No newline at end of file diff --git a/templates/drupal-9/.github/workflows/styles.yaml b/templates/drupal-9/.github/workflows/styles.yaml new file mode 120000 index 00000000..b3e30b71 --- /dev/null +++ b/templates/drupal-9/.github/workflows/styles.yaml @@ -0,0 +1 @@ +../../../../github/workflows/drupal/styles.yaml \ No newline at end of file diff --git a/templates/drupal-9/.github/workflows/twig.yaml b/templates/drupal-9/.github/workflows/twig.yaml new file mode 120000 index 00000000..649f1cd6 --- /dev/null +++ b/templates/drupal-9/.github/workflows/twig.yaml @@ -0,0 +1 @@ +../../../../github/workflows/twig.yaml \ No newline at end of file diff --git a/templates/drupal-9/.markdownlint.jsonc b/templates/drupal-9/.markdownlint.jsonc new file mode 120000 index 00000000..1a3d9afe --- /dev/null +++ b/templates/drupal-9/.markdownlint.jsonc @@ -0,0 +1 @@ +../../config/markdown/.markdownlint.jsonc \ No newline at end of file diff --git a/templates/drupal-9/.markdownlintignore b/templates/drupal-9/.markdownlintignore new file mode 120000 index 00000000..0a61367e --- /dev/null +++ b/templates/drupal-9/.markdownlintignore @@ -0,0 +1 @@ +../../config/markdown/.markdownlintignore \ No newline at end of file diff --git a/templates/drupal-9/.phpcs.xml.dist b/templates/drupal-9/.phpcs.xml.dist new file mode 120000 index 00000000..17295906 --- /dev/null +++ b/templates/drupal-9/.phpcs.xml.dist @@ -0,0 +1 @@ +../../config/drupal/php/.phpcs.xml.dist \ No newline at end of file diff --git a/templates/drupal-9/.twig-cs-fixer.dist.php b/templates/drupal-9/.twig-cs-fixer.dist.php new file mode 120000 index 00000000..7330065d --- /dev/null +++ b/templates/drupal-9/.twig-cs-fixer.dist.php @@ -0,0 +1 @@ +../../config/drupal/twig/.twig-cs-fixer.dist.php \ No newline at end of file diff --git a/templates/symfony-3/.docker/data/README.md b/templates/symfony-3/.docker/data/README.md index 8895d7b1..1dc6b88a 100644 --- a/templates/symfony-3/.docker/data/README.md +++ b/templates/symfony-3/.docker/data/README.md @@ -2,10 +2,13 @@ Please map persistent volumes to this directory on the servers. -If a container needs to persist data between restarts you can map the relevant files in the container to ``docker/data/`. +If a container needs to persist data between restarts you can map the relevant files in the container to +`docker/data/`. ## RabbitMQ example -If you are using RabbitMQ running in a container as a message broker you need to configure a persistent volume for RabbitMQs data directory to avoid losing message on container restarts. + +If you are using RabbitMQ running in a container as a message broker you need to configure a persistent volume for +RabbitMQs data directory to avoid losing message on container restarts. ```yaml # docker-compose.server.override.yml diff --git a/templates/symfony-3/.github/workflows/README.workflows.md b/templates/symfony-3/.github/workflows/README.workflows.md new file mode 100644 index 00000000..114abf39 --- /dev/null +++ b/templates/symfony-3/.github/workflows/README.workflows.md @@ -0,0 +1,19 @@ +# Workflow templates + +The 7 workflow files + +* [changelog.yaml](changelog.yaml) +* [composer.yaml](composer.yaml) +* [javascript.yaml](javascript.yaml) +* [markdown.yaml](markdown.yaml) +* [php.yaml](php.yaml) +* [styles.yaml](styles.yaml) +* [twig.yaml](twig.yaml) + +in this folder are generated from . + +See [Github Actions templates](https://github.com/itk-dev/devops_itkdev-docker/blob/develop/docs/github-actions-templates.md) +for general information on the workflow templates. + +[Create a pull request](https://github.com/itk-dev/devops_itkdev-docker/pulls) to fix any bugs you find +or to add new or missing features. diff --git a/templates/symfony-3/.github/workflows/changelog.yaml b/templates/symfony-3/.github/workflows/changelog.yaml new file mode 120000 index 00000000..5ffe5c3c --- /dev/null +++ b/templates/symfony-3/.github/workflows/changelog.yaml @@ -0,0 +1 @@ +../../../../github/workflows/changelog.yaml \ No newline at end of file diff --git a/templates/symfony-3/.github/workflows/composer.yaml b/templates/symfony-3/.github/workflows/composer.yaml new file mode 120000 index 00000000..23955648 --- /dev/null +++ b/templates/symfony-3/.github/workflows/composer.yaml @@ -0,0 +1 @@ +../../../../github/workflows/composer.yaml \ No newline at end of file diff --git a/templates/symfony-3/.github/workflows/javascript.yaml b/templates/symfony-3/.github/workflows/javascript.yaml new file mode 120000 index 00000000..32f4e115 --- /dev/null +++ b/templates/symfony-3/.github/workflows/javascript.yaml @@ -0,0 +1 @@ +../../../../github/workflows/symfony/javascript.yaml \ No newline at end of file diff --git a/templates/symfony-3/.github/workflows/markdown.yaml b/templates/symfony-3/.github/workflows/markdown.yaml new file mode 120000 index 00000000..ab3eafad --- /dev/null +++ b/templates/symfony-3/.github/workflows/markdown.yaml @@ -0,0 +1 @@ +../../../../github/workflows/markdown.yaml \ No newline at end of file diff --git a/templates/symfony-3/.github/workflows/php.yaml b/templates/symfony-3/.github/workflows/php.yaml new file mode 120000 index 00000000..e5388fe1 --- /dev/null +++ b/templates/symfony-3/.github/workflows/php.yaml @@ -0,0 +1 @@ +../../../../github/workflows/symfony/php.yaml \ No newline at end of file diff --git a/templates/symfony-3/.github/workflows/styles.yaml b/templates/symfony-3/.github/workflows/styles.yaml new file mode 120000 index 00000000..af396b48 --- /dev/null +++ b/templates/symfony-3/.github/workflows/styles.yaml @@ -0,0 +1 @@ +../../../../github/workflows/symfony/styles.yaml \ No newline at end of file diff --git a/templates/symfony-3/.github/workflows/twig.yaml b/templates/symfony-3/.github/workflows/twig.yaml new file mode 120000 index 00000000..649f1cd6 --- /dev/null +++ b/templates/symfony-3/.github/workflows/twig.yaml @@ -0,0 +1 @@ +../../../../github/workflows/twig.yaml \ No newline at end of file diff --git a/templates/symfony-3/.markdownlint.jsonc b/templates/symfony-3/.markdownlint.jsonc new file mode 120000 index 00000000..1a3d9afe --- /dev/null +++ b/templates/symfony-3/.markdownlint.jsonc @@ -0,0 +1 @@ +../../config/markdown/.markdownlint.jsonc \ No newline at end of file diff --git a/templates/symfony-3/.markdownlintignore b/templates/symfony-3/.markdownlintignore new file mode 120000 index 00000000..0a61367e --- /dev/null +++ b/templates/symfony-3/.markdownlintignore @@ -0,0 +1 @@ +../../config/markdown/.markdownlintignore \ No newline at end of file diff --git a/templates/symfony-3/.php-cs-fixer.dist.php b/templates/symfony-3/.php-cs-fixer.dist.php new file mode 120000 index 00000000..4527ff86 --- /dev/null +++ b/templates/symfony-3/.php-cs-fixer.dist.php @@ -0,0 +1 @@ +../../config/symfony/php/.php-cs-fixer.dist.php \ No newline at end of file diff --git a/templates/symfony-3/.twig-cs-fixer.dist.php b/templates/symfony-3/.twig-cs-fixer.dist.php new file mode 120000 index 00000000..bc68997e --- /dev/null +++ b/templates/symfony-3/.twig-cs-fixer.dist.php @@ -0,0 +1 @@ +../../config/symfony/twig/.twig-cs-fixer.dist.php \ No newline at end of file diff --git a/templates/symfony-4/.docker/data/README.md b/templates/symfony-4/.docker/data/README.md index 8895d7b1..1dc6b88a 100644 --- a/templates/symfony-4/.docker/data/README.md +++ b/templates/symfony-4/.docker/data/README.md @@ -2,10 +2,13 @@ Please map persistent volumes to this directory on the servers. -If a container needs to persist data between restarts you can map the relevant files in the container to ``docker/data/`. +If a container needs to persist data between restarts you can map the relevant files in the container to +`docker/data/`. ## RabbitMQ example -If you are using RabbitMQ running in a container as a message broker you need to configure a persistent volume for RabbitMQs data directory to avoid losing message on container restarts. + +If you are using RabbitMQ running in a container as a message broker you need to configure a persistent volume for +RabbitMQs data directory to avoid losing message on container restarts. ```yaml # docker-compose.server.override.yml diff --git a/templates/symfony-4/.github/workflows/README.workflows.md b/templates/symfony-4/.github/workflows/README.workflows.md new file mode 100644 index 00000000..114abf39 --- /dev/null +++ b/templates/symfony-4/.github/workflows/README.workflows.md @@ -0,0 +1,19 @@ +# Workflow templates + +The 7 workflow files + +* [changelog.yaml](changelog.yaml) +* [composer.yaml](composer.yaml) +* [javascript.yaml](javascript.yaml) +* [markdown.yaml](markdown.yaml) +* [php.yaml](php.yaml) +* [styles.yaml](styles.yaml) +* [twig.yaml](twig.yaml) + +in this folder are generated from . + +See [Github Actions templates](https://github.com/itk-dev/devops_itkdev-docker/blob/develop/docs/github-actions-templates.md) +for general information on the workflow templates. + +[Create a pull request](https://github.com/itk-dev/devops_itkdev-docker/pulls) to fix any bugs you find +or to add new or missing features. diff --git a/templates/symfony-4/.github/workflows/changelog.yaml b/templates/symfony-4/.github/workflows/changelog.yaml new file mode 120000 index 00000000..5ffe5c3c --- /dev/null +++ b/templates/symfony-4/.github/workflows/changelog.yaml @@ -0,0 +1 @@ +../../../../github/workflows/changelog.yaml \ No newline at end of file diff --git a/templates/symfony-4/.github/workflows/composer.yaml b/templates/symfony-4/.github/workflows/composer.yaml new file mode 120000 index 00000000..23955648 --- /dev/null +++ b/templates/symfony-4/.github/workflows/composer.yaml @@ -0,0 +1 @@ +../../../../github/workflows/composer.yaml \ No newline at end of file diff --git a/templates/symfony-4/.github/workflows/javascript.yaml b/templates/symfony-4/.github/workflows/javascript.yaml new file mode 120000 index 00000000..32f4e115 --- /dev/null +++ b/templates/symfony-4/.github/workflows/javascript.yaml @@ -0,0 +1 @@ +../../../../github/workflows/symfony/javascript.yaml \ No newline at end of file diff --git a/templates/symfony-4/.github/workflows/markdown.yaml b/templates/symfony-4/.github/workflows/markdown.yaml new file mode 120000 index 00000000..ab3eafad --- /dev/null +++ b/templates/symfony-4/.github/workflows/markdown.yaml @@ -0,0 +1 @@ +../../../../github/workflows/markdown.yaml \ No newline at end of file diff --git a/templates/symfony-4/.github/workflows/php.yaml b/templates/symfony-4/.github/workflows/php.yaml new file mode 120000 index 00000000..e5388fe1 --- /dev/null +++ b/templates/symfony-4/.github/workflows/php.yaml @@ -0,0 +1 @@ +../../../../github/workflows/symfony/php.yaml \ No newline at end of file diff --git a/templates/symfony-4/.github/workflows/styles.yaml b/templates/symfony-4/.github/workflows/styles.yaml new file mode 120000 index 00000000..af396b48 --- /dev/null +++ b/templates/symfony-4/.github/workflows/styles.yaml @@ -0,0 +1 @@ +../../../../github/workflows/symfony/styles.yaml \ No newline at end of file diff --git a/templates/symfony-4/.github/workflows/twig.yaml b/templates/symfony-4/.github/workflows/twig.yaml new file mode 120000 index 00000000..649f1cd6 --- /dev/null +++ b/templates/symfony-4/.github/workflows/twig.yaml @@ -0,0 +1 @@ +../../../../github/workflows/twig.yaml \ No newline at end of file diff --git a/templates/symfony-4/.markdownlint.jsonc b/templates/symfony-4/.markdownlint.jsonc new file mode 120000 index 00000000..1a3d9afe --- /dev/null +++ b/templates/symfony-4/.markdownlint.jsonc @@ -0,0 +1 @@ +../../config/markdown/.markdownlint.jsonc \ No newline at end of file diff --git a/templates/symfony-4/.markdownlintignore b/templates/symfony-4/.markdownlintignore new file mode 120000 index 00000000..0a61367e --- /dev/null +++ b/templates/symfony-4/.markdownlintignore @@ -0,0 +1 @@ +../../config/markdown/.markdownlintignore \ No newline at end of file diff --git a/templates/symfony-4/.php-cs-fixer.dist.php b/templates/symfony-4/.php-cs-fixer.dist.php new file mode 120000 index 00000000..4527ff86 --- /dev/null +++ b/templates/symfony-4/.php-cs-fixer.dist.php @@ -0,0 +1 @@ +../../config/symfony/php/.php-cs-fixer.dist.php \ No newline at end of file diff --git a/templates/symfony-4/.twig-cs-fixer.dist.php b/templates/symfony-4/.twig-cs-fixer.dist.php new file mode 120000 index 00000000..bc68997e --- /dev/null +++ b/templates/symfony-4/.twig-cs-fixer.dist.php @@ -0,0 +1 @@ +../../config/symfony/twig/.twig-cs-fixer.dist.php \ No newline at end of file diff --git a/templates/symfony-6/.docker/data/README.md b/templates/symfony-6/.docker/data/README.md index 8895d7b1..1dc6b88a 100644 --- a/templates/symfony-6/.docker/data/README.md +++ b/templates/symfony-6/.docker/data/README.md @@ -2,10 +2,13 @@ Please map persistent volumes to this directory on the servers. -If a container needs to persist data between restarts you can map the relevant files in the container to ``docker/data/`. +If a container needs to persist data between restarts you can map the relevant files in the container to +`docker/data/`. ## RabbitMQ example -If you are using RabbitMQ running in a container as a message broker you need to configure a persistent volume for RabbitMQs data directory to avoid losing message on container restarts. + +If you are using RabbitMQ running in a container as a message broker you need to configure a persistent volume for +RabbitMQs data directory to avoid losing message on container restarts. ```yaml # docker-compose.server.override.yml diff --git a/templates/symfony-6/.github/workflows/README.workflows.md b/templates/symfony-6/.github/workflows/README.workflows.md new file mode 100644 index 00000000..114abf39 --- /dev/null +++ b/templates/symfony-6/.github/workflows/README.workflows.md @@ -0,0 +1,19 @@ +# Workflow templates + +The 7 workflow files + +* [changelog.yaml](changelog.yaml) +* [composer.yaml](composer.yaml) +* [javascript.yaml](javascript.yaml) +* [markdown.yaml](markdown.yaml) +* [php.yaml](php.yaml) +* [styles.yaml](styles.yaml) +* [twig.yaml](twig.yaml) + +in this folder are generated from . + +See [Github Actions templates](https://github.com/itk-dev/devops_itkdev-docker/blob/develop/docs/github-actions-templates.md) +for general information on the workflow templates. + +[Create a pull request](https://github.com/itk-dev/devops_itkdev-docker/pulls) to fix any bugs you find +or to add new or missing features. diff --git a/templates/symfony-6/.github/workflows/changelog.yaml b/templates/symfony-6/.github/workflows/changelog.yaml new file mode 120000 index 00000000..5ffe5c3c --- /dev/null +++ b/templates/symfony-6/.github/workflows/changelog.yaml @@ -0,0 +1 @@ +../../../../github/workflows/changelog.yaml \ No newline at end of file diff --git a/templates/symfony-6/.github/workflows/composer.yaml b/templates/symfony-6/.github/workflows/composer.yaml new file mode 120000 index 00000000..23955648 --- /dev/null +++ b/templates/symfony-6/.github/workflows/composer.yaml @@ -0,0 +1 @@ +../../../../github/workflows/composer.yaml \ No newline at end of file diff --git a/templates/symfony-6/.github/workflows/javascript.yaml b/templates/symfony-6/.github/workflows/javascript.yaml new file mode 120000 index 00000000..32f4e115 --- /dev/null +++ b/templates/symfony-6/.github/workflows/javascript.yaml @@ -0,0 +1 @@ +../../../../github/workflows/symfony/javascript.yaml \ No newline at end of file diff --git a/templates/symfony-6/.github/workflows/markdown.yaml b/templates/symfony-6/.github/workflows/markdown.yaml new file mode 120000 index 00000000..ab3eafad --- /dev/null +++ b/templates/symfony-6/.github/workflows/markdown.yaml @@ -0,0 +1 @@ +../../../../github/workflows/markdown.yaml \ No newline at end of file diff --git a/templates/symfony-6/.github/workflows/php.yaml b/templates/symfony-6/.github/workflows/php.yaml new file mode 120000 index 00000000..e5388fe1 --- /dev/null +++ b/templates/symfony-6/.github/workflows/php.yaml @@ -0,0 +1 @@ +../../../../github/workflows/symfony/php.yaml \ No newline at end of file diff --git a/templates/symfony-6/.github/workflows/styles.yaml b/templates/symfony-6/.github/workflows/styles.yaml new file mode 120000 index 00000000..af396b48 --- /dev/null +++ b/templates/symfony-6/.github/workflows/styles.yaml @@ -0,0 +1 @@ +../../../../github/workflows/symfony/styles.yaml \ No newline at end of file diff --git a/templates/symfony-6/.github/workflows/twig.yaml b/templates/symfony-6/.github/workflows/twig.yaml new file mode 120000 index 00000000..649f1cd6 --- /dev/null +++ b/templates/symfony-6/.github/workflows/twig.yaml @@ -0,0 +1 @@ +../../../../github/workflows/twig.yaml \ No newline at end of file diff --git a/templates/symfony-6/.markdownlint.jsonc b/templates/symfony-6/.markdownlint.jsonc new file mode 120000 index 00000000..1a3d9afe --- /dev/null +++ b/templates/symfony-6/.markdownlint.jsonc @@ -0,0 +1 @@ +../../config/markdown/.markdownlint.jsonc \ No newline at end of file diff --git a/templates/symfony-6/.markdownlintignore b/templates/symfony-6/.markdownlintignore new file mode 120000 index 00000000..0a61367e --- /dev/null +++ b/templates/symfony-6/.markdownlintignore @@ -0,0 +1 @@ +../../config/markdown/.markdownlintignore \ No newline at end of file diff --git a/templates/symfony-6/.php-cs-fixer.dist.php b/templates/symfony-6/.php-cs-fixer.dist.php new file mode 120000 index 00000000..4527ff86 --- /dev/null +++ b/templates/symfony-6/.php-cs-fixer.dist.php @@ -0,0 +1 @@ +../../config/symfony/php/.php-cs-fixer.dist.php \ No newline at end of file diff --git a/templates/symfony-6/.twig-cs-fixer.dist.php b/templates/symfony-6/.twig-cs-fixer.dist.php new file mode 120000 index 00000000..bc68997e --- /dev/null +++ b/templates/symfony-6/.twig-cs-fixer.dist.php @@ -0,0 +1 @@ +../../config/symfony/twig/.twig-cs-fixer.dist.php \ No newline at end of file