Created
          August 3, 2018 20:05 
        
      - 
      
- 
        Save butschster/a94d49e5478aaf634badf6b49bc32b17 to your computer and use it in GitHub Desktop. 
    Bitbucket pipelines Laravel + deployer
  
        
  
    
      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
    
  
  
    
  | pipelines: | |
| branches: | |
| master: | |
| - step: | |
| name: Unit tests | |
| image: phpunit/phpunit:6.5.3 | |
| caches: | |
| - composer | |
| script: | |
| - composer install | |
| - php -r "file_exists('.env') || copy('.env.example', '.env');" | |
| - php artisan key:generate | |
| - vendor/bin/phpunit -c phpunit.xml | |
| - step: | |
| name: Deploy | |
| image: php:7.1.5-alpine | |
| script: | |
| - apk update --no-cache && apk add --no-cache openssh-client | |
| - curl -L https://deployer.org/releases/v$DEPLOYER_VERSION/deployer.phar > /usr/local/bin/dep && chmod +x /usr/local/bin/dep | |
| - dep deploy | 
  
    
      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
    
  
  
    
  | DEPLOYER_VERSION=6.2.0 | |
| APP_ENV=testing | |
| DB_CONNECTION=sqlite | |
| DB_DATABASE=:memory: | 
  
    
      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
    
  
  
    
  | You need to add a new SSH key (public and private) to pipelines ssh keys. And then add your hosts to Known hosts. Thats all! | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment