Git Product home page Git Product logo

Comments (7)

tobias-kuendig avatar tobias-kuendig commented on August 20, 2024

You are running your pipeline with the ruby image. Use the composer image instead.

deploy:
    image: composer:latest
    only:
        - master
    script:
        - composer global require --prefer-dist laravel/envoy=~1.0 --no-interaction --prefer-dist --quiet
        - envoy run deploy

You can find further examples on how to use GitLab CI here:
https://docs.gitlab.com/ce/ci/examples/README.html

from oc-bootstrapper.

damsfx avatar damsfx commented on August 20, 2024

You are running your pipeline with the ruby image.

Ho ... Sorry!
I've seen that but as I'm just using out of the box configuration, I wasn't thinking an update to the file was required.
Don't see the image property in oc-bootstrapper/templates/gitlab-ci.yml !?

That sayed ...
I'm still getting error :

$ composer global require --prefer-dist laravel/envoy=~1.0 --no-interaction --prefer-dist --quiet
$ envoy run deploy
/bin/bash: line 65: envoy: command not found

This is going to make me crazy! :-/

from oc-bootstrapper.

tobias-kuendig avatar tobias-kuendig commented on August 20, 2024

The shipped .gitlab-ci.yml file is two years old already. When the file was written the default GitLab CI setup was using local shell runners. I'm updating it to work out of the box with the current GitLab configuration.

Could you test if this version works?

deploy:
    image: composer:latest
    only:
        - master
    script:
        - composer global require --prefer-dist laravel/envoy=~1.0 --no-interaction --prefer-dist --quiet
        - /tmp/vendor/bin/envoy run deploy

from oc-bootstrapper.

damsfx avatar damsfx commented on August 20, 2024

Thank's @tobias-kuendig ...
This step pass ! 👍

Now dealing with a new ssh connexion error :

Host key verification failed.

User exist on the server and I can connect to it with the user's ssh public key from a terminal on different's local workstations.
I'm going to investigate more, realy need to heve this tool working.

Every day has his sorrow!

from oc-bootstrapper.

tobias-kuendig avatar tobias-kuendig commented on August 20, 2024

You can try the following (untested with the composer image).

Your private key is missing from the container, thats why you cannot connect to the remote host. You have to create a Pipeline Variable in GitLab called SSH_PRIVATE_KEY that contains your private key.

The private key will be added to the ssh-agent in the container when the pipeline runs.

deploy:
    image: composer:latest
    only:
        - master
    script:
        - eval $(ssh-agent -s)
        - echo "$SSH_PRIVATE_KEY" > /tmp/id_rsa && chmod 400 /tmp/id_rsa && ssh-add /tmp/id_rsa && mkdir -p ~/.ssh
        - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
        - composer global require --prefer-dist laravel/envoy=~1.0 --no-interaction --prefer-dist --quiet
        - /tmp/vendor/bin/envoy run deploy

from oc-bootstrapper.

damsfx avatar damsfx commented on August 20, 2024

You have to create a Pipeline Variable in GitLab called SSH_PRIVATE_KEY that contains your private key.

I already had a variable in GitLab called SSH_PRIVATE_KEY that contains the private key.

Your suggestions for the .gitlab-ci.yml file are perfect ... It work's.

I will now look at how to automate some tasks like backend customization, or other repetitive tasks.
I am also thinking of doing a test on the sharing of certain files common to all sites on the same server.

Thank's a lot for your time! 👍

from oc-bootstrapper.

tobias-kuendig avatar tobias-kuendig commented on August 20, 2024

The new template is now part of release 0.3.2. Thanks for your feedback and testing!

from oc-bootstrapper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.