[英]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.我在任务的连续性方面遇到了问题,在那里我创建了一个 GitLab-runner 寄存器并从 .gitlab-ci.yml 文件中应用了它创建的寄存器标签正常执行,但是,如果我执行新的提交或任何事情需要运行它,它不会。
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第一张图成功
Code below the file .gitlab-ci.yml文件 .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.解释我想要完成的事情,我需要创建一个管道,每次我提交或更改分支 master 时,我都会在我的 SSH 服务器上执行 git pull,下载更改后的版本后,我将上传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.运行 gitlab runner 的用户无权在构建目录中写入/删除。 Use chown
/ chmod
to change the permissions under /home/gitlab-runner
to ensure the gitlab-runner user has permission to read/write/delete files.使用chown
/ chmod
更改/home/gitlab-runner
下的权限,确保 gitlab-runner 用户具有读/写/删除文件的权限。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.