Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving to Circle 2.0 #650

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
61 changes: 61 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
version: 2
jobs:
build:
# uncomment later
# docker_layer_caching: true
working_directory: ~/gush
docker:
- image: circleci/php:7.2-cli
steps:
- setup_remote_docker
- checkout
- run:
name: "Build Docker container"
command: |
docker build --rm=false -t gush .
- restore_cache:
keys:
- composer-v2.0.0-{{ checksum "composer.json" }}
- composer-v2.0.0-
- run:
name: "Install dependencies from Composer"
command: |
cd ~/gush
composer install --prefer-dist --optimize-autoloader --no-interaction
- save_cache:
key: composer-v2.0.0-{{ checksum "composer.json" }}
paths:
- /tmp/.composer/cache/files
- restore_cache:
key: phpunit-v2.0.0-{{ checksum "composer.json" }}
paths:
- /tmp/phpunit
- run:
name: "Running 'phpunit'"
command: |
cd ~/gush
mkdir -p ~/gush/var/circle-test-reports/phpunit
vendor/bin/phpunit --verbose --log-junit var/circle-test-reports/phpunit/junit.xml
- save_cache:
key: phpunit-v2.0.0-{{ checksum "composer.json" }}
paths:
- /tmp/phpunit
- store_test_results:
path: ~/gush/var/circle-test-reports
- store_artifacts:
path: ~/gush/var/circle-test-reports
- run:
name: "Running Docker container"
environment:
GUSH_CONFIG: /root/.gush
GUSH_LOCAL_CONFIG: /root/project
GUSH_USE_FS: true
command: docker run --tty gush -vvv --help
- deploy:
filters:
branches:
only: master
command: |
docker login -u coder20078 -p $DOCKER_HUB_PASSWORD -e coder20078@gmail.com
docker tag -f gush coder20078/gush
docker push coder20078/gush
7 changes: 2 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
FROM php:7.0.8-alpine
FROM php:7.2.8-cli-alpine

RUN set -xe \
&& apk add --no-cache \
git \
openssh-client

RUN curl -s https://getcomposer.org/installer | php \
&& chmod +x composer.phar \
&& mv composer.phar /usr/bin/composer

COPY --from=composer:1.6 /usr/bin/composer /usr/bin/composer
COPY ./src /usr/src/gush/src
COPY ./gush /usr/src/gush/gush
COPY ./composer.json /usr/src/gush/composer.json
Expand Down
37 changes: 0 additions & 37 deletions circle.yml

This file was deleted.