add Docker and Drone boilerplate
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
5512a19e1f
commit
4da6e4b064
6 changed files with 117 additions and 0 deletions
45
.drone.yml
Normal file
45
.drone.yml
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: default
|
||||
|
||||
steps:
|
||||
- name: install
|
||||
image: composer
|
||||
volumes:
|
||||
- name: composer-cache
|
||||
path: /tmp/cache
|
||||
environment:
|
||||
COMPOSER_CACHE_DIR: /tmp/cache
|
||||
commands:
|
||||
- composer install --no-progress --no-interaction --no-dev --optimize-autoloader
|
||||
|
||||
- name: unit tests
|
||||
image: php:7.4
|
||||
commands:
|
||||
- vendor/bin/phpunit -c phpunit.xml
|
||||
|
||||
- name: build image
|
||||
image: docker
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run/docker.sock
|
||||
commands:
|
||||
- docker build -t notecat:latest .
|
||||
|
||||
- name: deploy on testing
|
||||
image: docker/compose
|
||||
volumes:
|
||||
- name: dockersock
|
||||
path: /var/run/docker.sock
|
||||
commands:
|
||||
- docker-compose -f docker/docker-compose.testing.yml up --build --detach
|
||||
|
||||
volumes:
|
||||
- name: composer-cache
|
||||
host:
|
||||
path: /tmp/drone/composer-cache
|
||||
|
||||
- name: dockersock
|
||||
host:
|
||||
path: /var/run/docker.sock
|
||||
Loading…
Add table
Add a link
Reference in a new issue