简体   繁体   中英

Gitlab-runner fails to perform second job

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

First image successfully

First image successfully

Image 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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM