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

2018-05-06 20:51:35 +00:00
version: 2
jobs:
build:
docker:
- image: circleci/php:7.1
steps:
- checkout
- 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" }}
deploy:
docker:
- image: ansible/ansible:ubuntu1604
environment:
ANSIBLE_HOST_KEY_CHECKING: no
steps:
- run:
name: Install system packages.
2018-05-06 21:30:30 +00:00
command: pip install ansible
2018-05-06 20:51:35 +00:00
- checkout
- restore_cache:
key: v1-{{ .Branch }}-{{ checksum "./ansible/requirements.yml" }}
- run: ansible-galaxy install -r ansible/requirements.yml
- save_cache:
key: v1-{{ .Branch }}-{{ checksum "./ansible/requirements.yml" }}
paths:
- '/root/.ansible/roles'
- run: ansible-playbook ansible/deploy.yml -i ansible/hosts -e 'git_branch=master' -u opdavies --become
workflows:
version: 2
build_test_and_deploy:
jobs:
- build
- deploy:
requires:
- build