Closed ffo9 closed 1 month ago
Here's the code it fails on:
In my gitlab-ci before_script
the statement succeeds however:
$ git rev-parse --is-inside-work-tree
true
Okay, when you mount a git repository onto a docker container, this problem can occur. The fix for this was to change the command executed in the docker container:
LINT_CMD ?= /bin/bash -c 'git config --global --add safe.directory /data; ct lint-and-install;'
Not a bug
Is this a request for help?: Yes
Is this a BUG REPORT or FEATURE REQUEST? (choose one): n/a
Version of Helm and Kubernetes:
What happened:
Running ct as a docker container in Gitlab-ci fails due to git-related errors. I added some git commands at the start of the job to see git output. Can someone point out the problem
What you expected to happen: Locally it runs successfully, but not gitlab ci.
How to reproduce it (as minimally and precisely as possible):
Gitlab-ci.yaml
Makefile:
ct.yaml
Anything else we need to know: