Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on gitlab ci #3

Open
g-apparence opened this issue Jun 20, 2022 · 1 comment
Open

Error on gitlab ci #3

g-apparence opened this issue Jun 20, 2022 · 1 comment

Comments

@g-apparence
Copy link

Hi,
maybe I'm doing it wront but starting this image is not working using Gitlab

Used this :

deploy-staging:
  stage: deploy
  image: clevercloud/clever-tools:latest
  variables:
    APP_NAME: staging
    APP_ID: XXXXX
 script:
    - clever login --token $CLEVER_TOKEN --secret $CLEVER_SECRET
    - clever link ${APP_ID}
    - clever deploy -a ${APP_NAME}
  environment:
    name: staging
    url: https://staging-server.cleverapps.io

Error :

Using docker image sha256:62b45ec640ad8456d78a38176f2d151df4d8983baa016884ab7d7f80ea28a1b0 for clevercloud/clever-tools:latest with digest clevercloud/clever-tools@sha256:fba465eeafa1a91c8b20239a69dc5725478c619dbc48f70d5e559e958bbc6bf7 ...
Too many arguments: sh
Unknown option: c
Usage: clever

Tried without anything in the script part makes the same result, So I guess it's related directly to the docker image.

@t-fritsch
Copy link

Not sure this is still needed since your issue is quite old, but looking for documentation on the right way to use gitlab-ci with clever-cloud I stumbled upon your issue and this article :

https://k33g.gitlab.io/articles/2020-05-31-CI-CD-CLEVER-EN.html#%F0%9F%96%90%EF%B8%8F-if-you-used-the-gitlab-shared-runner-on-gitlab-com

I've not tested it (I don't use clevercloud docker image) but maybe it'll help someone one day so I leave it here (BTW if someone at clever-cloud reads this, it would be great to have an up to date documentation on the best way to integrate with Gitlab CI since there are many ressources out there)

If you used the GitLab shared runner on GitLab.com

replace:

image: clevercloud/clever-tools:latest

by

image: 
  name: clevercloud/clever-tools:latest
  entrypoint: ["/bin/sh", "-c"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants