How to solve "could not find driver" in bitbucket pipeline?

85 Views Asked by At

I am trying to deploy with deployer on bitbucket pipelines.

But I always got this error:

[localhost] 15:43:30 CRITICAL  [console] Error thrown while running command "theme:compile". Message: "An exception occurred in the driver: could not find driver"
[localhost] [
[localhost]   "exception" => Doctrine\DBAL\Exception\DriverException {
[localhost]     #message: "An exception occurred in the driver: could not find driver"
[localhost]     #code: 0
[localhost]     #file: "./vendor/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php"

My bitbucket-pipelines.yml looks like this:


image: shopware/development:8.2-composer-2
...
feature/*:
      - step:
          name: 'Deployment feature'
          script:
            - echo -e "\033[0;31m Please start deployment of feature to staging manually"
      - step:
          size: 2x
          name: Deploy feature to staging.de
          deployment: staging
          trigger: manual
          image: composer:2.5.8
          script:
            - php -v
            - php -m
            - apk update && apk add rsync
            - apk add php82-pdo
            - apk add php82-pdo_mysql
            - apk add jq
            - apk add nodejs
            - apk add npm
            - php -m
            - composer global require deployer/deployer:^7.3
            - echo "Composer install"
            - composer install --no-interaction --optimize-autoloader --ignore-platform-reqs
            - ls -l
            - echo "executing Deployer feature"
            - $COMPOSER_HOME/vendor/bin/dep deploy -vvv stage=staging
          services:
            - mysql

options:
  docker: true

definitions:
  services:
    mysql:
      image: mariadb:10.5.21
      variables:
        MYSQL_DATABASE: staging_db1
        MYSQL_USER: root
        MYSQL_ROOT_PASSWORD: root
    docker:
      memory: 2048

I have tried different possibilities but always get this error. How to solve it?

0

There are 0 best solutions below