Hello, I have a question regarding the integration...
# help
g
Hello, I have a question regarding the integration of Infracost in a Gitlab CI. Currently, I have an error that I don't understand: for the command (infracost comment gitlab), I received: 'Error: required flag(s) "gitlab-token", "repo" not set' But when I echo the command, all variables have the right values and my access token has the api scope and the owner role.
m
hey @green-carpet-57925 could you post the
infracost comment
command you are running?
g
Copy code
I have used the command present on the site : <https://gitlab.com/infracost/infracost-gitlab-ci>                                 - infracost comment gitlab --path=infracost.json \
                              --repo=$CI_PROJECT_PATH \
                              --merge-request=$CI_MERGE_REQUEST_IID \
                              --gitlab-server-url=$CI_SERVER_URL \
                              --gitlab-token=$GITLAB_TOKEN \
                              --behavior=update
m
so two follow up questions: 1. If you echo the
$GITLAB_TOKEN
and
$CI_PROJECT_PATH
, they are both set? 2. Can you make sure there’s no whitespacing issue with the flags, i.e.
--gitlab-token=$GITLAB_TOKEN--behavior=update
g
Thank you, it was a whitespacing issue! 🙂
It works fine, now!!!