Continuous integration 解决Git lab Runner上已存在的远程源错误
我在git lab runner终端出错 我试图通过git runner使用CI CD将我的项目部署到AWS服务器。代码首次成功部署时。如果我再次提交,它将显示上述错误 如果我删除我的跑步者并创建新的跑步者,它将成功部署。 我不知道如何删除已经存在的远程源文件 我的Git.ymlContinuous integration 解决Git lab Runner上已存在的远程源错误,continuous-integration,gitlab,devops,gitlab-ci-runner,cd,Continuous Integration,Gitlab,Devops,Gitlab Ci Runner,Cd,我在git lab runner终端出错 我试图通过git runner使用CI CD将我的项目部署到AWS服务器。代码首次成功部署时。如果我再次提交,它将显示上述错误 如果我删除我的跑步者并创建新的跑步者,它将成功部署。 我不知道如何删除已经存在的远程源文件 我的Git.yml image: docker > > services: > - docker:dind > > stages: > - test > - deploy >
image: docker
>
> services:
> - docker:dind
>
> stages:
> - test
> - deploy
>
> test: stage: test only:
> - master
> script:
> - echo run tests in this section
>
> step-deploy-prod: stage: deploy only:
> - master script:
>
> - sudo docker system prune -f
> - sudo docker volume prune -f
> - sudo docker image prune -f
> - sudo docker-compose build --no-cache
> - sudo docker-compose up -d environment: development
我的Docker文件
FROM node:6 LABEL Aathi <aathi@techardors.com>
>
> RUN apk update && apk add git RUN apk add nodejs RUN apk add nginx
> RUN set -x ; \ addgroup -g 82 -S www-data ; \ adduser -u 82 -D -S
> -G www-data www-data && exit 0 ; exit 1
>
> COPY ./nginx.conf /etc/nginx/nginx.conf
> #COPY ./localhost.crt /etc/nginx/localhost.crt
> #COPY ./localhost.key /etc/nginx/localhost.key COPY ./code/ecom_front_proj /sections WORKDIR sections RUN npm install RUN
> npm install -g @angular/cli RUN ng build --prod
我的nginx文件
user www-data; worker_processes 1; pid /run/nginx.pid;
>
> events { worker_connections 768; # multi_accept on; }
>
> http { sendfile off; tcp_nopush on; tcp_nodelay on;
> keepalive_timeout 65; types_hash_max_size 2048;
>
> include /etc/nginx/mime.types; default_type
> application/octet-stream;
>
> #access_log /var/log/nginx/access.log; #error_log
> /var/log/nginx/error.log;
>
> gzip on; gzip_disable "msie6";
>
> server { #listen 8443 ssl; listen 4200; #server_name
> localhost;
>
> #ssl_certificate localhost.crt; #ssl_certificate_key
> localhost.key;
>
> location / {
> root /sections/dist/sections;
> index index.html;
> }
>
> } }
看起来您运行的是gitlab runner 11.9.0版,它有一个
或者,gitlab runner的安装权限不允许它更改所述路径中的文件结构,考虑或添加这些特权。我已经访问了我的Git跑步者SudoUSEMOD-AG DOCKER GITLASRAND SUDO Nano / ETC/SudoesGITLavaRunall all =所有NopasWD:所有这些都添加到了我的这一行中。SudoersGit runner的哪个版本运行良好,谁能给我一个安装链接。
version: '2'
>
> services: web:
> container_name: nginx
> build: .
> ports:
> - "4200:4200"
> command: nginx -g "daemon off";
> volumes:
> - ./code/ecom_front_proj/dist/sections:/www:ro
user www-data; worker_processes 1; pid /run/nginx.pid;
>
> events { worker_connections 768; # multi_accept on; }
>
> http { sendfile off; tcp_nopush on; tcp_nodelay on;
> keepalive_timeout 65; types_hash_max_size 2048;
>
> include /etc/nginx/mime.types; default_type
> application/octet-stream;
>
> #access_log /var/log/nginx/access.log; #error_log
> /var/log/nginx/error.log;
>
> gzip on; gzip_disable "msie6";
>
> server { #listen 8443 ssl; listen 4200; #server_name
> localhost;
>
> #ssl_certificate localhost.crt; #ssl_certificate_key
> localhost.key;
>
> location / {
> root /sections/dist/sections;
> index index.html;
> }
>
> } }