From 8e773da98749e4838b20ac33617ec03c12cf17c8 Mon Sep 17 00:00:00 2001 From: Philipp Date: Sun, 2 Apr 2023 12:28:08 +0200 Subject: [PATCH 1/3] Add new container for upstream CI/CD --- codecov/Dockerfile | 25 +++++++++++++++++++++++++ php8.1/Dockerfile | 30 ++++++++++++++++++++++++++++++ php8.1/php.ini | 17 +++++++++++++++++ 3 files changed, 72 insertions(+) create mode 100644 codecov/Dockerfile create mode 100644 php8.1/Dockerfile create mode 100644 php8.1/php.ini diff --git a/codecov/Dockerfile b/codecov/Dockerfile new file mode 100644 index 0000000..2438392 --- /dev/null +++ b/codecov/Dockerfile @@ -0,0 +1,25 @@ +FROM alpine + +RUN set -eux; \ + apk add --no-cache --virtual .gosu-deps \ + ca-certificates \ + curl \ + dpkg \ + gnupg \ + perl-utils \ + ; \ +# verify the signature + export GNUPGHOME="$(mktemp -d)"; \ + curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import; \ + curl -Os https://uploader.codecov.io/latest/alpine/codecov; \ + curl -Os https://uploader.codecov.io/latest/alpine/codecov.SHA256SUM; \ + curl -Os https://uploader.codecov.io/latest/alpine/codecov.SHA256SUM.sig; \ + gpgv codecov.SHA256SUM.sig codecov.SHA256SUM; \ + shasum -a 256 -c codecov.SHA256SUM; \ + command -v gpgconf && gpgconf --kill all || :; \ + rm -rf "$GNUPGHOME" codecov.SHA256SUM codecov.SHA256SUM.sig; \ + mv codecov /usr/local/bin/codecov; \ +# clean up fetch dependencies + apk del --no-network .gosu-deps; \ + chmod +x /usr/local/bin/codecov; \ + codecov --version; diff --git a/php8.1/Dockerfile b/php8.1/Dockerfile new file mode 100644 index 0000000..cd02d6b --- /dev/null +++ b/php8.1/Dockerfile @@ -0,0 +1,30 @@ +FROM debian:buster + +# install the PHP extensions we need +# see https://friendi.ca/resources/requirements/ +RUN set -ex; \ + apt-get update; \ + DEBIAN_FRONTEND=noninteractive apt-get install -q -y wget gnupg2 apt-transport-https lsb-release ca-certificates mariadb-client; \ + wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg; \ + echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list; \ + apt-get update; \ + DEBIAN_FRONTEND=noninteractive apt-get install -q -y php8.1-gd git curl openssl \ + php8.1-cli php8.1-curl php8.1-mysql wget make \ + php8.1-redis php8.1-memcached php8.1-memcache \ + php8.1-apcu php8.1-xdebug php8.1-xml php8.1-zip php8.1-dev php8.1-mbstring; \ + apt-get autoremove -y; apt-get autoclean; apt-get clean; \ + rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/*; + +RUN phpenmod curl pdo pdo_mysql xml gd zip opcache mbstring posix ctype iconv pcntl openssl + +RUN set -ex; \ + curl -O -L https://phar.phpunit.de/phpunit-9.phar; \ + chmod +x phpunit-9.phar; \ + mv phpunit-9.phar /usr/local/bin/phpunit; +RUN set -ex; \ + curl -O -L https://getcomposer.org/download/1.10.15/composer.phar; \ + chmod +x composer.phar; \ + mv composer.phar /usr/local/bin/composer; + +RUN phpdismod xdebug +ADD php.ini /etc/php/8.1/cli/conf.d/friendica.ini diff --git a/php8.1/php.ini b/php8.1/php.ini new file mode 100644 index 0000000..0c9a2b2 --- /dev/null +++ b/php8.1/php.ini @@ -0,0 +1,17 @@ +memory_limit = 768M +phar.readonly = 0 ; only for building phar files on CI - should be disabled on production environments +; Opcache +opcache.enable=1 +opcache.enable_cli=1 +opcache.interned_strings_buffer=8 +opcache.max_accelerated_files=10000 +opcache.memory_consumption=128 +opcache.save_comments=1 +opcache.revalidate_freq=1 +apc.enabled=1 +apc.enable_cli=1 +error_reporting=-1 +log_errors_max_len=0 +zend.assertions=1 +assert.exception=1 +xdebug.show_exception_trace=0 From 504d84719f076d131042257eb2f947114bb280f0 Mon Sep 17 00:00:00 2001 From: Philipp Date: Sun, 2 Apr 2023 12:29:44 +0200 Subject: [PATCH 2/3] fix whitespaces --- codecov/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/codecov/Dockerfile b/codecov/Dockerfile index 2438392..dab9614 100644 --- a/codecov/Dockerfile +++ b/codecov/Dockerfile @@ -9,7 +9,7 @@ RUN set -eux; \ perl-utils \ ; \ # verify the signature - export GNUPGHOME="$(mktemp -d)"; \ + export GNUPGHOME="$(mktemp -d)"; \ curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import; \ curl -Os https://uploader.codecov.io/latest/alpine/codecov; \ curl -Os https://uploader.codecov.io/latest/alpine/codecov.SHA256SUM; \ @@ -20,6 +20,6 @@ RUN set -eux; \ rm -rf "$GNUPGHOME" codecov.SHA256SUM codecov.SHA256SUM.sig; \ mv codecov /usr/local/bin/codecov; \ # clean up fetch dependencies - apk del --no-network .gosu-deps; \ + apk del --no-network .gosu-deps; \ chmod +x /usr/local/bin/codecov; \ codecov --version; From 2d493682fcda15dd045e257f6b4dff99b661d949 Mon Sep 17 00:00:00 2001 From: Philipp Date: Sun, 2 Apr 2023 12:30:27 +0200 Subject: [PATCH 3/3] fix whitespaces --- codecov/Dockerfile | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/codecov/Dockerfile b/codecov/Dockerfile index dab9614..5313128 100644 --- a/codecov/Dockerfile +++ b/codecov/Dockerfile @@ -1,7 +1,7 @@ FROM alpine -RUN set -eux; \ - apk add --no-cache --virtual .gosu-deps \ +RUN set -ex; \ + apk add --no-cache --virtual .gosu-deps \ ca-certificates \ curl \ dpkg \ @@ -9,17 +9,17 @@ RUN set -eux; \ perl-utils \ ; \ # verify the signature - export GNUPGHOME="$(mktemp -d)"; \ - curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import; \ - curl -Os https://uploader.codecov.io/latest/alpine/codecov; \ - curl -Os https://uploader.codecov.io/latest/alpine/codecov.SHA256SUM; \ - curl -Os https://uploader.codecov.io/latest/alpine/codecov.SHA256SUM.sig; \ - gpgv codecov.SHA256SUM.sig codecov.SHA256SUM; \ - shasum -a 256 -c codecov.SHA256SUM; \ - command -v gpgconf && gpgconf --kill all || :; \ - rm -rf "$GNUPGHOME" codecov.SHA256SUM codecov.SHA256SUM.sig; \ - mv codecov /usr/local/bin/codecov; \ + export GNUPGHOME="$(mktemp -d)"; \ + curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import; \ + curl -Os https://uploader.codecov.io/latest/alpine/codecov; \ + curl -Os https://uploader.codecov.io/latest/alpine/codecov.SHA256SUM; \ + curl -Os https://uploader.codecov.io/latest/alpine/codecov.SHA256SUM.sig; \ + gpgv codecov.SHA256SUM.sig codecov.SHA256SUM; \ + shasum -a 256 -c codecov.SHA256SUM; \ + command -v gpgconf && gpgconf --kill all || :; \ + rm -rf "$GNUPGHOME" codecov.SHA256SUM codecov.SHA256SUM.sig; \ + mv codecov /usr/local/bin/codecov; \ # clean up fetch dependencies - apk del --no-network .gosu-deps; \ - chmod +x /usr/local/bin/codecov; \ - codecov --version; + apk del --no-network .gosu-deps; \ + chmod +x /usr/local/bin/codecov; \ + codecov --version;