Good morning,
We want to configure a pipeline for one of our projects, we are occuring an issue related to Bitbucket's Pipeline.
On a given step, we want to perform tests:
There is our step:
- step: &Tests
name: Build Prisma to perform tests
service:
- docker
cache:
- composer
- docker
script:
- eval $(cat secrets.def | sed 's/^/export /')
- pecl install xdebug
- docker-php-ext-enable xdebug
- export XDEBUG_MODE=coverage
- >-
curl -sSL https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions -o - | sh -s \
zip
- cp .env.testing .env
- curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
- composer install
- export APP_URL="http://host.docker.internal:8000"
- php artisan key:generate
- php artisan migrate
- php artisan optimize && php artisan optimize:clear
- echo "memory_limit = 512M" > $PHP_INI_DIR/conf.d/php-memory-limits.ini
- php artisan test --coverage
artifacts:
- secrets.def
And this is the result:
We watched on host.docker.internal (it changes nothing), also increase the available memory, same result.
I hope there is someone to help us.
Thank you,
Alysson
Hi Alysson,
Based on the output you posted here, the error seems to be related to your source code rather than an issue with Pipelines.
At the end of the screenshot, the following error is mentioned
TypeError: Unsupported operand types: string * int in <...>
along with the path of a file. I would suggest starting by checking this specific file.
/opt/atlassian/pipelines/agent/build is the path where the repo is cloned in the Docker container where the build is running. The rest should be the path of this file in your repo unless you generate this file during the build.
Kind regards,
Theodora
Hello @Theodora Boudale
Thank you for your answer, I was in holidays, my collegues did read your response and continue digging. They find a difference between development branch and our pipelines ; an environment variable was empty for PHP (SESSION_LIFETIME).
They also seperated php's server and vite too, the first one was not running because `npm run dev` took priority. It works fine now.
Thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for the update Alysson, it's good to hear that the issue is resolved now!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.