-
-
Save imrodrigoalves/a5f010ead227b6ab2e675d557d568e8d to your computer and use it in GitHub Desktop.
Bitbucket Pipeline config for Laravel Vapor, make sure to `composer require laravel/vapor-cli` and set the VAPOR_API_TOKEN environment var.
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: smartapps/bitbucket-pipelines-debian-10 # php 7.3 | |
image: bitnami/laravel:8.6.9 # php 7.4 | |
pipelines: | |
branches: | |
master: | |
- step: | |
name: Deploy Test | |
deployment: test | |
script: | |
- composer install --no-interaction --no-progress --prefer-dist | |
- /usr/bin/php vendor/bin/vapor deploy test --commit="$BITBUCKET_COMMIT" | |
- step: | |
name: Deploy Staging | |
deployment: staging | |
trigger: manual | |
script: | |
- composer install --no-interaction --no-progress --prefer-dist | |
- /usr/bin/php vendor/bin/vapor deploy staging --commit="$BITBUCKET_COMMIT" | |
- step: | |
name: Deploy Production | |
deployment: production | |
trigger: manual | |
script: | |
- composer install --no-interaction --no-progress --prefer-dist | |
- /usr/bin/php vendor/bin/vapor deploy production --commit="$BITBUCKET_COMMIT" | |
######## Self installed | |
image: php:7.4-fpm | |
pipelines: | |
branches: | |
develop: | |
- step: | |
name: Deploy | |
deployment: test | |
caches: | |
- composer | |
script: | |
# Install dependencies | |
- apt-get update && apt-get install -y libpng-dev zlib1g-dev libxml2-dev libzip-dev libonig-dev zip curl unzip libmagickwand-dev --no-install-recommends ghostscript libfreetype6-dev libjpeg62-turbo-dev libpng-dev libc-client-dev libkrb5-dev | |
# Configure and install extensions | |
- docker-php-ext-install -j$(nproc) pdo_mysql gd exif zip | |
# Download and install Composer | |
- curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer | |
- composer install --no-interaction --no-progress --prefer-dist --no-dev | |
- php vendor/bin/vapor deploy develop --commit="$BITBUCKET_COMMIT" | |
services: | |
- docker | |
release/*: | |
- step: | |
name: Deploy | |
deployment: staging | |
caches: | |
- composer | |
script: | |
# Install dependencies | |
- apt-get update && apt-get install -y libpng-dev zlib1g-dev libxml2-dev libzip-dev libonig-dev zip curl unzip libmagickwand-dev --no-install-recommends ghostscript libfreetype6-dev libjpeg62-turbo-dev libpng-dev libc-client-dev libkrb5-dev | |
# Configure and install extensions | |
- docker-php-ext-install -j$(nproc) pdo_mysql gd exif zip | |
# Download and install Composer | |
- curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer | |
- composer install --no-interaction --no-progress --prefer-dist --no-dev | |
- php vendor/bin/vapor deploy staging --commit="$BITBUCKET_COMMIT" | |
services: | |
- docker | |
master: | |
- step: | |
name: Deploy | |
deployment: production | |
caches: | |
- composer | |
script: | |
# Install dependencies | |
- apt-get update && apt-get install -y libpng-dev zlib1g-dev libxml2-dev libzip-dev libonig-dev zip curl unzip libmagickwand-dev --no-install-recommends ghostscript libfreetype6-dev libjpeg62-turbo-dev libpng-dev libc-client-dev libkrb5-dev | |
# Configure and install extensions | |
- docker-php-ext-install -j$(nproc) pdo_mysql gd exif zip | |
# Download and install Composer | |
- curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer | |
- composer install --no-interaction --no-progress --prefer-dist --no-dev | |
- php vendor/bin/vapor deploy production --commit="$BITBUCKET_COMMIT" | |
services: | |
- docker |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment