gitlab-ci-runner

Error uploading artifacts to coordinator

穿精又带淫゛_ 提交于 2021-02-20 03:56:49
问题 I’ve been having some fun setting up GitLab and after spending quite a while hacking away at it, I’ve become relatively used to setting it up, now having done that on two machines, the second time around with much more ease than originally… However, I am faced with a rather large problem, on both machines: My CI pipeline is broken. Somehow, somewhere, my setup is providing a 403 to artifacts once builds are completed, meaning that each and every job that ever technically succeeds will only be

How to run Gitlab CI jobs in the same instance

无人久伴 提交于 2021-02-10 14:20:58
问题 I have autoscaled the gitlab-runner on AWS spot instances. And it works fine. And I have an issue when running the jobs. Below is my .gitlab-ci.yml and it has two stages. stages: - build - dev1:build build: stage: build script: - docker build --rm -t broker-connect-dev1-${CI_COMMIT_SHORT_SHA} -f BrokerConnect/Dockerfile . only: - dev1/release tags: - itela-spot-runner build-dev1: stage: dev1:build script: - docker tag broker-connect-dev1-${CI_COMMIT_SHORT_SHA}:latest 19950818/broker-connect:$

What is the result of mounting `/var/run/docker.sock` in a Docker in Docker scenario?

我只是一个虾纸丫 提交于 2021-02-08 19:22:32
问题 I've read Can anyone explain docker.sock to understand what /var/run/docker.sock does, but its use in GitLab CI's Use Docker socket binding has me confused. Here is their example command for the gitlab-runner registration: sudo gitlab-runner register -n \ --url https://gitlab.com/ \ --registration-token REGISTRATION_TOKEN \ --executor docker \ --description "My Docker Runner" \ --docker-image "docker:19.03.12" \ --docker-volumes /var/run/docker.sock:/var/run/docker.sock I see two places that

Gitlab shared runner set concurrence for each project

生来就可爱ヽ(ⅴ<●) 提交于 2021-02-08 05:30:45
问题 A shared runner is used by dozens of our project. I set concurrent = 5 in config.toml, so my runner can do 5 job concurrently for all project. For example, the following scenario:3 job for A project, 2 job for B project, 0 job for C project which causes C project should wait for at least 1 job of A or B project being finished until it starts first job. I want to set like "all project concurrent = 5 " and "each project concurrent = 2 ". Is there any way to deal with it? 回答1: There is an open

Distribute Gitlab pipeline across different clients

╄→гoц情女王★ 提交于 2021-02-08 03:44:06
问题 I have a pipeline, where some tasks can only be processed by certain clients. For instance, some clients can only perform certain tests, where other clients are used to compile. Can I distribute my pipeline chain across different clients? For instance: /--- Testing (test-client-1)--\ Build (build-client-1)--+ +-- Package (build-client-1) \--- Testing (test-client-2)--/ 回答1: You can assign specific tasks to different runners, using tags: see runners/#using-tags and README.html#tags job: tags:

Catching SIGTERM from alpine image

元气小坏坏 提交于 2021-02-07 20:24:07
问题 I was trying to catch SIGTERM signal from a docker instance (basically when docker stop is called) but couldn't find a way since I have different results for each try I performed. Following is the setup I have Dockerfile FROM gitlab/gitlab-runner:alpine COPY ./start.sh /start.sh ENTRYPOINT ["/start.sh"] start.sh #!/bin/bash deregister_runner() { echo "even if nothing happened, something happened" exit } trap deregister_runner SIGTERM while true; do sleep 10 done Now I build the docker image $

Gitlab-runner Interactive Web Terminals not connected

蓝咒 提交于 2021-01-29 18:40:36
问题 I have installed successfully a gitlab-runner on a VM, and it is used by some of my projects. I would like to use the Interactive Web Terminal to have a chance to debug when some pipeline fails. I'm trying to configure my config.toml file, following this docu of gitlab but i'm not understanding wich ip addess i should use in the setting listen_address . Should it be the ip of the running machine? The docker container instance? Or what? Here is my current configuration: concurrent = 2 check

Docker error during connect: Post http://docker:2375/v1.40/build?

早过忘川 提交于 2021-01-29 09:41:51
问题 I am using docker+machine to run my gitlab ci/cd jobs. So my .gitlab-ci.yml looks like below: stages: - RUN_TESTS image: name: docker:stable services: - name: docker:dind variables: DOCKER_HOST: tcp://docker:2375/ DOCKER_DRIVER: overlay2 DOCKER_TLS_CERTDIR: "" build-docker: stage: RUN_TESTS script: - echo "Running the tests..." - docker build -t run-tests . This works totally fine with docker:dind image set as the service block as shown above. Now here comes the fun part, I need some other

Gitlab-runner in docker-compose cannot connect http://docker:2375/v1.40/info

纵然是瞬间 提交于 2021-01-28 00:31:26
问题 Short story: I have a gitlab-runner in a docker-compose and I want to be able to use DIND, but I'm facing some difficulties.... I try to create a platform which contains : a sonar gitlab ce gitlab runner a registry Theses services are started and managed by docker-compose I use the gitlab-ci to verify tests, coverage and create a docker image which is uploaded to the registry I have a single shared runner which work for testing purpose here is the config.toml : concurrent = 1 check_interval =

Gitlab-runner without Docker

旧时模样 提交于 2021-01-27 12:54:17
问题 I've installed gitlab-runner on ubuntu 16.04 I've set Executor=shell My project is hosted on gitlab.com with a very simple yaml config file : dev: script: - pwd I am not willing to user Docker for the moment Why is the job's log is mentioning docker ? Using Docker executor with image ruby:2.5 ... Pulling docker image ruby:2.5 ... Using docker image ... for ruby:2.5 ... Why is it mentioning a path that does not exist when executing pwd ? $ pwd /builds/my_gitlab_name/my_project_name 回答1: @Sam