Created
April 6, 2018 17:21
-
-
Save exileed/c3ff44179193228f5827fe5f3533ce3d to your computer and use it in GitHub Desktop.
Bitbucket pipelines test + Ansible deploy script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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