diff --git a/.github/workflows/mess-detector-images.yml b/.github/workflows/mess-detector-images.yml new file mode 100644 index 0000000..632f24a --- /dev/null +++ b/.github/workflows/mess-detector-images.yml @@ -0,0 +1,57 @@ +name: Build Mess Detector Images + +on: + workflow_dispatch: + schedule: + - cron: "0 6 * * 0" # 6 AM Weekly + push: + branches: + - master + paths: + - .github/workflows/mess-detector-images.yml + - 'magento-mess-detector/**' + workflow_run: + workflows: + - Build Integration Images + types: + - completed + branches: + - master + +jobs: + build: + name: "Build and deploy" + + runs-on: "ubuntu-latest" + + strategy: + matrix: + php-version: + - "7.3" + - "7.4" + - "8.1" + - "8.2" + - "8.3" + - "8.4" + - "8.5" + actions-with-docker-image: + - "magento-mess-detector" + + env: + DOCKER_USERNAME: "extdn" + + steps: + - name: "Checkout" + uses: "actions/checkout@v4" + + - name: "Build Docker image" + run: "docker build --tag extdn/${{ matrix.actions-with-docker-image }}-action:${{ matrix.php-version }}-latest ${{ matrix.actions-with-docker-image }}/. -f ${{ matrix.actions-with-docker-image }}/Dockerfile:${{ matrix.php-version }}" + + - name: "Docker Login" + run: "echo ${{ secrets.DOCKER_PASSWORD }} | $(which docker) login --password-stdin --username ${{ env.DOCKER_USERNAME }}" + + - name: "Push Docker image (latest)" + run: "docker push extdn/${{ matrix.actions-with-docker-image }}-action:${{ matrix.php-version }}-latest" + + - name: "Docker Logout" + run: "docker logout" diff --git a/magento-mess-detector/7.3/action.yml b/magento-mess-detector/7.3/action.yml new file mode 100644 index 0000000..ef242a1 --- /dev/null +++ b/magento-mess-detector/7.3/action.yml @@ -0,0 +1,9 @@ +name: 'Magento 2 Mess Detector' +author: 'ExtDN' +description: 'performs php static code analysis with the Magento 2 Mess Detector ruleset' +runs: + using: 'docker' + image: 'docker://extdn/magento-mess-detector-action:7.3-latest' +branding: + icon: 'code' + color: 'green' diff --git a/magento-mess-detector/7.4/action.yml b/magento-mess-detector/7.4/action.yml new file mode 100644 index 0000000..d1e41ca --- /dev/null +++ b/magento-mess-detector/7.4/action.yml @@ -0,0 +1,9 @@ +name: 'Magento 2 Mess Detector' +author: 'ExtDN' +description: 'performs php static code analysis with the Magento 2 Mess Detector ruleset' +runs: + using: 'docker' + image: 'docker://extdn/magento-mess-detector-action:7.4-latest' +branding: + icon: 'code' + color: 'green' diff --git a/magento-mess-detector/8.1/action.yml b/magento-mess-detector/8.1/action.yml new file mode 100644 index 0000000..53e9aae --- /dev/null +++ b/magento-mess-detector/8.1/action.yml @@ -0,0 +1,9 @@ +name: 'Magento 2 Mess Detector' +author: 'ExtDN' +description: 'performs php static code analysis with the Magento 2 Mess Detector ruleset' +runs: + using: 'docker' + image: 'docker://extdn/magento-mess-detector-action:8.1-latest' +branding: + icon: 'code' + color: 'green' diff --git a/magento-mess-detector/8.2/action.yml b/magento-mess-detector/8.2/action.yml new file mode 100644 index 0000000..56c1ffa --- /dev/null +++ b/magento-mess-detector/8.2/action.yml @@ -0,0 +1,9 @@ +name: 'Magento 2 Mess Detector' +author: 'ExtDN' +description: 'performs php static code analysis with the Magento 2 Mess Detector ruleset' +runs: + using: 'docker' + image: 'docker://extdn/magento-mess-detector-action:8.2-latest' +branding: + icon: 'code' + color: 'green' diff --git a/magento-mess-detector/8.3/action.yml b/magento-mess-detector/8.3/action.yml new file mode 100644 index 0000000..7bf197c --- /dev/null +++ b/magento-mess-detector/8.3/action.yml @@ -0,0 +1,9 @@ +name: 'Magento 2 Mess Detector' +author: 'ExtDN' +description: 'performs php static code analysis with the Magento 2 Mess Detector ruleset' +runs: + using: 'docker' + image: 'docker://extdn/magento-mess-detector-action:8.3-latest' +branding: + icon: 'code' + color: 'green' diff --git a/magento-mess-detector/8.4/action.yml b/magento-mess-detector/8.4/action.yml new file mode 100644 index 0000000..577867d --- /dev/null +++ b/magento-mess-detector/8.4/action.yml @@ -0,0 +1,9 @@ +name: 'Magento 2 Mess Detector' +author: 'ExtDN' +description: 'performs php static code analysis with the Magento 2 Mess Detector ruleset' +runs: + using: 'docker' + image: 'docker://extdn/magento-mess-detector-action:8.4-latest' +branding: + icon: 'code' + color: 'green' diff --git a/magento-mess-detector/8.5/action.yml b/magento-mess-detector/8.5/action.yml new file mode 100644 index 0000000..b87fe2b --- /dev/null +++ b/magento-mess-detector/8.5/action.yml @@ -0,0 +1,9 @@ +name: 'Magento 2 Mess Detector' +author: 'ExtDN' +description: 'performs php static code analysis with the Magento 2 Mess Detector ruleset' +runs: + using: 'docker' + image: 'docker://extdn/magento-mess-detector-action:8.5-latest' +branding: + icon: 'code' + color: 'green' diff --git a/magento-mess-detector/Dockerfile:7.3 b/magento-mess-detector/Dockerfile:7.3 new file mode 100644 index 0000000..002b294 --- /dev/null +++ b/magento-mess-detector/Dockerfile:7.3 @@ -0,0 +1,24 @@ +FROM extdn/magento-integration-tests-action:7.3-latest AS builder + +RUN echo memory_limit = -1 >> /usr/local/etc/php/conf.d/custom-memory.ini +RUN composer create-project --repository=https://repo-magento-mirror.fooman.co.nz/ --no-plugins --no-install --no-interaction magento/project-community-edition /var/www/magento2ce "2.4.3-p3" + +WORKDIR "/var/www/magento2ce" +# https://github.com/composer/composer/issues/12623#issuecomment-3551953185 +RUN composer config --unset repositories || true +RUN composer config --unset repo.0 +RUN composer config repo.foomanmirror composer https://repo-magento-mirror.fooman.co.nz/ +RUN composer config --no-plugins allow-plugins true +RUN composer require hoa/regex --no-update +RUN composer config --json audit.ignore '{"PKSA-z3gr-8qht-p93v": "Ignored for CI", "PKSA-rkkf-636k-qjb3": "Ignored for CI", "PKSA-wws7-mr54-jsny": "Ignored for CI", "PKSA-db8d-773v-rd1n": "Ignored for CI"}' +RUN composer install --prefer-dist + +FROM extdn/magento-integration-tests-action:7.3-latest +COPY --from=builder /var/www/magento2ce/ /m2/ +RUN echo memory_limit = -1 >> /usr/local/etc/php/conf.d/custom-memory.ini +COPY phpunit.phpmd.xml /m2/dev/tests/static/phpunit.phpmd.xml +COPY PhpmdRunner.php /m2/dev/tests/static/testsuite/Magento/Test/Php/PhpmdRunner.php +COPY LiveCodePhpmdRunner.php /m2/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/LiveCodePhpmdRunner.php + +COPY entrypoint.sh /entrypoint.sh +ENTRYPOINT ["/entrypoint.sh"] diff --git a/magento-mess-detector/Dockerfile:7.4 b/magento-mess-detector/Dockerfile:7.4 new file mode 100644 index 0000000..295a150 --- /dev/null +++ b/magento-mess-detector/Dockerfile:7.4 @@ -0,0 +1,24 @@ +FROM extdn/magento-integration-tests-action:7.4-latest AS builder + +RUN echo memory_limit = -1 >> /usr/local/etc/php/conf.d/custom-memory.ini +RUN composer create-project --repository=https://repo-magento-mirror.fooman.co.nz/ --no-plugins --no-install --no-interaction magento/project-community-edition /var/www/magento2ce "2.4.5-p14" + +WORKDIR "/var/www/magento2ce" +# https://github.com/composer/composer/issues/12623#issuecomment-3551953185 +RUN composer config --unset repositories || true +RUN composer config --unset repo.0 +RUN composer config repo.foomanmirror composer https://repo-magento-mirror.fooman.co.nz/ +RUN composer config --no-plugins allow-plugins true +RUN composer require hoa/regex --no-update +RUN composer config --json audit.ignore '{"PKSA-z3gr-8qht-p93v": "Ignored for CI", "PKSA-rkkf-636k-qjb3": "Ignored for CI", "PKSA-wws7-mr54-jsny": "Ignored for CI", "PKSA-db8d-773v-rd1n": "Ignored for CI"}' +RUN composer install --prefer-dist + +FROM extdn/magento-integration-tests-action:7.4-latest +COPY --from=builder /var/www/magento2ce/ /m2/ +RUN echo memory_limit = -1 >> /usr/local/etc/php/conf.d/custom-memory.ini +COPY phpunit.phpmd.xml /m2/dev/tests/static/phpunit.phpmd.xml +COPY PhpmdRunner.php /m2/dev/tests/static/testsuite/Magento/Test/Php/PhpmdRunner.php +COPY LiveCodePhpmdRunner.php /m2/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/LiveCodePhpmdRunner.php + +COPY entrypoint.sh /entrypoint.sh +ENTRYPOINT ["/entrypoint.sh"] diff --git a/magento-mess-detector/Dockerfile:8.1 b/magento-mess-detector/Dockerfile:8.1 new file mode 100644 index 0000000..9eacd46 --- /dev/null +++ b/magento-mess-detector/Dockerfile:8.1 @@ -0,0 +1,24 @@ +FROM extdn/magento-integration-tests-action:8.1-latest AS builder + +RUN echo memory_limit = -1 >> /usr/local/etc/php/conf.d/custom-memory.ini +RUN composer create-project --repository=https://repo-magento-mirror.fooman.co.nz/ --no-plugins --no-install --no-interaction magento/project-community-edition /var/www/magento2ce "2.4.6-p13" + +WORKDIR "/var/www/magento2ce" +# https://github.com/composer/composer/issues/12623#issuecomment-3551953185 +RUN composer config --unset repositories || true +RUN composer config --unset repo.0 +RUN composer config repo.foomanmirror composer https://repo-magento-mirror.fooman.co.nz/ +RUN composer config --no-plugins allow-plugins true +RUN composer require hoa/regex --no-update +RUN composer config --json audit.ignore '{"PKSA-z3gr-8qht-p93v": "Ignored for CI", "PKSA-rkkf-636k-qjb3": "Ignored for CI", "PKSA-wws7-mr54-jsny": "Ignored for CI", "PKSA-db8d-773v-rd1n": "Ignored for CI"}' +RUN composer install --prefer-dist + +FROM extdn/magento-integration-tests-action:8.1-latest +COPY --from=builder /var/www/magento2ce/ /m2/ +RUN echo memory_limit = -1 >> /usr/local/etc/php/conf.d/custom-memory.ini +COPY phpunit.phpmd.xml /m2/dev/tests/static/phpunit.phpmd.xml +COPY PhpmdRunner.php /m2/dev/tests/static/testsuite/Magento/Test/Php/PhpmdRunner.php +COPY LiveCodePhpmdRunner.php /m2/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/LiveCodePhpmdRunner.php + +COPY entrypoint.sh /entrypoint.sh +ENTRYPOINT ["/entrypoint.sh"] diff --git a/magento-mess-detector/Dockerfile:8.2 b/magento-mess-detector/Dockerfile:8.2 new file mode 100644 index 0000000..f342e53 --- /dev/null +++ b/magento-mess-detector/Dockerfile:8.2 @@ -0,0 +1,24 @@ +FROM extdn/magento-integration-tests-action:8.2-latest AS builder + +RUN echo memory_limit = -1 >> /usr/local/etc/php/conf.d/custom-memory.ini +RUN composer create-project --repository=https://repo-magento-mirror.fooman.co.nz/ --no-plugins --no-install --no-interaction magento/project-community-edition /var/www/magento2ce "2.4.7-p8" + +WORKDIR "/var/www/magento2ce" +# https://github.com/composer/composer/issues/12623#issuecomment-3551953185 +RUN composer config --unset repositories || true +RUN composer config --unset repo.0 +RUN composer config repo.foomanmirror composer https://repo-magento-mirror.fooman.co.nz/ +RUN composer config --no-plugins allow-plugins true +RUN composer require hoa/regex --no-update +RUN composer config --json audit.ignore '{"PKSA-z3gr-8qht-p93v": "Ignored for CI", "PKSA-rkkf-636k-qjb3": "Ignored for CI", "PKSA-wws7-mr54-jsny": "Ignored for CI", "PKSA-db8d-773v-rd1n": "Ignored for CI"}' +RUN composer install --prefer-dist + +FROM extdn/magento-integration-tests-action:8.2-latest +COPY --from=builder /var/www/magento2ce/ /m2/ +RUN echo memory_limit = -1 >> /usr/local/etc/php/conf.d/custom-memory.ini +COPY phpunit.phpmd.xml /m2/dev/tests/static/phpunit.phpmd.xml +COPY PhpmdRunner.php /m2/dev/tests/static/testsuite/Magento/Test/Php/PhpmdRunner.php +COPY LiveCodePhpmdRunner.php /m2/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/LiveCodePhpmdRunner.php + +COPY entrypoint.sh /entrypoint.sh +ENTRYPOINT ["/entrypoint.sh"] diff --git a/magento-mess-detector/Dockerfile:8.3 b/magento-mess-detector/Dockerfile:8.3 new file mode 100644 index 0000000..2cb6283 --- /dev/null +++ b/magento-mess-detector/Dockerfile:8.3 @@ -0,0 +1,23 @@ +FROM extdn/magento-integration-tests-action:8.3-latest AS builder + +RUN echo memory_limit = -1 >> /usr/local/etc/php/conf.d/custom-memory.ini +RUN composer create-project --repository=https://repo-magento-mirror.fooman.co.nz/ --no-plugins --no-install --no-interaction magento/project-community-edition /var/www/magento2ce "2.4.8-p3" + +WORKDIR "/var/www/magento2ce" +# https://github.com/composer/composer/issues/12623#issuecomment-3551953185 +RUN composer config --unset repositories || true +RUN composer config --unset repo.0 +RUN composer config repo.foomanmirror composer https://repo-magento-mirror.fooman.co.nz/ +RUN composer config --no-plugins allow-plugins true +RUN composer require hoa/regex --no-update +RUN composer install --prefer-dist + +FROM extdn/magento-integration-tests-action:8.3-latest +COPY --from=builder /var/www/magento2ce/ /m2/ +RUN echo memory_limit = -1 >> /usr/local/etc/php/conf.d/custom-memory.ini +COPY phpunit.phpmd.xml /m2/dev/tests/static/phpunit.phpmd.xml +COPY PhpmdRunner.php /m2/dev/tests/static/testsuite/Magento/Test/Php/PhpmdRunner.php +COPY LiveCodePhpmdRunner.php /m2/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/LiveCodePhpmdRunner.php + +COPY entrypoint.sh /entrypoint.sh +ENTRYPOINT ["/entrypoint.sh"] diff --git a/magento-mess-detector/Dockerfile:8.4 b/magento-mess-detector/Dockerfile:8.4 new file mode 100644 index 0000000..4164b92 --- /dev/null +++ b/magento-mess-detector/Dockerfile:8.4 @@ -0,0 +1,23 @@ +FROM extdn/magento-integration-tests-action:8.4-latest AS builder + +RUN echo memory_limit = -1 >> /usr/local/etc/php/conf.d/custom-memory.ini +RUN composer create-project --repository=https://repo-magento-mirror.fooman.co.nz/ --no-plugins --no-install --no-interaction magento/project-community-edition /var/www/magento2ce "2.4.8-p3" + +WORKDIR "/var/www/magento2ce" +# https://github.com/composer/composer/issues/12623#issuecomment-3551953185 +RUN composer config --unset repositories || true +RUN composer config --unset repo.0 +RUN composer config repo.foomanmirror composer https://repo-magento-mirror.fooman.co.nz/ +RUN composer config --no-plugins allow-plugins true +RUN composer require hoa/regex --no-update +RUN composer install --prefer-dist + +FROM extdn/magento-integration-tests-action:8.4-latest +COPY --from=builder /var/www/magento2ce/ /m2/ +RUN echo memory_limit = -1 >> /usr/local/etc/php/conf.d/custom-memory.ini +COPY phpunit.phpmd.xml /m2/dev/tests/static/phpunit.phpmd.xml +COPY PhpmdRunner.php /m2/dev/tests/static/testsuite/Magento/Test/Php/PhpmdRunner.php +COPY LiveCodePhpmdRunner.php /m2/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/LiveCodePhpmdRunner.php + +COPY entrypoint.sh /entrypoint.sh +ENTRYPOINT ["/entrypoint.sh"] diff --git a/magento-mess-detector/Dockerfile:8.5 b/magento-mess-detector/Dockerfile:8.5 new file mode 100644 index 0000000..52f10b5 --- /dev/null +++ b/magento-mess-detector/Dockerfile:8.5 @@ -0,0 +1,23 @@ +FROM extdn/magento-integration-tests-action:8.5-latest AS builder + +RUN echo memory_limit = -1 >> /usr/local/etc/php/conf.d/custom-memory.ini +RUN composer create-project --repository=https://repo-magento-mirror.fooman.co.nz/ --no-plugins --no-install --no-interaction magento/project-community-edition /var/www/magento2ce "2.4.9" + +WORKDIR "/var/www/magento2ce" +# https://github.com/composer/composer/issues/12623#issuecomment-3551953185 +RUN composer config --unset repositories || true +RUN composer config --unset repo.0 +RUN composer config repo.foomanmirror composer https://repo-magento-mirror.fooman.co.nz/ +RUN composer config --no-plugins allow-plugins true +RUN composer require hoa/regex --no-update +RUN composer install --prefer-dist + +FROM extdn/magento-integration-tests-action:8.5-latest +COPY --from=builder /var/www/magento2ce/ /m2/ +RUN echo memory_limit = -1 >> /usr/local/etc/php/conf.d/custom-memory.ini +COPY phpunit.phpmd.xml /m2/dev/tests/static/phpunit.phpmd.xml +COPY PhpmdRunner.php /m2/dev/tests/static/testsuite/Magento/Test/Php/PhpmdRunner.php +COPY LiveCodePhpmdRunner.php /m2/dev/tests/static/framework/Magento/TestFramework/CodingStandard/Tool/LiveCodePhpmdRunner.php + +COPY entrypoint.sh /entrypoint.sh +ENTRYPOINT ["/entrypoint.sh"]