Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM php:latest

RUN apt-get update && apt-get install -y unzip git moreutils && rm -rf /var/lib/apt/lists/*
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

RUN useradd --home-dir /opt/pipeline --shell /bin/bash pipeline
RUN mkdir -p /opt/pipeline/.composer && chown -R pipeline:pipeline /opt/pipeline

USER pipeline
WORKDIR /app
18 changes: 18 additions & 0 deletions doit2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

chronic docker build -t pipeline-test .

mkdir -p .composer-cache

docker run --rm \
-v "$PWD:/app" \
-v "$PWD/.composer-cache:/opt/pipeline/.composer" \
pipeline-test \
sh -c '
chronic composer remove --no-update --dev phpstan/phpstan vimeo/psalm infection/infection friendsofphp/php-cs-fixer php-coveralls/php-coveralls
for n in $(seq 1 10); do
chronic php -d opcache.enable_cli=1 -d opcache.jit=tracing -d opcache.jit_buffer_size=64M /usr/local/bin/composer update --prefer-dist --no-interaction --no-progress --dry-run -vvv || { echo "FAILED on run $n"; exit 1; }
echo "OK ($n)"
done
echo "All 10 runs succeeded"
'
Loading