From 3b05516c9e1d94b69870e4a749da6d7807f3ed1f Mon Sep 17 00:00:00 2001 From: Michael Waltonen Date: Mon, 22 Dec 2025 15:10:48 -0600 Subject: [PATCH 01/12] updated docker and project names to match add-on template --- commands/{backstop => backstopjs}/backstop | 0 ...-compose.backstop.yaml => docker-compose.backstopjs.yaml | 4 ++-- install.yaml | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) rename commands/{backstop => backstopjs}/backstop (100%) rename docker-compose.backstop.yaml => docker-compose.backstopjs.yaml (94%) diff --git a/commands/backstop/backstop b/commands/backstopjs/backstop similarity index 100% rename from commands/backstop/backstop rename to commands/backstopjs/backstop diff --git a/docker-compose.backstop.yaml b/docker-compose.backstopjs.yaml similarity index 94% rename from docker-compose.backstop.yaml rename to docker-compose.backstopjs.yaml index 39dfafa..675a159 100644 --- a/docker-compose.backstop.yaml +++ b/docker-compose.backstopjs.yaml @@ -3,10 +3,10 @@ services: # This is the service name used when running ddev commands accepting the # --service flag. - backstop: + backstopjs: # This is the name of the container. It is recommended to follow the same # name convention used in the main docker-compose.yml file. - container_name: ddev-${DDEV_SITENAME}-backstop + container_name: ddev-${DDEV_SITENAME}-backstopjs build: context: './backstopBuild' args: diff --git a/install.yaml b/install.yaml index b5f67af..b36b6d7 100644 --- a/install.yaml +++ b/install.yaml @@ -1,4 +1,4 @@ -name: ddev-backstopjs +name: backstopjs pre_install_actions: - test -d ${DDEV_APPROOT}/tests/backstop || mkdir -p ${DDEV_APPROOT}/tests/backstop @@ -11,9 +11,9 @@ pre_install_actions: # if it hasn't been modified by the user. # DDEV environment variables can be interpolated into these filenames project_files: -- docker-compose.backstop.yaml +- docker-compose.backstopjs.yaml - backstopBuild/ -- commands/backstop/backstop +- commands/backstopjs/backstop - commands/host/backstop-results post_install_actions: From b65e005d8d312342d4bfd0db87fa6265f89713fb Mon Sep 17 00:00:00 2001 From: Michael Waltonen Date: Mon, 22 Dec 2025 15:21:36 -0600 Subject: [PATCH 02/12] renamed backstopBuild to match template --- {backstopBuild => backstopjs-build}/Dockerfile | 0 {backstopBuild => backstopjs-build}/entrypoint.sh | 0 docker-compose.backstopjs.yaml | 2 +- install.yaml | 2 +- 4 files changed, 2 insertions(+), 2 deletions(-) rename {backstopBuild => backstopjs-build}/Dockerfile (100%) rename {backstopBuild => backstopjs-build}/entrypoint.sh (100%) diff --git a/backstopBuild/Dockerfile b/backstopjs-build/Dockerfile similarity index 100% rename from backstopBuild/Dockerfile rename to backstopjs-build/Dockerfile diff --git a/backstopBuild/entrypoint.sh b/backstopjs-build/entrypoint.sh similarity index 100% rename from backstopBuild/entrypoint.sh rename to backstopjs-build/entrypoint.sh diff --git a/docker-compose.backstopjs.yaml b/docker-compose.backstopjs.yaml index 675a159..e745d0b 100644 --- a/docker-compose.backstopjs.yaml +++ b/docker-compose.backstopjs.yaml @@ -8,7 +8,7 @@ services: # name convention used in the main docker-compose.yml file. container_name: ddev-${DDEV_SITENAME}-backstopjs build: - context: './backstopBuild' + context: './backstopjs-build' args: BASE_IMAGE: backstopjs/backstopjs:6.3.25 username: $USER diff --git a/install.yaml b/install.yaml index b36b6d7..38a9aaa 100644 --- a/install.yaml +++ b/install.yaml @@ -12,7 +12,7 @@ pre_install_actions: # DDEV environment variables can be interpolated into these filenames project_files: - docker-compose.backstopjs.yaml -- backstopBuild/ +- backstopjs-build/ - commands/backstopjs/backstop - commands/host/backstop-results From 90548ee78a41332139545e2a8fe24becb49ab04b Mon Sep 17 00:00:00 2001 From: Michael Waltonen Date: Mon, 22 Dec 2025 15:30:23 -0600 Subject: [PATCH 03/12] minor shellcheck updates --- .shellcheckrc | 1 + commands/backstopjs/backstop | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 .shellcheckrc diff --git a/.shellcheckrc b/.shellcheckrc new file mode 100644 index 0000000..8226afb --- /dev/null +++ b/.shellcheckrc @@ -0,0 +1 @@ +external-sources=true diff --git a/commands/backstopjs/backstop b/commands/backstopjs/backstop index a6beb32..4c39de3 100755 --- a/commands/backstopjs/backstop +++ b/commands/backstopjs/backstop @@ -7,7 +7,7 @@ ## Example: "ddev backstop version" ## ExecRaw: true -if [ "$1" == "openReport" -o "$1" == "remote" ]; then +if [ "$1" == "openReport" ] || [ "$1" == "remote" ]; then echo "This does not work for backstop in ddev. See ddev backstop-results command." exit 1 fi From 4cd8f328b83fd4bc5f7d3abcd629eaea9b4a3782 Mon Sep 17 00:00:00 2001 From: Michael Waltonen Date: Mon, 22 Dec 2025 15:33:28 -0600 Subject: [PATCH 04/12] updated file paths --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e5f2bc9..aa23059 100644 --- a/README.md +++ b/README.md @@ -81,8 +81,8 @@ open tests/backstop/backstop_data/_mytestproject_/html_report/index.html ## Changes to the original docker image -The backstopjs docker image is extended with some functions using a custom docker build, see [Dockerfile](backstopBuild/Dockerfile) -and uses a custom [entrypoint](backstopBuild/entrypoint.sh). +The backstopjs docker image is extended with some functions using a custom docker build, see [Dockerfile](backstopjs-build/Dockerfile) +and uses a custom [entrypoint](backstopjs-build/entrypoint.sh). In the Dockerfile the following is added/changed: @@ -118,7 +118,7 @@ See: [ddev FAQ: Can different projects communicate with each other?](https://dde Per default the backstop directory containing backstop config etc. is expected in your project directory (besides the .ddev folder) in the directory *tests/backstop*. -If you want to change that edit the file [docker-compose.backstop.yaml](docker-compose.backstop.yaml) and +If you want to change that edit the file [docker-compose.backstopjs.yaml](docker-compose.backstopjs.yaml) and change the line in volumes to the path you want to use, move the files to the new directory and restart ddev. Make sure to remove the #ddev-generated line from the file to prevent ddev from making changes to it. From cfc5e9db9c47f9cf742ae81a5852fbcb21dfdb74 Mon Sep 17 00:00:00 2001 From: Michael Waltonen Date: Mon, 22 Dec 2025 15:53:52 -0600 Subject: [PATCH 05/12] graceful uninstall of previous files/dirs path --- install.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/install.yaml b/install.yaml index 38a9aaa..5bdf3ea 100644 --- a/install.yaml +++ b/install.yaml @@ -1,6 +1,7 @@ name: backstopjs pre_install_actions: + - test -d .ddev/backstopBuild && ddev add-on remove ddev-backstopjs || exit 0 - test -d ${DDEV_APPROOT}/tests/backstop || mkdir -p ${DDEV_APPROOT}/tests/backstop - test -f "${DDEV_APPROOT}/tests/backstop/.gitignore" || printf "## ddev-generated\n**/bitmaps_test\n**/html_report\n" > ${DDEV_APPROOT}/tests/backstop/.gitignore - grep -q "## ddev-generated" ${DDEV_APPROOT}/tests/backstop/.gitignore && printf "## ddev-generated\n**/bitmaps_test\n**/html_report\n" > ${DDEV_APPROOT}/tests/backstop/.gitignore || true From 7df1aba5c5548649734b0d1ae55ea5729fbb4731 Mon Sep 17 00:00:00 2001 From: Michael Waltonen Date: Mon, 22 Dec 2025 15:59:30 -0600 Subject: [PATCH 06/12] updated to match template --- .github/workflows/tests.yml | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a884ede..c7e448c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,22 +1,30 @@ name: tests on: pull_request: + paths-ignore: + - "**.md" push: branches: [ main, develop ] + paths-ignore: + - "**.md" schedule: - - cron: '25 08 * * *' + - cron: '25 08 * * *' workflow_dispatch: inputs: debug_enabled: - description: 'Debug with tmate set "debug_enabled"' + type: boolean + description: Debug with tmate required: false - default: "false" + default: false + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true -# Required permissions for keep-alive, used by ddev/github-action-add-on-test permissions: - actions: write + contents: read jobs: tests: @@ -28,10 +36,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: ddev/github-action-add-on-test@v2 - with: - ddev_version: ${{ matrix.ddev_version }} - token: ${{ secrets.GITHUB_TOKEN }} - debug_enabled: ${{ github.event.inputs.debug_enabled }} - addon_repository: ${{ env.GITHUB_REPOSITORY }} - addon_ref: ${{ env.GITHUB_REF }} + - uses: ddev/github-action-add-on-test@v2 + with: + ddev_version: ${{ matrix.ddev_version }} + token: ${{ secrets.GITHUB_TOKEN }} + debug_enabled: ${{ github.event.inputs.debug_enabled }} + addon_repository: ${{ env.GITHUB_REPOSITORY }} + addon_ref: ${{ env.GITHUB_REF }} \ No newline at end of file From dfdea6c7729a5e00c79329fc66f176cbe1a093ec Mon Sep 17 00:00:00 2001 From: Michael Waltonen Date: Mon, 22 Dec 2025 16:31:49 -0600 Subject: [PATCH 07/12] static test dir to .env dynamic dir --- .env.backstopjs | 3 +++ commands/host/backstop-results | 9 ++++++--- docker-compose.backstopjs.yaml | 2 +- install.yaml | 9 +++++---- 4 files changed, 15 insertions(+), 8 deletions(-) create mode 100644 .env.backstopjs diff --git a/.env.backstopjs b/.env.backstopjs new file mode 100644 index 0000000..de537ec --- /dev/null +++ b/.env.backstopjs @@ -0,0 +1,3 @@ +#ddev-generated + +BACKSTOPJS_TESTDIR="tests/backstop" \ No newline at end of file diff --git a/commands/host/backstop-results b/commands/host/backstop-results index d12e96e..66a3588 100755 --- a/commands/host/backstop-results +++ b/commands/host/backstop-results @@ -6,14 +6,17 @@ ## Usage: backstop-results ## Example: "ddev backstop-results" +# shellcheck source=../../.env.backstopjs +source .ddev/.env.backstopjs + case $OSTYPE in linux-gnu) - xdg-open ${DDEV_APPROOT}/tests/backstop/backstop_data/html_report/index.html + xdg-open "${DDEV_APPROOT}/${BACKSTOPJS_TESTDIR}/backstop_data/html_report/index.html" ;; "darwin"*) - open ${DDEV_APPROOT}/tests/backstop/backstop_data/html_report/index.html + open "${DDEV_APPROOT}/${BACKSTOPJS_TESTDIR}/backstop_data/html_report/index.html" ;; "win*"* | "msys"*) - start ${DDEV_APPROOT}/tests/backstop/backstop_data/html_report/index.html + start "${DDEV_APPROOT}/${BACKSTOPJS_TESTDIR}/backstop_data/html_report/index.html" ;; esac diff --git a/docker-compose.backstopjs.yaml b/docker-compose.backstopjs.yaml index e745d0b..ce4c511 100644 --- a/docker-compose.backstopjs.yaml +++ b/docker-compose.backstopjs.yaml @@ -21,7 +21,7 @@ services: init: true entrypoint: [ /entrypoint.sh ] volumes: - - ../tests/backstop:/src + - ../${BACKSTOPJS_TESTDIR}:/src - .:/mnt/ddev_config:ro shm_size: 1gb environment: diff --git a/install.yaml b/install.yaml index 5bdf3ea..72aa9e7 100644 --- a/install.yaml +++ b/install.yaml @@ -2,9 +2,10 @@ name: backstopjs pre_install_actions: - test -d .ddev/backstopBuild && ddev add-on remove ddev-backstopjs || exit 0 - - test -d ${DDEV_APPROOT}/tests/backstop || mkdir -p ${DDEV_APPROOT}/tests/backstop - - test -f "${DDEV_APPROOT}/tests/backstop/.gitignore" || printf "## ddev-generated\n**/bitmaps_test\n**/html_report\n" > ${DDEV_APPROOT}/tests/backstop/.gitignore - - grep -q "## ddev-generated" ${DDEV_APPROOT}/tests/backstop/.gitignore && printf "## ddev-generated\n**/bitmaps_test\n**/html_report\n" > ${DDEV_APPROOT}/tests/backstop/.gitignore || true + - test -f ${DDEV_APPROOT}/.ddev/.env.backstopjs || ddev dotenv set ${DDEV_APPROOT}/.ddev/.env.backstopjs --backstopjs-testdir tests/backstop + - test -d ${DDEV_APPROOT}/${BACKSTOPJS_TESTDIR} || mkdir -p ${DDEV_APPROOT}/${BACKSTOPJS_TESTDIR} + - test -f "${DDEV_APPROOT}/${BACKSTOPJS_TESTDIR}/.gitignore" || printf "## ddev-generated\n**/bitmaps_test\n**/html_report\n" > ${DDEV_APPROOT}/${BACKSTOPJS_TESTDIR}/.gitignore + - grep -q "## ddev-generated" ${DDEV_APPROOT}/${BACKSTOPJS_TESTDIR}/.gitignore && printf "## ddev-generated\n**/bitmaps_test\n**/html_report\n" > ${DDEV_APPROOT}/${BACKSTOPJS_TESTDIR}/.gitignore || true # list of files and directories listed that are copied into project .ddev directory @@ -25,4 +26,4 @@ post_install_actions: # and prevent add-on from being installed if it doesn't validate. # See https://github.com/Masterminds/semver#checking-version-constraints for constraint rules. # Available with DDEV v1.23.4+, and works only for DDEV v1.23.4+ binaries -ddev_version_constraint: '>= v1.24.3' +ddev_version_constraint: '>= v1.24.5' From ff77cc6c1347d7fe8504925109d3f1503bb3871c Mon Sep 17 00:00:00 2001 From: Michael Waltonen Date: Tue, 23 Dec 2025 13:09:39 -0600 Subject: [PATCH 08/12] added file perms healthcheck --- .env.backstopjs | 3 ++- backstopjs-build/Dockerfile | 4 ++++ backstopjs-build/healthcheck.sh | 24 ++++++++++++++++++++++++ docker-compose.backstopjs.yaml | 7 ++++++- 4 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 backstopjs-build/healthcheck.sh diff --git a/.env.backstopjs b/.env.backstopjs index de537ec..7b23487 100644 --- a/.env.backstopjs +++ b/.env.backstopjs @@ -1,3 +1,4 @@ #ddev-generated -BACKSTOPJS_TESTDIR="tests/backstop" \ No newline at end of file +BACKSTOPJS_TESTDIR="tests/backstop" +BACKSTOPJS_ALLOW_PERM_REPAIR=true \ No newline at end of file diff --git a/backstopjs-build/Dockerfile b/backstopjs-build/Dockerfile index 5b89cc3..1569e0e 100644 --- a/backstopjs-build/Dockerfile +++ b/backstopjs-build/Dockerfile @@ -6,6 +6,10 @@ FROM $BASE_IMAGE COPY ./entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh +# Add healthcheck script +COPY ./healthcheck.sh /healthcheck.sh +RUN chmod +x /healthcheck.sh + # delete the default 'node' user with uid 1000 and add current ddev user ARG username ARG uid diff --git a/backstopjs-build/healthcheck.sh b/backstopjs-build/healthcheck.sh new file mode 100644 index 0000000..79cfecb --- /dev/null +++ b/backstopjs-build/healthcheck.sh @@ -0,0 +1,24 @@ +#!/bin/bash +#ddev-generated + +VOLUME_OWNER="$(stat -c '%U' /src)" +VOLUME_GROUP="$(stat -c '%G' /src)" +DDEV_USER="$(id -un)" +DDEV_GROUP="$(id -gn)" + +# Confirm /src owner and group matches container user. Attempt to fix, if BACKSTOPJS_ALLOW_PERM_REPAIR is true. +# This is to handle cases where BACKSTOPJS_TESTDIR is changed to a directory that does not exist and docker auto-creates it. +if ! [ "$VOLUME_OWNER" = "$DDEV_USER" ] || ! [ "$VOLUME_GROUP" = "$DDEV_GROUP" ]; then + if ${BACKSTOPJS_ALLOW_PERM_REPAIR:-false}; then + if ! sudo chown -R "$DDEV_USER":"$DDEV_GROUP" /src &> /dev/null; then + printf "Automated repair failed. %s owner/group is %s/%s, should be %s/%s. On host, run 'sudo chown -R %s:%s %s'." "$BACKSTOPJS_TESTDIR" "$VOLUME_OWNER" "$VOLUME_GROUP" "$DDEV_USER" "$DDEV_GROUP" "$DDEV_USER" "$DDEV_GROUP" "$BACKSTOPJS_TESTDIR" + exit 1 + fi + else + printf "%s owner/group is %s/%s, should be %s/%s. On host, run 'sudo chown -R %s:%s %s'." "$BACKSTOPJS_TESTDIR" "$VOLUME_OWNER" "$VOLUME_GROUP" "$DDEV_USER" "$DDEV_GROUP" "$DDEV_USER" "$DDEV_GROUP" "$BACKSTOPJS_TESTDIR" + exit 1 + fi +fi + +printf "container healthy" +exit 0 \ No newline at end of file diff --git a/docker-compose.backstopjs.yaml b/docker-compose.backstopjs.yaml index ce4c511..c5b6847 100644 --- a/docker-compose.backstopjs.yaml +++ b/docker-compose.backstopjs.yaml @@ -19,7 +19,7 @@ services: # Add init to reap Chrome processes, as noted at # https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md#running-puppeteer-in-docker init: true - entrypoint: [ /entrypoint.sh ] + entrypoint: [/entrypoint.sh] volumes: - ../${BACKSTOPJS_TESTDIR}:/src - .:/mnt/ddev_config:ro @@ -33,3 +33,8 @@ services: networks: ddev_default: null default: null + healthcheck: + test: ["CMD", "/healthcheck.sh"] + retries: 3 + start_period: 5s + start_interval: 1s From 1faceb71b04ed0d213eb472ccf300a2929115c27 Mon Sep 17 00:00:00 2001 From: Michael Waltonen Date: Tue, 23 Dec 2025 14:41:19 -0600 Subject: [PATCH 09/12] updated test dir change documentation --- README.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index aa23059..14fee51 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,7 @@ and uses a custom [entrypoint](backstopjs-build/entrypoint.sh). In the Dockerfile the following is added/changed: - add the custom entrypoint.sh to the image +- add custom healthcheck.sh to the image for addressing possible permissions issues when changing the test directory - delete the default 'node' user with uid 1000 and add current ddev user - install the [minimist](https://www.npmjs.com/package/minimist) npm package globally. This is not needed by default but very handy to parse command line args for more complex custom backstopjs configs. @@ -96,6 +97,10 @@ The entrypoint is responsible for: - add /etc/hosts entries for all hosts configured in the ddev web container automatically - add sleep command to keep the container running +The healthcheck is responsible for: +- confirming file ownership for /src is set to the container user +- optionally, repairing ownership issues (enabled by default) + ## Advanced ### How to add additional hostnames? @@ -115,10 +120,11 @@ See: [ddev FAQ: Can different projects communicate with each other?](https://dde ### Change backstop tests directory -Per default the backstop directory containing backstop config etc. is expected in your project directory (besides the -.ddev folder) in the directory *tests/backstop*. +The test directory is now managed via custom [environment variables](https://docs.ddev.com/en/stable/users/extend/customization-extendibility/#environment-variables-for-containers-and-services) only visible to host and container that can be saved into your project and shared with other developers. -If you want to change that edit the file [docker-compose.backstopjs.yaml](docker-compose.backstopjs.yaml) and -change the line in volumes to the path you want to use, move the files to the new directory and restart ddev. +To change from the default *tests/backstop* path, you can update the `BACKSTOPJS_TESTDIR` variable by running: +```shell +ddev dotenv set .ddev/.env.backstopjs --backstopjs-testdir +``` -Make sure to remove the #ddev-generated line from the file to prevent ddev from making changes to it. +Before you start/restart ddev, you should confirm the new directory exists, or Docker will automatically create with the owner set to root. [`healthcheck.sh`](backstopjs-build/healthcheck.sh) will detect this on container start and attempt to update the owner/group to match the rest of ddev; however, it can only update the files/directories the container can see. If this behavior is problematic, you can set `BACKSTOPJS_ALLOW_PERM_REPAIR` to `false` and it will only notify you. From cf13191c8b86d1a21d61a2729b9347f448e6de25 Mon Sep 17 00:00:00 2001 From: Michael Waltonen Date: Tue, 23 Dec 2025 15:01:40 -0600 Subject: [PATCH 10/12] Switch BACKSTOPJS_ALLOW_PERM_REPAIR to form that works with ddev dotenv --- .env.backstopjs | 2 +- backstopjs-build/healthcheck.sh | 2 +- install.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.env.backstopjs b/.env.backstopjs index 7b23487..e1a8115 100644 --- a/.env.backstopjs +++ b/.env.backstopjs @@ -1,4 +1,4 @@ #ddev-generated BACKSTOPJS_TESTDIR="tests/backstop" -BACKSTOPJS_ALLOW_PERM_REPAIR=true \ No newline at end of file +BACKSTOPJS_ALLOW_PERM_REPAIR="true" \ No newline at end of file diff --git a/backstopjs-build/healthcheck.sh b/backstopjs-build/healthcheck.sh index 79cfecb..ac0d39d 100644 --- a/backstopjs-build/healthcheck.sh +++ b/backstopjs-build/healthcheck.sh @@ -9,7 +9,7 @@ DDEV_GROUP="$(id -gn)" # Confirm /src owner and group matches container user. Attempt to fix, if BACKSTOPJS_ALLOW_PERM_REPAIR is true. # This is to handle cases where BACKSTOPJS_TESTDIR is changed to a directory that does not exist and docker auto-creates it. if ! [ "$VOLUME_OWNER" = "$DDEV_USER" ] || ! [ "$VOLUME_GROUP" = "$DDEV_GROUP" ]; then - if ${BACKSTOPJS_ALLOW_PERM_REPAIR:-false}; then + if [ "${BACKSTOPJS_ALLOW_PERM_REPAIR:-"false"}" = "true" ]; then if ! sudo chown -R "$DDEV_USER":"$DDEV_GROUP" /src &> /dev/null; then printf "Automated repair failed. %s owner/group is %s/%s, should be %s/%s. On host, run 'sudo chown -R %s:%s %s'." "$BACKSTOPJS_TESTDIR" "$VOLUME_OWNER" "$VOLUME_GROUP" "$DDEV_USER" "$DDEV_GROUP" "$DDEV_USER" "$DDEV_GROUP" "$BACKSTOPJS_TESTDIR" exit 1 diff --git a/install.yaml b/install.yaml index 72aa9e7..42492b6 100644 --- a/install.yaml +++ b/install.yaml @@ -2,7 +2,7 @@ name: backstopjs pre_install_actions: - test -d .ddev/backstopBuild && ddev add-on remove ddev-backstopjs || exit 0 - - test -f ${DDEV_APPROOT}/.ddev/.env.backstopjs || ddev dotenv set ${DDEV_APPROOT}/.ddev/.env.backstopjs --backstopjs-testdir tests/backstop + - test -f ${DDEV_APPROOT}/.ddev/.env.backstopjs || ddev dotenv set ${DDEV_APPROOT}/.ddev/.env.backstopjs --backstopjs-testdir tests/backstop --backstopjs-allow-perm-repair true - test -d ${DDEV_APPROOT}/${BACKSTOPJS_TESTDIR} || mkdir -p ${DDEV_APPROOT}/${BACKSTOPJS_TESTDIR} - test -f "${DDEV_APPROOT}/${BACKSTOPJS_TESTDIR}/.gitignore" || printf "## ddev-generated\n**/bitmaps_test\n**/html_report\n" > ${DDEV_APPROOT}/${BACKSTOPJS_TESTDIR}/.gitignore - grep -q "## ddev-generated" ${DDEV_APPROOT}/${BACKSTOPJS_TESTDIR}/.gitignore && printf "## ddev-generated\n**/bitmaps_test\n**/html_report\n" > ${DDEV_APPROOT}/${BACKSTOPJS_TESTDIR}/.gitignore || true From 2b9c4094cb75f7c5802018dc90cbbf8949f29946 Mon Sep 17 00:00:00 2001 From: Michael Waltonen Date: Tue, 23 Dec 2025 15:04:22 -0600 Subject: [PATCH 11/12] cleanup empty commands dir on remove --- install.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.yaml b/install.yaml index 42492b6..5b36f93 100644 --- a/install.yaml +++ b/install.yaml @@ -15,7 +15,7 @@ pre_install_actions: project_files: - docker-compose.backstopjs.yaml - backstopjs-build/ -- commands/backstopjs/backstop +- commands/backstopjs/ - commands/host/backstop-results post_install_actions: From 8613df22bb196227eed01a6b59a5cd4ac890fc5c Mon Sep 17 00:00:00 2001 From: Michael Waltonen Date: Tue, 23 Dec 2025 15:07:38 -0600 Subject: [PATCH 12/12] added to match template --- .gitattributes | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..1c52fb9 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,4 @@ +# Exclude files from releases/tarballs +tests/ export-ignore +.github/ export-ignore +.gitattributes export-ignore \ No newline at end of file