Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Pipeline error with package version

Eldar
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 5, 2020

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

0 votes
Eldar
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 9, 2020

Changing PHP version of Docker image to 7.4 resolves the problem

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events