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

configuring pipelines pdo pdo_mysql

OtezVikentiy April 2, 2018
image: php:7.2.1

pipelines:
default:
- step:
caches:
- composer
script:
- apt-get update && apt-get install -y unzip zlib1g-dev git curl libmcrypt-dev mysql-client pdo pdo_mysql
- docker-php-ext-install mcrypt && docker-php-ext-install pdo pdo_mysql && docker-php-ext-install mcrypt
- docker-php-ext-install zip
- curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
- composer install --optimize-autoloader
- php bin/console doctrine:migrations:migrate
- php bin/console cache:clear
- php bin/console cache:warmup
- php vendor/bin/codecept run unit
services:
- mysql

definitions:
services:
mysql:
image: mysql:5.7
environment:
MYSQL_ROOT_PASSWORD: ***
MYSQL_DATABASE: ***
MYSQL_USER: ***
MYSQL_PASSWORD: ***

Hello! I have a problem. Above is my config.

And this is the problem:

 

Снимок экрана от 2018-04-02 19-29-59.png

What's going wrong. I tried many variations, but it either  swears that doctrine can not find pdo_mysql driver or the error above? Help please solve this problem

1 answer

1 vote
Philip Hodder
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 5, 2018

Hello,

This answer is based on what I found here: https://askubuntu.com/questions/384677/how-do-i-install-and-enable-pdo-mysql-and-gd-extensions-for-php5 So it may not be correct (I'm not a PHP developer)

It looks like you need to change your apt-get install command to instead be:

$ apt-get update && apt-get install -y unzip zlib1g-dev git curl libmcrypt-dev mysql-client php-gd php-mysql 

If that doesn't work, you can try looking on your local machine and checking what packages you have installed. Check it's the right name and that you didn't need to add any other apt registries.

$ apt list --installed

If you run into similar issues with setting up Pipelines, you can try running your build inside of a fresh environment using Docker: https://confluence.atlassian.com/bitbucket/debug-your-pipelines-locally-with-docker-838273569.html

Thanks,

Phil

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events