Hello,
I installed Gitlab Runner and after installation I did the following steps:Containers and source repositories are located in another partition and the directory permission is as follows:With this permission the runner cannot work and I have to use the following command:The problem will be solved, but I heard that this will cause problems in the future.
I did the following step:After this, the runner can't copy files in the directory again.
The content of the .gitlab-ci.yml file is as follows:What is wrong?
Thank you.
I installed Gitlab Runner and after installation I did the following steps:
Code:
$ sudo usermod -aG docker gitlab-runner$ sudo nano /etc/sudoersgitlab-runner ALL=(ALL) NOPASSWD: ALL
Code:
# ls -ltotal 20drwxrwxr-x 5 root root 4096 Apr 22 09:22 partitiondrwxrwx--- 2 root root 16384 Apr 9 16:50 lost+found
Code:
# chown -R gitlab-runner /mnt/partition
I did the following step:
Code:
# chown -R root /mnt/partition# groupadd runner# /sbin/usermod -a -G runner gitlab-runner# /sbin/usermod -a -G runner root# chgrp -R runner /mnt/partition/# chmod -R g+rwx /mnt/partition/
The content of the .gitlab-ci.yml file is as follows:
Code:
stages: - build - deploybuild-test: stage: build script: - rm -rf node_modules - mkdir -p node_modules/ - rm -rf /mnt/partition/containers/test - cd /mnt/partition/containers/ - git clone http://jason:PASS@192.168.1.2/project/test.gitdeploy-test: stage: deploy script: - cd /mnt/partition/containers/YAML - docker compose up -d test
Thank you.
Statistics: Posted by jasonnix — 2024-04-26 16:26 — Replies 5 — Views 97