I have a WordPress site where I'm trying to push out updated code via FTP using Pipelines, and then run "composer install" within the theme directory in order to install necessary dependencies. I have a composer.json file within that theme directory that manages dependencies.
I'm wondering how I can tell Pipelines to run the install in the theme directory using that composer.json file? Here is my current code:
image: php:7.2.3
pipelines:
default:
- step:
script:
- apt-get update && apt-get install -y unzip
- apt-get -qq install git-ftp
- git ftp push --user $FTP_USERNAME --passwd $FTP_PASSWORD server/path
- curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
- composer install
Hi Rob,
How have you set this up locally? You should be able to reuse your composer.json file if it works in a similar way locally. Or maybe there was some set up you did when you first installed composer on your machine that you need to redo in Pipelines.
Do you run into any specific errors that don't surface locally when you're trying to set this up in Pipelines?
You can also debug this inside of Docker (which will provide a near identical environment to Pipelines). This should make it possible for you to reproduce the issue locally and figure out a fix faster. Have a look here: https://confluence.atlassian.com/bitbucket/debug-your-pipelines-locally-with-docker-838273569.html
Thanks,
Phil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.