Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Laravel is not deployed in App Engine with Bitbucket pipelines

I'm trying to deploy a Laravel project to App Engine through Bitbucket pipelines but it's not working. I don't get any error in the pipelines but the site is not displayed correctly, it returns a 500 error. When checking the logs I see this error:

2020-06-05 04:58:20 default[20200605t045622] 2020/06/05 04:58:20 [error] 20#20: *8 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught ReflectionException: Class view does not exist in /srv/vendor/laravel/framework/src/Illuminate/Container/Container.php:805 Stack trace: #0 /srv/vendor/laravel/framework/src/Illuminate/Container/Container.php(805): ReflectionClass->__construct('view') #1 /srv/vendor/laravel/framework/src/Illuminate/Container/Container.php(687): Illuminate\Container\Container->build('view') #2 /srv/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(796): Illuminate\Container\Container->resolve('view', Array, true) #3 /srv/vendor/laravel/framework/src/Illuminate/Container/Container.php(633): Illuminate\Foundation\Application->resolve('view', Array) #4 /srv/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(781): Illuminate\Container\Container->make('view', Array) #5 /srv/vendor/laravel/framework/src/Illuminate/Container/Container.php(1280): Illuminate\Foundation\Application->make('view') #6 /srv/vendor/laravel/framework/src/Illuminate/Support/Facades/Fac...PHP message: PHP Fatal error: Uncaught ReflectionException: Class view does not exist in /srv/vendor/laravel/framework/src/Illuminate/Container/Container.php:805

 

If I deploy the app manually with gcloud app deploy app-staging.yaml, it works.

Here is my script, what could be missing? 

image: lbausch/laravel-ci
definitions:
steps:
- step: &build-image
name: Build image
script:
#Copy Environment File
- cp .env.pipelines .env

#Install Composer
- curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
- composer install
artifacts:
- vendor/**

#Migrate Database
- php artisan key:generate
- php artisan migrate
- step: &lint
name: Linting
script:
#Copy Environment File
- cp .env.pipelines .env
#Install Composer
- composer install
- composer run lint
- step: &unit-testing
name: Unit Testing
script:
- apt-get install libpng-dev -y --no-install-recommends
#Copy Environment File
- cp .env.pipelines .env
#Install Composer
- composer install
#Run Test Suite
- ./vendor/bin/phpunit --verbose
pipelines:
branches:
master:
- step: *build-image
- step: *lint
- step: *unit-testing
- step:
name: Deploy to Production
deployment: production
trigger: manual
script:
- pipe: atlassian/google-app-engine-deploy:0.7.2
variables:
KEY_FILE: $KEY_FILE
PROJECT: $PROJECT_ID
DEPLOYABLES: 'app.yaml'
develop:
- step: *build-image
- step: *lint
- step: *unit-testing
- step:
name: Deploy to Development
deployment: staging
trigger: automatic
script:
- pipe: atlassian/google-app-engine-deploy:0.7.2
variables:
KEY_FILE: $KEY_FILE
PROJECT: $PROJECT_ID
DEPLOYABLES: 'app-staging.yaml'
'{feature/*,bugfix/*,hotfix/*,release/*}':
- step: *build-image
- step: *lint
- step: *unit-testing

 

Thanks

1 answer

1 accepted

0 votes
Answer accepted

From the error the view class is missing.

This could signal a configuration issue, e.g. if the `.env` file needs to be deployed, make it an artifact, too (like you did with the composer vendor folder).

Thanks a lot @ktomk! This solved the problem :) 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Trello

Taco Tuesday: Your favorite Trello blog takeaway

Hello friends! From the community that brought you Welcome Wednesday, Throwback Thursday and Friday Fun, welcome to Taco Tuesday, a weekly discussion about all things Trello. The best part? One Tac...

67 views 4 3
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you