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

Pipeline error with package version

Edited

Hi there. I've got an error, but the deploy form local computer works... How can I fix it? I have a PHP version 7.4 on the server. I think, that Bitbucket cannot find it...


Package operations: 115 installs, 0 updates, 0 removals - Installing ocramius/package-versions (1.9.0): Downloading (connecting...)Downloading (0%) Downloading (5%)Downloading (10%)Downloading (15%)Downloading (75%)Downloading (80%)Downloading (85%)Downloading (90%)Downloading (95%)Downloading (100%)PHP Parse error: syntax error, unexpected 'string' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST) in /opt/atlassian/pipelines/agent/build/vendor/ocramius/package-versions/src/PackageVersions/Installer.php on line 34

Bildschirmfoto 2020-07-05 um 20.08.55.png

My `bitbucket-pipelines.yml`:


# 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: pyguerder/bitbucket-pipelines-php73

clone:
depth: 5

pipelines:
custom:
deploy-to-stage:
- step:
deployment: staging
caches:
- composer
script:
- export COMPOSER_ALLOW_SUPERUSER=1
- curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
- composer install --ignore-platform-reqs --prefer-dist --no-scripts --no-interaction
- ssh-keyscan -p 22 -H xxx >> ~/.ssh/known_hosts
- eval `ssh-agent -s` || true
- stat /opt/atlassian/pipelines/agent/ssh/id_rsa
- ssh-add /opt/atlassian/pipelines/agent/ssh/id_rsa
- ./vendor/bin/dep deploy stage

1 answer

Changing PHP version of Docker image to 7.4 resolves the problem

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,925 views 10 16
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