From e84326557592894b67f57f90091146e84edb1711 Mon Sep 17 00:00:00 2001 From: cytopia Date: Thu, 10 Jan 2019 12:26:06 +0100 Subject: [PATCH 1/4] Fix curl downloads --- Dockerfiles/work/Dockerfile-5.2 | 4 ++-- Dockerfiles/work/Dockerfile-5.3 | 4 ++-- Dockerfiles/work/Dockerfile-5.4 | 4 ++-- Dockerfiles/work/Dockerfile-5.5 | 4 ++-- Dockerfiles/work/Dockerfile-5.6 | 4 ++-- Dockerfiles/work/Dockerfile-7.0 | 4 ++-- Dockerfiles/work/Dockerfile-7.1 | 4 ++-- Dockerfiles/work/Dockerfile-7.2 | 4 ++-- Dockerfiles/work/Dockerfile-7.3 | 4 ++-- Dockerfiles/work/Dockerfile-7.4 | 4 ++-- build/ansible/group_vars/all.yml | 12 ++++++------ 11 files changed, 26 insertions(+), 26 deletions(-) diff --git a/Dockerfiles/work/Dockerfile-5.2 b/Dockerfiles/work/Dockerfile-5.2 index 1c356f3c..941ccc17 100644 --- a/Dockerfiles/work/Dockerfile-5.2 +++ b/Dockerfiles/work/Dockerfile-5.2 @@ -201,11 +201,11 @@ RUN set -x \ && rm -rf /usr/local/src/mysqldump-secure \ \ # phpcs - && curl -qL https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ + && curl -sS -L https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ && chmod +x /usr/local/bin/phpcs \ \ # phpcbf - && curl -qL https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ + && curl -sS -L https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && chmod +x /usr/local/bin/phpcbf \ \ # pm2 diff --git a/Dockerfiles/work/Dockerfile-5.3 b/Dockerfiles/work/Dockerfile-5.3 index a63b7c8c..b287f442 100644 --- a/Dockerfiles/work/Dockerfile-5.3 +++ b/Dockerfiles/work/Dockerfile-5.3 @@ -231,11 +231,11 @@ RUN set -x \ && rm -rf /usr/local/src/phalcon-devtools/.git \ \ # phpcs - && curl -qL https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ + && curl -sS -L https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ && chmod +x /usr/local/bin/phpcs \ \ # phpcbf - && curl -qL https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ + && curl -sS -L https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && chmod +x /usr/local/bin/phpcbf \ \ # phpunit diff --git a/Dockerfiles/work/Dockerfile-5.4 b/Dockerfiles/work/Dockerfile-5.4 index aae4d749..bc4f0edd 100644 --- a/Dockerfiles/work/Dockerfile-5.4 +++ b/Dockerfiles/work/Dockerfile-5.4 @@ -257,11 +257,11 @@ RUN set -x \ && rm -rf /usr/local/src/phalcon-devtools/.git \ \ # phpcs - && curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ + && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ && chmod +x /usr/local/bin/phpcs \ \ # phpcbf - && curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ + && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && chmod +x /usr/local/bin/phpcbf \ \ # phpunit diff --git a/Dockerfiles/work/Dockerfile-5.5 b/Dockerfiles/work/Dockerfile-5.5 index 65cbb9e7..b9d1f0f7 100644 --- a/Dockerfiles/work/Dockerfile-5.5 +++ b/Dockerfiles/work/Dockerfile-5.5 @@ -264,11 +264,11 @@ RUN set -x \ && rm -rf /usr/local/src/phalcon-devtools/.git \ \ # phpcs - && curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ + && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ && chmod +x /usr/local/bin/phpcs \ \ # phpcbf - && curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ + && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && chmod +x /usr/local/bin/phpcbf \ \ # phpunit diff --git a/Dockerfiles/work/Dockerfile-5.6 b/Dockerfiles/work/Dockerfile-5.6 index 089ff608..0caccdb5 100644 --- a/Dockerfiles/work/Dockerfile-5.6 +++ b/Dockerfiles/work/Dockerfile-5.6 @@ -277,11 +277,11 @@ RUN set -x \ && rm -rf /usr/local/src/phalcon-devtools/.git \ \ # phpcs - && curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ + && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ && chmod +x /usr/local/bin/phpcs \ \ # phpcbf - && curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ + && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && chmod +x /usr/local/bin/phpcbf \ \ # phpunit diff --git a/Dockerfiles/work/Dockerfile-7.0 b/Dockerfiles/work/Dockerfile-7.0 index 281095ef..f207a3d6 100644 --- a/Dockerfiles/work/Dockerfile-7.0 +++ b/Dockerfiles/work/Dockerfile-7.0 @@ -277,11 +277,11 @@ RUN set -x \ && rm -rf /usr/local/src/phalcon-devtools/.git \ \ # phpcs - && curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ + && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ && chmod +x /usr/local/bin/phpcs \ \ # phpcbf - && curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ + && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && chmod +x /usr/local/bin/phpcbf \ \ # phpunit diff --git a/Dockerfiles/work/Dockerfile-7.1 b/Dockerfiles/work/Dockerfile-7.1 index 2f6c4a25..4a4cd55d 100644 --- a/Dockerfiles/work/Dockerfile-7.1 +++ b/Dockerfiles/work/Dockerfile-7.1 @@ -277,11 +277,11 @@ RUN set -x \ && rm -rf /usr/local/src/phalcon-devtools/.git \ \ # phpcs - && curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ + && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ && chmod +x /usr/local/bin/phpcs \ \ # phpcbf - && curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ + && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && chmod +x /usr/local/bin/phpcbf \ \ # phpunit diff --git a/Dockerfiles/work/Dockerfile-7.2 b/Dockerfiles/work/Dockerfile-7.2 index ceab6016..1e179008 100644 --- a/Dockerfiles/work/Dockerfile-7.2 +++ b/Dockerfiles/work/Dockerfile-7.2 @@ -277,11 +277,11 @@ RUN set -x \ && rm -rf /usr/local/src/phalcon-devtools/.git \ \ # phpcs - && curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ + && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ && chmod +x /usr/local/bin/phpcs \ \ # phpcbf - && curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ + && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && chmod +x /usr/local/bin/phpcbf \ \ # phpunit diff --git a/Dockerfiles/work/Dockerfile-7.3 b/Dockerfiles/work/Dockerfile-7.3 index 76ca61b3..10d76483 100644 --- a/Dockerfiles/work/Dockerfile-7.3 +++ b/Dockerfiles/work/Dockerfile-7.3 @@ -266,11 +266,11 @@ RUN set -x \ && rm -rf /usr/local/src/mysqldump-secure \ \ # phpcs - && curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ + && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ && chmod +x /usr/local/bin/phpcs \ \ # phpcbf - && curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ + && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && chmod +x /usr/local/bin/phpcbf \ \ # phpunit diff --git a/Dockerfiles/work/Dockerfile-7.4 b/Dockerfiles/work/Dockerfile-7.4 index a9fde2b3..af07d240 100644 --- a/Dockerfiles/work/Dockerfile-7.4 +++ b/Dockerfiles/work/Dockerfile-7.4 @@ -266,11 +266,11 @@ RUN set -x \ && rm -rf /usr/local/src/mysqldump-secure \ \ # phpcs - && curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ + && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ && chmod +x /usr/local/bin/phpcs \ \ # phpcbf - && curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ + && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && chmod +x /usr/local/bin/phpcbf \ \ # phpunit diff --git a/build/ansible/group_vars/all.yml b/build/ansible/group_vars/all.yml index 2d3f7459..646f55ea 100644 --- a/build/ansible/group_vars/all.yml +++ b/build/ansible/group_vars/all.yml @@ -543,29 +543,29 @@ software_available: check: phpcs --version | grep -E 'version [.0-9]+' 5.2: command: | - curl -qL https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ + curl -sS -L https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ && chmod +x /usr/local/bin/phpcs \ 5.3: command: | - curl -qL https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ + curl -sS -L https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ && chmod +x /usr/local/bin/phpcs \ all: command: | - curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ + curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar > /usr/local/bin/phpcs 2>/dev/null \ && chmod +x /usr/local/bin/phpcs \ phpcbf: check: phpcbf --version | grep -E 'version [.0-9]+' 5.2: command: | - curl -qL https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ + curl -sS -L https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && chmod +x /usr/local/bin/phpcbf \ 5.3: command: | - curl -qL https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ + curl -sS -L https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && chmod +x /usr/local/bin/phpcbf \ all: command: | - curl -q https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ + curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && chmod +x /usr/local/bin/phpcbf \ phpunit: disabled: [5.2] From 4a1efb6b74bfb6ec2c071b2410da6db6f640ccfa Mon Sep 17 00:00:00 2001 From: cytopia Date: Thu, 10 Jan 2019 12:27:20 +0100 Subject: [PATCH 2/4] Do not startup pm2 during version check --- Dockerfiles/work/Dockerfile-5.2 | 2 +- Dockerfiles/work/Dockerfile-5.3 | 2 +- Dockerfiles/work/Dockerfile-5.4 | 2 +- Dockerfiles/work/Dockerfile-5.5 | 2 +- Dockerfiles/work/Dockerfile-5.6 | 2 +- Dockerfiles/work/Dockerfile-7.0 | 2 +- Dockerfiles/work/Dockerfile-7.1 | 2 +- Dockerfiles/work/Dockerfile-7.2 | 2 +- Dockerfiles/work/Dockerfile-7.3 | 2 +- Dockerfiles/work/Dockerfile-7.4 | 2 +- build/ansible/group_vars/all.yml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Dockerfiles/work/Dockerfile-5.2 b/Dockerfiles/work/Dockerfile-5.2 index 941ccc17..47ba7d3f 100644 --- a/Dockerfiles/work/Dockerfile-5.2 +++ b/Dockerfiles/work/Dockerfile-5.2 @@ -311,7 +311,7 @@ RUN set -x \ && mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \ && phpcs --version | grep -E 'version [.0-9]+' \ && phpcbf --version | grep -E 'version [.0-9]+' \ - && pm2 --version | grep -E '[.0-9]+' \ + && pm2 --no-daemon --version | grep -E '[.0-9]+' \ && sass --version | grep -E '[.0-9]+' \ && webpack --version | grep -E '[.0-9]+' \ && yamllint --version 2>&1 | grep -E '[.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-5.3 b/Dockerfiles/work/Dockerfile-5.3 index b287f442..d3fa2e86 100644 --- a/Dockerfiles/work/Dockerfile-5.3 +++ b/Dockerfiles/work/Dockerfile-5.3 @@ -353,7 +353,7 @@ RUN set -x \ && phpcs --version | grep -E 'version [.0-9]+' \ && phpcbf --version | grep -E 'version [.0-9]+' \ && phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ - && pm2 --version | grep -E '[.0-9]+' \ + && pm2 --no-daemon --version | grep -E '[.0-9]+' \ && sass --version | grep -E '[.0-9]+' \ && webpack --version | grep -E '[.0-9]+' \ && wp --allow-root --version | grep -E '[.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-5.4 b/Dockerfiles/work/Dockerfile-5.4 index bc4f0edd..da5570e9 100644 --- a/Dockerfiles/work/Dockerfile-5.4 +++ b/Dockerfiles/work/Dockerfile-5.4 @@ -385,7 +385,7 @@ RUN set -x \ && phpcs --version | grep -E 'version [.0-9]+' \ && phpcbf --version | grep -E 'version [.0-9]+' \ && phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ - && pm2 --version | grep -E '[.0-9]+' \ + && pm2 --no-daemon --version | grep -E '[.0-9]+' \ && sass --version | grep -E '[.0-9]+' \ && symfony --version | grep -E 'version\s*[.0-9]+' \ && webpack --version | grep -E '[.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-5.5 b/Dockerfiles/work/Dockerfile-5.5 index b9d1f0f7..9561b39b 100644 --- a/Dockerfiles/work/Dockerfile-5.5 +++ b/Dockerfiles/work/Dockerfile-5.5 @@ -399,7 +399,7 @@ RUN set -x \ && phpcbf --version | grep -E 'version [.0-9]+' \ && phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ && photon --version | grep -E 'Installer [.0-9]+' \ - && pm2 --version | grep -E '[.0-9]+' \ + && pm2 --no-daemon --version | grep -E '[.0-9]+' \ && sass --version | grep -E '[.0-9]+' \ && symfony --version | grep -E 'version\s*[.0-9]+' \ && webpack --version | grep -E '[.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-5.6 b/Dockerfiles/work/Dockerfile-5.6 index 0caccdb5..116ee419 100644 --- a/Dockerfiles/work/Dockerfile-5.6 +++ b/Dockerfiles/work/Dockerfile-5.6 @@ -413,7 +413,7 @@ RUN set -x \ && phpcbf --version | grep -E 'version [.0-9]+' \ && phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ && photon --version | grep -E 'Installer [.0-9]+' \ - && pm2 --version | grep -E '[.0-9]+' \ + && pm2 --no-daemon --version | grep -E '[.0-9]+' \ && sass --version | grep -E '[.0-9]+' \ && symfony --version | grep -E 'version\s*[.0-9]+' \ && webpack --version | grep -E '[.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-7.0 b/Dockerfiles/work/Dockerfile-7.0 index f207a3d6..2c184281 100644 --- a/Dockerfiles/work/Dockerfile-7.0 +++ b/Dockerfiles/work/Dockerfile-7.0 @@ -413,7 +413,7 @@ RUN set -x \ && phpcbf --version | grep -E 'version [.0-9]+' \ && phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ && photon --version | grep -E 'Installer [.0-9]+' \ - && pm2 --version | grep -E '[.0-9]+' \ + && pm2 --no-daemon --version | grep -E '[.0-9]+' \ && sass --version | grep -E '[.0-9]+' \ && symfony --version | grep -E 'version\s*[.0-9]+' \ && webpack --version | grep -E '[.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-7.1 b/Dockerfiles/work/Dockerfile-7.1 index 4a4cd55d..03625c0d 100644 --- a/Dockerfiles/work/Dockerfile-7.1 +++ b/Dockerfiles/work/Dockerfile-7.1 @@ -413,7 +413,7 @@ RUN set -x \ && phpcbf --version | grep -E 'version [.0-9]+' \ && phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ && photon --version | grep -E 'Installer [.0-9]+' \ - && pm2 --version | grep -E '[.0-9]+' \ + && pm2 --no-daemon --version | grep -E '[.0-9]+' \ && sass --version | grep -E '[.0-9]+' \ && symfony --version | grep -E 'version\s*[.0-9]+' \ && webpack --version | grep -E '[.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-7.2 b/Dockerfiles/work/Dockerfile-7.2 index 1e179008..c20cc337 100644 --- a/Dockerfiles/work/Dockerfile-7.2 +++ b/Dockerfiles/work/Dockerfile-7.2 @@ -413,7 +413,7 @@ RUN set -x \ && phpcbf --version | grep -E 'version [.0-9]+' \ && phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ && photon --version | grep -E 'Installer [.0-9]+' \ - && pm2 --version | grep -E '[.0-9]+' \ + && pm2 --no-daemon --version | grep -E '[.0-9]+' \ && sass --version | grep -E '[.0-9]+' \ && symfony --version | grep -E 'version\s*[.0-9]+' \ && webpack --version | grep -E '[.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-7.3 b/Dockerfiles/work/Dockerfile-7.3 index 10d76483..41c29c27 100644 --- a/Dockerfiles/work/Dockerfile-7.3 +++ b/Dockerfiles/work/Dockerfile-7.3 @@ -401,7 +401,7 @@ RUN set -x \ && phpcbf --version | grep -E 'version [.0-9]+' \ && phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ && photon --version | grep -E 'Installer [.0-9]+' \ - && pm2 --version | grep -E '[.0-9]+' \ + && pm2 --no-daemon --version | grep -E '[.0-9]+' \ && sass --version | grep -E '[.0-9]+' \ && symfony --version | grep -E 'version\s*[.0-9]+' \ && webpack --version | grep -E '[.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-7.4 b/Dockerfiles/work/Dockerfile-7.4 index af07d240..4bf372ae 100644 --- a/Dockerfiles/work/Dockerfile-7.4 +++ b/Dockerfiles/work/Dockerfile-7.4 @@ -401,7 +401,7 @@ RUN set -x \ && phpcbf --version | grep -E 'version [.0-9]+' \ && phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ && photon --version | grep -E 'Installer [.0-9]+' \ - && pm2 --version | grep -E '[.0-9]+' \ + && pm2 --no-daemon --version | grep -E '[.0-9]+' \ && sass --version | grep -E '[.0-9]+' \ && symfony --version | grep -E 'version\s*[.0-9]+' \ && webpack --version | grep -E '[.0-9]+' \ diff --git a/build/ansible/group_vars/all.yml b/build/ansible/group_vars/all.yml index 646f55ea..770fef45 100644 --- a/build/ansible/group_vars/all.yml +++ b/build/ansible/group_vars/all.yml @@ -603,7 +603,7 @@ software_available: && ln -s {{ compose_home }}/vendor/photoncms/installer/photon /usr/local/bin/photon \ # https://github.com/Unitech/pm2 pm2: - check: pm2 --version | grep -E '[.0-9]+' + check: pm2 --no-daemon --version | grep -E '[.0-9]+' all: command: until npm install pm2 -g; do sleep 1; done sass: From b2c1b8e453d3a7a8195d6f58cfe45aeaf21bca6b Mon Sep 17 00:00:00 2001 From: cytopia Date: Thu, 10 Jan 2019 12:30:45 +0100 Subject: [PATCH 3/4] Add new tool: PHP-CS-Fixer --- Dockerfiles/work/Dockerfile-5.3 | 5 +++++ Dockerfiles/work/Dockerfile-5.4 | 5 +++++ Dockerfiles/work/Dockerfile-5.5 | 5 +++++ Dockerfiles/work/Dockerfile-5.6 | 5 +++++ Dockerfiles/work/Dockerfile-7.0 | 5 +++++ Dockerfiles/work/Dockerfile-7.1 | 5 +++++ Dockerfiles/work/Dockerfile-7.2 | 5 +++++ Dockerfiles/work/Dockerfile-7.3 | 5 +++++ README.md | 4 ++++ build/ansible/group_vars/all.yml | 20 ++++++++++++++++++++ 10 files changed, 64 insertions(+) diff --git a/Dockerfiles/work/Dockerfile-5.3 b/Dockerfiles/work/Dockerfile-5.3 index d3fa2e86..c4fc8be4 100644 --- a/Dockerfiles/work/Dockerfile-5.3 +++ b/Dockerfiles/work/Dockerfile-5.3 @@ -238,6 +238,10 @@ RUN set -x \ && curl -sS -L https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.9.0/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && chmod +x /usr/local/bin/phpcbf \ \ +# php-cs-fixer + && curl -sS -L https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.2.19/php-cs-fixer.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \ +&& chmod +x /usr/local/bin/php-cs-fixer \ + \ # phpunit && curl -qL https://phar.phpunit.de/phpunit-4.phar > /usr/local/bin/phpunit 2>/dev/null \ && chmod +x /usr/local/bin/phpunit \ @@ -352,6 +356,7 @@ RUN set -x \ && phalcon commands | grep -E '[.0-9]+' \ && phpcs --version | grep -E 'version [.0-9]+' \ && phpcbf --version | grep -E 'version [.0-9]+' \ + && php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \ && phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ && pm2 --no-daemon --version | grep -E '[.0-9]+' \ && sass --version | grep -E '[.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-5.4 b/Dockerfiles/work/Dockerfile-5.4 index da5570e9..49d817da 100644 --- a/Dockerfiles/work/Dockerfile-5.4 +++ b/Dockerfiles/work/Dockerfile-5.4 @@ -264,6 +264,10 @@ RUN set -x \ && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && chmod +x /usr/local/bin/phpcbf \ \ +# php-cs-fixer + && curl -sS -L https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.2.19/php-cs-fixer.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \ +&& chmod +x /usr/local/bin/php-cs-fixer \ + \ # phpunit && curl -qL https://phar.phpunit.de/phpunit-4.phar > /usr/local/bin/phpunit 2>/dev/null \ && chmod +x /usr/local/bin/phpunit \ @@ -384,6 +388,7 @@ RUN set -x \ && phalcon commands | grep -E '[.0-9]+' \ && phpcs --version | grep -E 'version [.0-9]+' \ && phpcbf --version | grep -E 'version [.0-9]+' \ + && php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \ && phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ && pm2 --no-daemon --version | grep -E '[.0-9]+' \ && sass --version | grep -E '[.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-5.5 b/Dockerfiles/work/Dockerfile-5.5 index 9561b39b..2d939eb5 100644 --- a/Dockerfiles/work/Dockerfile-5.5 +++ b/Dockerfiles/work/Dockerfile-5.5 @@ -271,6 +271,10 @@ RUN set -x \ && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && chmod +x /usr/local/bin/phpcbf \ \ +# php-cs-fixer + && curl -sS -L https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.2.19/php-cs-fixer.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \ +&& chmod +x /usr/local/bin/php-cs-fixer \ + \ # phpunit && curl -qL https://phar.phpunit.de/phpunit-4.phar > /usr/local/bin/phpunit 2>/dev/null \ && chmod +x /usr/local/bin/phpunit \ @@ -397,6 +401,7 @@ RUN set -x \ && phalcon commands | grep -E '[.0-9]+' \ && phpcs --version | grep -E 'version [.0-9]+' \ && phpcbf --version | grep -E 'version [.0-9]+' \ + && php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \ && phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ && photon --version | grep -E 'Installer [.0-9]+' \ && pm2 --no-daemon --version | grep -E '[.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-5.6 b/Dockerfiles/work/Dockerfile-5.6 index 116ee419..4055043d 100644 --- a/Dockerfiles/work/Dockerfile-5.6 +++ b/Dockerfiles/work/Dockerfile-5.6 @@ -284,6 +284,10 @@ RUN set -x \ && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && chmod +x /usr/local/bin/phpcbf \ \ +# php-cs-fixer + && curl -sS -L https://cs.symfony.com/download/php-cs-fixer-v2.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \ +&& chmod +x /usr/local/bin/php-cs-fixer \ + \ # phpunit && curl -qL https://phar.phpunit.de/phpunit-5.phar > /usr/local/bin/phpunit 2>/dev/null \ && chmod +x /usr/local/bin/phpunit \ @@ -411,6 +415,7 @@ RUN set -x \ && phalcon commands | grep -E '[.0-9]+' \ && phpcs --version | grep -E 'version [.0-9]+' \ && phpcbf --version | grep -E 'version [.0-9]+' \ + && php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \ && phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ && photon --version | grep -E 'Installer [.0-9]+' \ && pm2 --no-daemon --version | grep -E '[.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-7.0 b/Dockerfiles/work/Dockerfile-7.0 index 2c184281..f377db1e 100644 --- a/Dockerfiles/work/Dockerfile-7.0 +++ b/Dockerfiles/work/Dockerfile-7.0 @@ -284,6 +284,10 @@ RUN set -x \ && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && chmod +x /usr/local/bin/phpcbf \ \ +# php-cs-fixer + && curl -sS -L https://cs.symfony.com/download/php-cs-fixer-v2.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \ +&& chmod +x /usr/local/bin/php-cs-fixer \ + \ # phpunit && curl -qL https://phar.phpunit.de/phpunit-6.phar > /usr/local/bin/phpunit 2>/dev/null \ && chmod +x /usr/local/bin/phpunit \ @@ -411,6 +415,7 @@ RUN set -x \ && phalcon commands | grep -E '[.0-9]+' \ && phpcs --version | grep -E 'version [.0-9]+' \ && phpcbf --version | grep -E 'version [.0-9]+' \ + && php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \ && phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ && photon --version | grep -E 'Installer [.0-9]+' \ && pm2 --no-daemon --version | grep -E '[.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-7.1 b/Dockerfiles/work/Dockerfile-7.1 index 03625c0d..81737bad 100644 --- a/Dockerfiles/work/Dockerfile-7.1 +++ b/Dockerfiles/work/Dockerfile-7.1 @@ -284,6 +284,10 @@ RUN set -x \ && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && chmod +x /usr/local/bin/phpcbf \ \ +# php-cs-fixer + && curl -sS -L https://cs.symfony.com/download/php-cs-fixer-v2.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \ +&& chmod +x /usr/local/bin/php-cs-fixer \ + \ # phpunit && curl -qL https://phar.phpunit.de/phpunit-7.phar > /usr/local/bin/phpunit 2>/dev/null \ && chmod +x /usr/local/bin/phpunit \ @@ -411,6 +415,7 @@ RUN set -x \ && phalcon commands | grep -E '[.0-9]+' \ && phpcs --version | grep -E 'version [.0-9]+' \ && phpcbf --version | grep -E 'version [.0-9]+' \ + && php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \ && phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ && photon --version | grep -E 'Installer [.0-9]+' \ && pm2 --no-daemon --version | grep -E '[.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-7.2 b/Dockerfiles/work/Dockerfile-7.2 index c20cc337..4563ff8d 100644 --- a/Dockerfiles/work/Dockerfile-7.2 +++ b/Dockerfiles/work/Dockerfile-7.2 @@ -284,6 +284,10 @@ RUN set -x \ && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && chmod +x /usr/local/bin/phpcbf \ \ +# php-cs-fixer + && curl -sS -L https://cs.symfony.com/download/php-cs-fixer-v2.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \ +&& chmod +x /usr/local/bin/php-cs-fixer \ + \ # phpunit && curl -qL https://phar.phpunit.de/phpunit-7.phar > /usr/local/bin/phpunit 2>/dev/null \ && chmod +x /usr/local/bin/phpunit \ @@ -411,6 +415,7 @@ RUN set -x \ && phalcon commands | grep -E '[.0-9]+' \ && phpcs --version | grep -E 'version [.0-9]+' \ && phpcbf --version | grep -E 'version [.0-9]+' \ + && php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \ && phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ && photon --version | grep -E 'Installer [.0-9]+' \ && pm2 --no-daemon --version | grep -E '[.0-9]+' \ diff --git a/Dockerfiles/work/Dockerfile-7.3 b/Dockerfiles/work/Dockerfile-7.3 index 41c29c27..46ffd2dc 100644 --- a/Dockerfiles/work/Dockerfile-7.3 +++ b/Dockerfiles/work/Dockerfile-7.3 @@ -273,6 +273,10 @@ RUN set -x \ && curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && chmod +x /usr/local/bin/phpcbf \ \ +# php-cs-fixer + && curl -sS -L https://cs.symfony.com/download/php-cs-fixer-v2.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \ +&& chmod +x /usr/local/bin/php-cs-fixer \ + \ # phpunit && curl -qL https://phar.phpunit.de/phpunit-7.phar > /usr/local/bin/phpunit 2>/dev/null \ && chmod +x /usr/local/bin/phpunit \ @@ -399,6 +403,7 @@ RUN set -x \ && mysqldump-secure --version | grep -E 'Version:\s*[.0-9]+' \ && phpcs --version | grep -E 'version [.0-9]+' \ && phpcbf --version | grep -E 'version [.0-9]+' \ + && php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' \ && phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' \ && photon --version | grep -E 'Installer [.0-9]+' \ && pm2 --no-daemon --version | grep -E '[.0-9]+' \ diff --git a/README.md b/README.md index 2472afcf..f8743a60 100644 --- a/README.md +++ b/README.md @@ -967,6 +967,10 @@ You want to use tools such as `git`, `drush`, `composer`, `npm`, `eslint`, `phpc phpcbf PHP Code Beautifier and Fixer. + + php-cs-fixer + A tool to automatically fix PHP Coding Standards issues. + photon Photon CMS cli. diff --git a/build/ansible/group_vars/all.yml b/build/ansible/group_vars/all.yml index 770fef45..167ed34e 100644 --- a/build/ansible/group_vars/all.yml +++ b/build/ansible/group_vars/all.yml @@ -219,6 +219,7 @@ software_enabled: - phalcon - phpcs - phpcbf + - php-cs-fixer - phpunit - photon - pm2 @@ -567,6 +568,25 @@ software_available: command: | curl -sS -L https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar > /usr/local/bin/phpcbf 2>/dev/null \ && chmod +x /usr/local/bin/phpcbf \ + php-cs-fixer: + disabled: [5.2, 7.4] + check: php-cs-fixer --version 2>&1 | grep -E 'Fixer\s+(version\s*)?[-_.0-9]+\s+' + 5.3: + command: | + curl -sS -L https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.2.19/php-cs-fixer.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \ + && chmod +x /usr/local/bin/php-cs-fixer \ + 5.4: + command: | + curl -sS -L https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.2.19/php-cs-fixer.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \ + && chmod +x /usr/local/bin/php-cs-fixer \ + 5.5: + command: | + curl -sS -L https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.2.19/php-cs-fixer.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \ + && chmod +x /usr/local/bin/php-cs-fixer \ + all: + command: | + curl -sS -L https://cs.symfony.com/download/php-cs-fixer-v2.phar > /usr/local/bin/php-cs-fixer 2>/dev/null \ + && chmod +x /usr/local/bin/php-cs-fixer \ phpunit: disabled: [5.2] check: phpunit --version | grep -iE '^PHPUnit\s[.0-9]+' From 622af7851aa55eb853d437a78a9a4498268841e8 Mon Sep 17 00:00:00 2001 From: cytopia Date: Thu, 10 Jan 2019 20:08:21 +0100 Subject: [PATCH 4/4] Keep pulling third-party Docker images until success --- tests/base/04-test-run_nginx.sh | 2 +- tests/prod/05-test-env-forward_ports_to_localhost.sh | 2 +- tests/prod/06-test-mount-custom_ini.sh | 2 +- tests/prod/07-test-mount-custom_fpm_conf.sh | 2 +- tests/work/01-test-env-mysqldump-secure.sh | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/base/04-test-run_nginx.sh b/tests/base/04-test-run_nginx.sh index 637568a1..fb9e4265 100755 --- a/tests/base/04-test-run_nginx.sh +++ b/tests/base/04-test-run_nginx.sh @@ -38,7 +38,7 @@ chmod 0777 "${DOC_ROOT_HOST}" chmod 0644 "${DOC_ROOT_HOST}/index.php" # Pull Image -run "docker pull ${CONTAINER}" +run "while ! docker pull ${CONTAINER}; do sleep 1; done" # Start PHP-FPM did="$( docker_run "${IMAGE}:${VERSION}-${FLAVOUR}" "-e DEBUG_ENTRYPOINT=2 -e NEW_UID=$(id -u) -e NEW_GID=$(id -g) -v ${DOC_ROOT_HOST}:${DOC_ROOT_CONT}" )" diff --git a/tests/prod/05-test-env-forward_ports_to_localhost.sh b/tests/prod/05-test-env-forward_ports_to_localhost.sh index 0189e531..c68fe157 100755 --- a/tests/prod/05-test-env-forward_ports_to_localhost.sh +++ b/tests/prod/05-test-env-forward_ports_to_localhost.sh @@ -25,7 +25,7 @@ FLAVOUR="${3}" CONTAINER="mysql:5.6" # Pull Container -run "docker pull ${CONTAINER}" +run "while ! docker pull ${CONTAINER}; do sleep 1; done" # Start mysql container mdid="$( docker_run "${CONTAINER}" "-e MYSQL_ALLOW_EMPTY_PASSWORD=yes" )" diff --git a/tests/prod/06-test-mount-custom_ini.sh b/tests/prod/06-test-mount-custom_ini.sh index 18e8e7b2..468c3995 100755 --- a/tests/prod/06-test-mount-custom_ini.sh +++ b/tests/prod/06-test-mount-custom_ini.sh @@ -44,7 +44,7 @@ chmod 0777 "${DOC_ROOT_HOST}" chmod 0644 "${DOC_ROOT_HOST}/index.php" # Pull container -run "docker pull ${CONTAINER}" +run "while ! docker pull ${CONTAINER}; do sleep 1; done" # Start PHP-FPM did="$( docker_run "${IMAGE}:${VERSION}-${FLAVOUR}" "-e DEBUG_ENTRYPOINT=2 -e NEW_UID=$(id -u) -e NEW_GID=$(id -g) -v ${DOC_ROOT_HOST}:${DOC_ROOT_CONT} -v ${PHP_INI_HOST}:${PHP_INI_CONT}" )" diff --git a/tests/prod/07-test-mount-custom_fpm_conf.sh b/tests/prod/07-test-mount-custom_fpm_conf.sh index c3b3be21..b10cb2e3 100755 --- a/tests/prod/07-test-mount-custom_fpm_conf.sh +++ b/tests/prod/07-test-mount-custom_fpm_conf.sh @@ -49,7 +49,7 @@ chmod 0777 "${DOC_ROOT_HOST}" chmod 0644 "${DOC_ROOT_HOST}/index.php" # Pull container -run "docker pull ${CONTAINER}" +run "while ! docker pull ${CONTAINER}; do sleep 1; done" # Start PHP-FPM did="$( docker_run "${IMAGE}:${VERSION}-${FLAVOUR}" "-e DEBUG_ENTRYPOINT=2 -e NEW_UID=$(id -u) -e NEW_GID=$(id -g) -v ${DOC_ROOT_HOST}:${DOC_ROOT_CONT} -v ${PHP_CNF_HOST}:${PHP_CNF_CONT}" )" diff --git a/tests/work/01-test-env-mysqldump-secure.sh b/tests/work/01-test-env-mysqldump-secure.sh index 591a6c27..9333a1af 100755 --- a/tests/work/01-test-env-mysqldump-secure.sh +++ b/tests/work/01-test-env-mysqldump-secure.sh @@ -27,7 +27,7 @@ MOUNTPOINT="$( mktemp --directory )" CONTAINER="mysql:5.6" # Pull Container -run "docker pull ${CONTAINER}" +run "while ! docker pull ${CONTAINER}; do sleep 1; done" # Start mysql container mdid="$( docker_run "${CONTAINER}" "-e MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}" )"