Issue #349: Make all git setup on the instance user
This patch groups all git-related actions in a single section, and runs them inside the koha-shell. This means all git setup will exist in the instance user, avoiding the usual confusion of devs/testers running things as root and messing up with permissions.
For this test plan, I assume you have KOHA_IMAGE=master-bullseye, tweak accordingly if required (e.g. if you have KOHA_IMAGE=master, etc).
To test:
- Start ktd: $ ktd up -d
- Jump into ktd as instance user: $ ktd --shell
- Look at the /kohadevbox/koha/.git/config/hooks => SUCCESS: All good
- Look at the instance's
.gitconfig
at /var/lib/koha/kohadev/.gitconfig => SUCCESS: All looks good - Build ktd with this changes [1] $ docker build . -f dists/bullseye/Dockerfile -t koha/koha-testing:master-bullseye
- Restart ktd: $ ktd down $ ktd up
- Repeat 2~4 => SUCCESS: No changes
- Jump into root $ ktd --shell --root or $ sudo -s # if you are already in the kshell => SUCCESS: There's no /root/.gitconfig
Signed-off-by: Tomas Cohen Arazi tomascohen@theke.io