Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Bitbucket pipelines test + Ansible deploy script
image: php:7.1-fpm
pipelines:
default:
- step:
caches:
- composer
script:
# Update dependencies
- apt-get update
# Install dependencies
- apt-get install git libcurl4-gnutls-dev libicu-dev libmcrypt-dev libvpx-dev libjpeg-dev libpng-dev libxpm-dev zlib1g-dev libfreetype6-dev libxml2-dev libexpat1-dev libbz2-dev libgmp3-dev libldap2-dev unixodbc-dev libpq-dev libsqlite3-dev libaspell-dev libsnmp-dev libpcre3-dev libtidy-dev -yqq
- docker-php-ext-install mbstring pdo_sqlite curl json intl gd xml zip
- step:
name: Install Composer and project dependencies.
script:
- curl -sS https://getcomposer.org/installer | php
- php composer.phar install
- step:
name: Migrate and seeds.
script:
- php artisan migrate
- php artisan db:seed
- step:
name: Run tests.
script:
- php vendor/bin/phpunit --coverage-text --colors=never
# services:
# - postgres
branches:
deploy:
- step:
image: williamyeh/ansible:debian9
script:
- ansible-playbook deploy.yml -i "$PRODUCTION_SERVER," -e branch=master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment