Document Jenkins git cache and docker.sock troubleshooting
This commit is contained in:
parent
b2fe6695a0
commit
e9cbc9f88f
1 changed files with 29 additions and 0 deletions
|
|
@ -54,3 +54,32 @@ Install the **Gitea** plugin in Jenkins, then use **Gitea** as the branch source
|
||||||
- Archives `dist/docker-compose.coolify.yml`
|
- Archives `dist/docker-compose.coolify.yml`
|
||||||
|
|
||||||
This validates the repo; **Coolify deploy is separate**.
|
This validates the repo; **Coolify deploy is separate**.
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
### `fatal: not in a git directory` (branch indexing)
|
||||||
|
|
||||||
|
Usually a **corrupt Jenkins git cache** after changing container user. In the **jenkins** container terminal (Coolify):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
rm -rf /var/jenkins_home/caches/git-*
|
||||||
|
chown -R jenkins:jenkins /var/jenkins_home
|
||||||
|
```
|
||||||
|
|
||||||
|
Then **Scan Repository Now** on the multibranch job.
|
||||||
|
|
||||||
|
### `permission denied` on `/var/run/docker.sock`
|
||||||
|
|
||||||
|
Jenkins must be in the host **docker** group. On the Coolify host:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
stat -c '%g' /var/run/docker.sock
|
||||||
|
```
|
||||||
|
|
||||||
|
Set that number as `DOCKER_GID` on the **jenkins** Coolify service (default `999`), redeploy Jenkins, rebuild.
|
||||||
|
|
||||||
|
Do **not** run Jenkins as `user: 0:0` — it breaks `jenkins_home` ownership and git caches.
|
||||||
|
|
||||||
|
### Always use **Build Now** on `main`, not **Rebuild** on old builds
|
||||||
|
|
||||||
|
Old rebuilds replay old commits with old `Jenkinsfile` content.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue