Sunil Kothiyal
Sunil Kothiyal

Reputation: 177

Gitlab CICD for laravel app not deploying?

I am using Gitlab tutorial https://docs.gitlab.com/ee/ci/examples/laravel_with_gitlab_and_envoy/ for deploying Laravel application to my digital ocean server

But when it’s running task two I am getting following errors.

$ ~/.composer/vendor/bin/envoy run deploy --commit="$CI_COMMIT_SHA" /bin/bash: line 103: /root/.composer/vendor/bin/envoy: No such file or directory ERROR: Job failed: exit code 1

enter image description here

Upvotes: 1

Views: 1156

Answers (2)

Franklin Tanemou
Franklin Tanemou

Reputation: 21

thank you for the answer i had to add .../envoy/**bin**/envoy in the script what worked for me.

complete code : - ${COMPOSER_HOME}/vendor/laravel/envoy/bin/envoy run deploy --commit="$CI_COMMIT_SHA"

Upvotes: 2

piscator
piscator

Reputation: 8739

Try to install envoy in your before_script globally in you composer home directory:

before_script:
    - export COMPOSER_HOME=`pwd`/composer && mkdir -pv $COMPOSER_HOME
    - composer global require --prefer-dist laravel/envoy=~1.0 --no-interaction --prefer-dist --quiet

After this you can call envoy in your deploy script like this:

- ${COMPOSER_HOME}/vendor/laravel/envoy/envoy run deploy --commit="$CI_COMMIT_SHA"

Upvotes: 3

Related Questions