Error in running my docker image

Hello everyone

I am in trouble with running git lab ci/cd . I get error like below when I run my docker image and my pipeline fails.


and this is my gilab yaml file

image: registry.gitlab.com/rezvani1982/test:latest

services:

  • mysql:5.7

variables:
MYSQL_DATABASE: homestead
MYSQL_ROOT_PASSWORD: secret
DB_HOST: mysql
DB_USERNAME: root

stages:

  • test
  • deploy

unit_test:
stage: test
script:
- cp .env.example .env
- composer install --ignore-platform-reqs
- php artisan key:generate
- php artisan migrate
- vendor/bin/phpunit

deploy_production:
stage: deploy
script:
- ‘which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )’
- eval $(ssh-agent -s)
- ssh-add <(echo “$SSH_PRIVATE_KEY”)
- mkdir -p ~/.ssh
- ‘[[ -f /.dockerenv ]] && echo -e “Host *\n\tStrictHostKeyChecking no\n\n” > ~/.ssh/config’

- ~/.composer/vendor/bin/envoy run deploy --commit="$CI_COMMIT_SHA"

environment:
name: production
url: http://?.?.?.?
when: manual
only:
- main


I really do not know what I should do????
any solution would be my appriciated

Hi @rezvani1982 :wave:

Separating the signal from the noise, this is the error that’s causing the job to fail:

I’m no PHP expert but I’d suggest you take a look at test/vendor/laravel/framework/src/Illuminate/Support/Env.php line 99.

According to the error, there’s an an unexpected => where the parser is expecting either , or ) on line 99 of test/vendor/laravel/framework/src/Illuminate/Support/Env.php.