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

Identical yaml file working in one repo and not in another

Edited
Esther Strom Community Leader Nov 05, 2020

One of our devs came to me with an issue that I'm unable to solve. They have a yaml file that works perfectly in one repo, but errors out on another. I've checked all of the other settings at the repo level and they're all identical from one to the other.

Here's the bitbucket-pipelines.yaml file; I've downloaded the raw file from both repos and run them through a diff app to make sure they're identical, and they are.

# This is a sample build configuration for PHP.
# Check our guides at https://confluence.atlassian.com/x/e8YWN for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: php:7.3

pipelines:
default:
-
step:
caches:
-
composer
script:
-
php -v
-
apt-get update && apt-get install -y unzip
-
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
-
composer install
-
vendor/bin/phpunit --bootstrap Tests/bootstrap.php Tests/

The error we're seeing in the repo where it doesn't work; the obfuscated areas are our repo names (which contain company-ID info), not linux package names.
2020-11-05 12_55_50-phconnectchicago _ login_authentication_service_php _ Pipelines — Bitbucket.png 

And when I downloaded the raw error file, the difference is this:

2020-11-05 12_59_49-pipelineLog-2.txt, pipelineLog-150.txt - SourceGear DiffMerge.png

Any ideas?

1 answer

1 accepted

0 votes
Answer accepted

Hi Esther,

I'm not very familiar with composer, but based on the output, it looks that composer is trying to download dependencies using Git, but Git is not installed in the image you are using.

The other repo where the build works may download different dependencies. The dependencies are specified in the composer.json file and that file may be different for each repo.

If you need to clone private Git repositories in your build via composer, then I believe that you will need to install Git before the 'composer install' command (since the image doesn't have Git) and you'll also need to configure authentication, you can check here for details:

Kind regards,
Theodora

Esther Strom Community Leader Nov 09, 2020

Thanks, Teodora. I'll pass this info on to our devs. I did take a look at the composer.json files and they are quite different.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Apps & Integrations

🍻🍂Apptoberfest Update: Upcoming Virtual Events 🎉

Hello Community! I hope you've been enjoying the 🍂Apptoberfestivities🍂 (I know I have!) The event is heating up next week with a series of virtual events that we're calling the 🍻🍂Partner App ...

113 views 1 8
Read article

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