Skip to content

Commit

Permalink
PLT-72 MongoDB extension and library upgrade (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrliptontea authored Oct 26, 2023
1 parent cc4ca98 commit 2bf1389
Show file tree
Hide file tree
Showing 10 changed files with 67 additions and 194 deletions.
50 changes: 16 additions & 34 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,30 @@
version: 2.1
parameters: &version
version:
type: string
default: "php55"

commands:
install_composer_dependencies:
parameters: *version
description: Install composer dependencies for << parameters.version >>
steps:
- run: docker-compose run << parameters.version >> composer install
unit_tests:
parameters: *version
description: Run unit tests for << parameters.version >>
steps:
- run: docker-compose run << parameters.version >> ./vendor/bin/phpunit test/unit
performance_tests:
parameters: *version
description: Run performance tests for << parameters.version >>
steps:
- run: docker-compose run << parameters.version >> ./vendor/bin/phpunit test/performance

jobs:
test:
parameters: *version
machine:
image: ubuntu-2004:202010-01
parameters:
php_version:
type: string
docker:
- image: talis/tripod-php:<< parameters.php_version >>-latest
environment:
RESQUE_SERVER: redis
- image: mongo:3.2.21
name: mongodb
- image: redis:6.2.6
name: redis
steps:
- checkout
- install_composer_dependencies:
version: << parameters.version >>
- unit_tests:
version: << parameters.version >>
- performance_tests:
version: << parameters.version >>
- run: composer install
- run: ./vendor/bin/phpunit test/unit
- run: ./vendor/bin/phpunit test/performance

workflows:
build_and_test:
jobs:
- test:
matrix:
parameters:
version:
php_version:
- php55
- php56
- php70
- php72
- php73
26 changes: 0 additions & 26 deletions .travis.yml

This file was deleted.

70 changes: 0 additions & 70 deletions build.xml

This file was deleted.

12 changes: 8 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,18 @@
"homepage": "http://talis.com/"
}
],
"suggest": {
"mongodb/mongodb": "MongoDB driver library",
"resque/php-resque": "Redis backed library for background jobs"
},
"require": {
"php" : ">=5.5",
"semsol/arc2": "v2.2.4",
"chrisboulton/php-resque": "dev-master#98fde571db008a8b48e73022599d1d1c07d4a7b5",
"monolog/monolog" : "~1.13",
"mongodb/mongodb": "1.0.5"
"semsol/arc2": "2.2.6",
"monolog/monolog" : "~1.13"
},
"require-dev": {
"resque/php-resque": "v1.3.4",
"mongodb/mongodb": "1.4.3",
"phpunit/phpunit": "^4.8",
"squizlabs/php_codesniffer": "3.2.*"
},
Expand Down
32 changes: 9 additions & 23 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,42 +6,28 @@ x-base-config: &base-config
- ./vendor:/var/tripod-php/vendor:delegated
links:
- "mongo32:mongodb"
- redis
- redis
depends_on:
- mongo32
- redis
working_dir: /var/tripod-php
- redis
working_dir: /var/tripod-php
env_file: .env

services:
php55:
# build:
php55:
# build:
# context: ./docker
# dockerfile: Dockerfile-php55
image: talis/tripod-php:php55-latest
<<: *base-config

php56:
# build:
# context: ./docker
# dockerfile: Dockerfile-php56
image: talis/tripod-php:php56-latest
<<: *base-config

php70:
# build:
php73:
# build:
# context: ./docker
# dockerfile: Dockerfile-php70
image: talis/tripod-php:php70-latest
# dockerfile: Dockerfile-php73
image: talis/tripod-php:php73-latest
<<: *base-config

php72:
# build:
# context: ./docker
# dockerfile: Dockerfile-php72
image: talis/tripod-php:php72-latest
<<: *base-config

mongo32:
image: mongo:3.2.21

Expand Down
26 changes: 19 additions & 7 deletions docker/Dockerfile-php55
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
FROM php:5.5-cli

ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
# Debian jessie repositories have been moved to archive
# https://lists.debian.org/debian-devel-announce/2023/02/msg00004.html
RUN rm /etc/apt/sources.list && \
echo 'deb [trusted=yes] http://archive.debian.org/debian-security jessie/updates main' >> /etc/apt/sources.list && \
echo 'deb [trusted=yes] http://archive.debian.org/debian jessie main' >> /etc/apt/sources.list && \
echo 'Acquire::Check-Valid-Until "false";' >> /etc/apt/apt.conf

RUN apt-get update && apt-get install -y git ca-certificates && \
chmod +x /usr/local/bin/install-php-extensions && \
install-php-extensions pcntl redis mongodb-1.1.9 && \
curl https://getcomposer.org/installer > /tmp/composer-setup.php && \
php /tmp/composer-setup.php --install-dir /usr/local/bin/ --filename composer \
&& rm /tmp/composer-setup.php
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl \
git \
unzip \
zip \
&& rm -rf /var/lib/apt/lists/*

COPY --from=mlocati/php-extension-installer:2.1.58 /usr/bin/install-php-extensions /usr/local/bin/
RUN install-php-extensions pcntl redis mongodb-1.5.5 && \
curl https://getcomposer.org/installer >/tmp/composer-setup.php && \
php /tmp/composer-setup.php --install-dir /usr/local/bin/ --filename composer && \
rm /tmp/composer-setup.php
10 changes: 0 additions & 10 deletions docker/Dockerfile-php56

This file was deleted.

10 changes: 0 additions & 10 deletions docker/Dockerfile-php70

This file was deleted.

10 changes: 0 additions & 10 deletions docker/Dockerfile-php72

This file was deleted.

15 changes: 15 additions & 0 deletions docker/Dockerfile-php73
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM php:7.3-cli

RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl \
git \
unzip \
zip \
&& rm -rf /var/lib/apt/lists/*

COPY --from=mlocati/php-extension-installer:2.1.58 /usr/bin/install-php-extensions /usr/local/bin/
RUN install-php-extensions pcntl redis mongodb-1.5.5 && \
curl https://getcomposer.org/installer >/tmp/composer-setup.php && \
php /tmp/composer-setup.php --install-dir /usr/local/bin/ --filename composer && \
rm /tmp/composer-setup.php

0 comments on commit 2bf1389

Please sign in to comment.