This repository has been archived on 2025-01-19. You can view files and clone it, but cannot push or open issues or pull requests.
oliverdavies.uk-old-sculpin/.circleci/config.yml

46 lines
1.2 KiB
YAML
Raw Normal View History

2017-11-27 13:56:51 +00:00
version: 2
jobs:
2018-03-02 20:38:11 +00:00
build:
2017-11-27 20:13:59 +00:00
docker:
2017-12-27 20:59:45 +00:00
- image: circleci/php:7.1
2017-11-27 20:13:59 +00:00
steps:
- checkout
2017-12-27 20:59:45 +00:00
- restore_cache:
keys:
- v1-dependencies-{{ checksum "composer.json" }}
- v1-dependencies-
- run: composer install -n --prefer-dist
- save_cache:
paths:
- ./vendor
key: v1-dependencies-{{ checksum "composer.json" }}
2017-11-27 14:11:50 +00:00
2018-01-03 19:40:28 +00:00
deploy:
docker:
- image: ansible/ansible:ubuntu1604
2018-01-03 20:38:52 +00:00
environment:
ANSIBLE_HOST_KEY_CHECKING: no
2018-01-03 19:40:28 +00:00
steps:
- run:
name: Install system packages.
command: pip install --upgrade pip && pip install ansible
- checkout
- restore_cache:
2018-01-03 20:18:44 +00:00
key: v1-{{ .Branch }}-{{ checksum "./ansible/requirements.yml" }}
2018-01-03 20:26:30 +00:00
- run: ansible-galaxy install -r ansible/requirements.yml
2018-01-03 19:40:28 +00:00
- save_cache:
2018-01-03 20:18:44 +00:00
key: v1-{{ .Branch }}-{{ checksum "./ansible/requirements.yml" }}
2018-01-03 19:40:28 +00:00
paths:
- '/root/.ansible/roles'
2018-01-03 23:00:54 +00:00
- run: ansible-playbook ansible/deploy.yml -i ansible/hosts -e 'git_branch=master' -u opdavies --become
2018-01-03 19:40:28 +00:00
2017-11-27 14:11:50 +00:00
workflows:
2017-11-27 20:13:59 +00:00
version: 2
build_test_and_deploy:
jobs:
2018-03-02 20:38:11 +00:00
- build
2018-01-03 20:21:10 +00:00
- deploy:
requires:
2018-03-02 20:38:11 +00:00
- build