gitlab-ci-runner

Conflict. The container name “/gitlab-runner” is already in use by container

若如初见. 提交于 2019-12-19 10:34:51
问题 I'm following this guide to install docker for my GitLab server running on Ubuntu 16.4. When I execute the following command: docker run -d --name gitlab-runner --restart always \ -v /srv/gitlab-runner/config:/etc/gitlab-runner \ -v /var/run/docker.sock:/var/run/docker.sock \ gitlab/gitlab-runner:latest So far so good. However, when I run the next command to register the runner from this guide: docker run --rm -t -i -v /srv/gitlab-runner/config:/etc/gitlab-runner --name gitlab-runner gitlab

GitLab runner unable to clone repository via http

主宰稳场 提交于 2019-12-19 06:29:56
问题 I have the latest docker image of GitLab running in a test environment and I'm running into an issue with the GitLab runner. It's unable to clone via the HTTP link, yielding the following message: Running on runner-bd27e50b-project-1-concurrent-0 via machine... Cloning repository... Cloning into '/builds/my/awesome-project'... fatal: unable to access 'http://gitlab-ci-token:xxxxxx@127.0.0.1/my/awesome-project.git/': Failed to connect to 127.0.0.1 port 80: Connection refused ERROR: Build

GitLab runner unable to clone repository via http

ⅰ亾dé卋堺 提交于 2019-12-19 06:29:07
问题 I have the latest docker image of GitLab running in a test environment and I'm running into an issue with the GitLab runner. It's unable to clone via the HTTP link, yielding the following message: Running on runner-bd27e50b-project-1-concurrent-0 via machine... Cloning repository... Cloning into '/builds/my/awesome-project'... fatal: unable to access 'http://gitlab-ci-token:xxxxxx@127.0.0.1/my/awesome-project.git/': Failed to connect to 127.0.0.1 port 80: Connection refused ERROR: Build

Multiline YAML string for GitLab CI (.gitlab-ci.yml)

醉酒当歌 提交于 2019-12-18 03:01:39
问题 I'm trying to write a gitlab-ci.yml file which uses a multi-line string for the command. However, it seems like it is not being parsed. I've tried both the - | and - > with identical results. stages: - mystage Build: stage: mystage script: - | echo -e " echo 'hi'; echo 'bye'; " When it tries to run, it only shows echo -e ' as the script to run, and not the whole multiline string. This causes issues for me. What would be the correct syntax to write something like this? 回答1: TL;DR; You want to

Multiline YAML string for GitLab CI (.gitlab-ci.yml)

蓝咒 提交于 2019-12-18 03:01:12
问题 I'm trying to write a gitlab-ci.yml file which uses a multi-line string for the command. However, it seems like it is not being parsed. I've tried both the - | and - > with identical results. stages: - mystage Build: stage: mystage script: - | echo -e " echo 'hi'; echo 'bye'; " When it tries to run, it only shows echo -e ' as the script to run, and not the whole multiline string. This causes issues for me. What would be the correct syntax to write something like this? 回答1: TL;DR; You want to

GitLab private runner stuck on npm install

孤街浪徒 提交于 2019-12-13 20:23:56
问题 I'm trying to set up a CI pipeline on GitLab.com using a private runner instead of a shared one. The project uses Node, so I'm using a node:6 image. The .gitlab-ci.yml looks like this: image: node:6 stages: - test javascript_tests: stage: test script: - npm install - npm run test:unit when: always The runner stays on "running" stage for about 30 minutes and only then started to output something relevant: npm ERR! fetch failed http://10.252.156.164:4880/@types%2fjsforce/-/jsforce-1.9.2.tgz npm

Why does changing the linking order fix some linking errors on one system?

為{幸葍}努か 提交于 2019-12-13 17:50:22
问题 So I had this strange behavior with GitLab CI. I got it working but now I am wondering why it works. First of all I was starting with GitLab CI. I got a local runner with docker on my machine (Arch Linux), so that I can test without pushing and waiting. I wrote a test with the googletest framework (Just an assert true). I triggered the script locally and everything worked. All tests passed in the local docker image. So now, when everything was working, I pushed to the repository and a runner

gitlab ci failing with custom runner

别来无恙 提交于 2019-12-13 17:40:30
问题 I'm trying to create a custom gitlab-runner to run a docker process, following: https://github.com/gitlabhq/gitlabhq/blob/master/doc/ci/docker/using_docker_build.md I tried the second approach in which I registered a runner using: sudo gitlab-runner register -n \ --url https://gitlab.com/ \ --registration-token xxx \ --executor docker \ --description "My Docker Runner" \ --docker-image "docker:stable" \ --docker-volumes /var/run/docker.sock:/var/run/docker.sock However,at gitlab, whenever the

Change Gitlab CI Runner user

拟墨画扇 提交于 2019-12-13 11:32:39
问题 Currently when I start a build in GitlabCI it is running under gitlab-runner user. I want to change it the company's internal user. I didn't find any parameter to the /etc/gitlab-runner/config.toml which is solve that. My current configuration: concurrent = 1 [[runners]] name = "deploy" url = "" token = "" executor = "shell" 回答1: Running ps aux you can see: /usr/bin/gitlab-ci-multi-runner run --working-directory /home/gitlab-runner --config /etc/gitlab-runner/config.toml --service gitlab

Gitlab CI: running the same set of tests on several machines

我只是一个虾纸丫 提交于 2019-12-13 01:59:47
问题 In high performance computing is crucial to have a code tested against many different architectures/compilers: from a laptop to a supercomputer. Assuming that we have N testing machines/ workers (each one running gitlab-ci-runner ); M tests , what shall be the correct layout of .gitlab-ci.yml to ensure that each of the N machines runs all the tests? Looks to me that adding just more workers ends up in a round-robin like assignment of the jobs. Thanks for your help. 回答1: You could use tags in