Skip to content

Commit

Permalink
Update Circle CI
Browse files Browse the repository at this point in the history
  • Loading branch information
rdohms committed Jul 19, 2019
1 parent 099500e commit 791deaa
Show file tree
Hide file tree
Showing 7 changed files with 6,246 additions and 48 deletions.
59 changes: 59 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
version: 2

jobs:
build:
docker:
- image: circleci/php:7.2-cli-stretch-node
steps:
- run: sudo composer self-update
- checkout
- run: cp ~/project/config/parameters.yml.dist ~/project/config/parameters.yml

- restore_cache:
keys:
- project-dependencies-{{ checksum "~/project/composer.lock" }}
- composer-cache

- run: composer install -n -o

- save_cache:
key: project-dependencies-{{ checksum "~/project/composer.lock" }}
paths:
- ~/project/vendor
- save_cache:
key: composer-cache
paths:
- ~/.composer/cache

- run: make test
- store_test_results:
path: build
- store_artifacts:
path: build

deploy:
docker:
- image: circleci/php:7.2-cli-stretch-node
steps:
- checkout
- run: npm install
- run: node_modules/.bin/encore prod
- restore_cache:
keys:
- project-dependencies-{{ checksum "~/project/composer.lock" }}
- composer-cache
- run: composer install -n -o
- run: cp ~/.ssh/id_amsterdamphp.nl ~/.ssh/id_rsa
- run: ./vendor/bin/dep deploy

workflows:
version: 2
build-deploy:
jobs:
- build
- deploy:
filters:
branches:
only: master
requires:
- build
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ web/js/*
/.phpunit.result.cache
/var/
!/var/.gitkeep

cache/*
logs/*
###> symfony/webpack-encore-bundle ###
/node_modules/
/web/build/
Expand Down
24 changes: 0 additions & 24 deletions circle.yml

This file was deleted.

5 changes: 5 additions & 0 deletions config/parameters.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
parameters:
meetup_group: amsterdamphp
meetup_api_key: YOUR_MEETUP_API_KEY
secret: SomeRandomSecretToSeedSymfony
redis_dsn: redis://localhost
4 changes: 2 additions & 2 deletions deploy.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
// Set configurations
set('repository', '[email protected]:AmsterdamPHP/meetup-raffle-machine.git');
set('shared_files', ['config/parameters.yml']);
set('shared_dirs', ['var']);
set('writable_dirs', []);
set('shared_dirs', ['cache', 'logs']);
set('writable_dirs', ['cache', 'logs']);

// Configure servers
server('production', 'amsterdamphp.nl')
Expand Down
Loading

0 comments on commit 791deaa

Please sign in to comment.