laravel-zero / laravel-zero

A PHP framework for console artisans

Home Page:https://laravel-zero.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LaravelZero build using Bitbucket Pipelines

mathewp-maxamation opened this issue Β· comments

I am trying to setup auto build using bitbucket pipelines for my Laravel Zero application.

My pipeline definition goes like this:

image: ubuntu:18.04
pipelines:
  branches:
    master:
      - step:
          name: "Building & Uploading artefacts"
          script:
            - apt update
            - apt install -y software-properties-common
            - add-apt-repository ppa:ondrej/php
            - apt install -y curl
            - apt install -y tzdata
            - ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime
            - dpkg-reconfigure --frontend noninteractive tzdata
            - apt install -y php7.3 php7.3-common php7.3-xml php7.3-curl php7.3-cli php7.3-opcache php7.3-mbstring
            - php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
            - php composer-setup.php --filename=composer --install-dir=/usr/local/bin
            - php -r "unlink('composer-setup.php');"
            - apt install -y git
            - apt install -y zip unzip php7.3-zip
            - /usr/local/bin/composer install
            - php kallio-send app:build --build-version=v${BITBUCKET_TAG}
            - pipe: atlassian/bitbucket-upload-file:0.1.2
              variables:
                BITBUCKET_USERNAME: $BITBUCKET_USERNAME
                BITBUCKET_APP_PASSWORD: $BITBUCKET_APP_PASSWORD
                FILENAME: "$BITBUCKET_CLONE_DIR/builds/kallio-send"

However it fails at app:build command:

Building process                
                                                
   1. Moving application to production mode: loading...
   1. Moving application to production mode: βœ”
  1/25 [=🍺--------------------------]   4%
 25/25 [============================] 100%   2. Compile into a single file: loading...
   2. Compile into a single file: βœ”
   ErrorException 
  rename(/opt/atlassian/pipelines/agent/build/kallio-send.phar,/opt/atlassian/pipelines/agent/build/builds/kallio-send): No such file or directory
  at vendor/illuminate/filesystem/Filesystem.php:290
    286β–•      * @return bool
    287β–•      */
    288β–•     public function move($path, $target)
    289β–•     {
  ➜ 290β–•         return rename($path, $target);
    291β–•     }
    292β–• 
    293β–•     /**
    294β–•      * Copy a file to a new location.
      +20 vendor frames 
  21  [kallio-send:37](https://bitbucket.org/XXX/kallio-send/src/f0490b0304cd3e886d8b040a4ffa6853bddbb80e/kallio-send:37)
      LaravelZero\Framework\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

Has anyone been able to successfully build Laravel Zero app using BB Pipelines?

This works absolutely fine on my laptop. Do you think I am missing something in my pipeline definition?

Figured it out. I had to install php7.3-intl as well. All is good now.