Reputation: 1
I'm having a problem with the continuity of the task, where I create a GitLab-runner register and apply from the .gitlab-ci.yml file the register tag created it executes normally, however, if I perform a new commit or anything that needs to run it, it won't.
Image refers to the first job of the job successfully and second and another job of the job with error
Code below the file .gitlab-ci.yml
image: docker:latest
services:
- docker:dind
stages:
- master
build:
stage: master
only:
- master
tags:
- prod
script:
- sudo docker-compose -f docker-compose.yml build --no-cache
- sudo docker-compose -f docker-compose.yml up -d
Explanation of what I want to accomplish, I need to create a pipeline where every time I commit or change the branch master, I perform the git pull on my SSH server, and after downloading the changed version, after doing it, I will upload the application on the docker.
Upvotes: 0
Views: 337
Reputation: 40861
Your runner is not setup appropriately. The user the gitlab runner runs as does not have permission to write/delete in the build directories. Use chown
/chmod
to change the permissions under /home/gitlab-runner
to ensure the gitlab-runner user has permission to read/write/delete files.
Upvotes: 1