gitlab-runner issueshttps://gitlab.com/gitlab-org/gitlab-runner/-/issues2023-08-22T18:19:24Zhttps://gitlab.com/gitlab-org/gitlab-runner/-/issues/2313unregister ignores config.toml2023-08-22T18:19:24ZOlaf Klischatunregister ignores config.tomlgitlab-ci-multi-runner 1.11.1.
I have a valid `/etc/gitlab-runner/config.toml` (which was created automatically by `gitlab-ci-multi-runner register --name xx --executor xx --url xx --tag-list xx --registration-token xx`) containing corr...gitlab-ci-multi-runner 1.11.1.
I have a valid `/etc/gitlab-runner/config.toml` (which was created automatically by `gitlab-ci-multi-runner register --name xx --executor xx --url xx --tag-list xx --registration-token xx`) containing correct name, url and token values.
`gitlab-ci-multi-runner unregister` won't use it at all. Even `gitlab-ci-multi-runner unregister -c /etc/gitlab-runner/config.toml` won't, which definitely looks like a bug to me. You have to pass --url, --token and --name to unregister to make it work.
```
root@cirunner-docker:~# gitlab-ci-multi-runner unregister
Running in system-mode.
ERROR: Deleting runner... error status=only http or https scheme supported
FATAL: Failed to delete runner
root@cirunner-docker:~#
root@cirunner-docker:~# gitlab-ci-multi-runner unregister -c /etc/gitlab-runner/config.toml
Running in system-mode.
ERROR: Deleting runner... error status=only http or https scheme supported
FATAL: Failed to delete runner
root@cirunner-docker:~#
root@cirunner-docker:~# gitlab-ci-multi-runner unregister --url https://xxxxx --token xxx
Running in system-mode.
ERROR: Deleting runner... forbidden runner=6LPdrR3y
FATAL: Failed to delete runner
root@cirunner-docker:~#
root@cirunner-docker:/home/ubuntu# gitlab-ci-multi-runner unregister --url https://xxxxx --token xxx --name xxxx
Running in system-mode.
Deleting runner... succeeded runner=ecf65f78
Updated /etc/gitlab-runner/config.toml
root@cirunner-docker:~#
```Backloghttps://gitlab.com/gitlab-org/gitlab-runner/-/issues/2400Error response from daemon: endpoint with name XXX already exists in network ...2023-08-22T18:19:25ZPeter BuriError response from daemon: endpoint with name XXX already exists in network bridgeI think the #1642 bug is back in gitlab-ci-multi-runner 9.1.0 or somehow this is related to that. (Previously we had that bug as well.)
> Summarize the bug encountered concisely
After one of the pipeline dies, all the next ones are fai...I think the #1642 bug is back in gitlab-ci-multi-runner 9.1.0 or somehow this is related to that. (Previously we had that bug as well.)
> Summarize the bug encountered concisely
After one of the pipeline dies, all the next ones are failing.
> How one can reproduce the issue - this is very important
After a while one of the pipelines died right after finishing successfully the test:
```
...
ERROR: Job failed (system failure): Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
```
After then every pipeline dies:
```
Running with gitlab-ci-multi-runner 9.1.0 (0118d89)
on xxxx (xxx)
Using Docker executor with image xxxx ...
Using docker image xxxx for predefined container...
WARNING: Possibly zombie container runner-196bff67-project-127-concurrent-1-predefined is disconnected from network bridge
Pulling docker image xxxx ...
Using docker image xxxx ID=xxx for build container...
ERROR: Job failed (system failure): Error response from daemon: endpoint with name runner-196bff67-project-127-concurrent-1-predefined already exists in network bridge
```
or
```
ERROR: Job failed (system failure): Error response from daemon: endpoint with name runner-196bff67-project-127-concurrent-0-predefined already exists in network bridge
```
There is no running pipeline:
```
root@xxxx # docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
713b60852b1b minio/minio:latest "go-wrapper run se..." 6 months ago Up About an hour 0.0.0.0:9005->9000/tcp minio
```
I cannot list that network bridge:
```
root@xxxx # docker network ls
NETWORK ID NAME DRIVER SCOPE
2a9a9f88f8b7 bridge bridge local
6b9f08506376 host host local
9b4f1ecf5c1c none null local
```
The same happens after ```docker network prune```
## Environment description
docker info
```
Containers: 21
Running: 1
Paused: 0
Stopped: 20
Images: 16
Server Version: 17.04.0-ce
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 277
Dirperm1 Supported: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary:
containerd version: 422e31ce907fd9c3833a38d7b8fdd023e5a76e73
runc version: 9c2d8d184e5da67c95d601382adf14862e4f2228
init version: 949e6fa
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 3.12.0-7-generic
Operating System: Ubuntu 16.04.2 LTS
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 7.552GiB
Name: nci
ID: DIDT:JASO:SC6M:I4EP:YOMT:2WMA:GJFS:ZOMT:K4NA:QPGR:PFC5:3MRB
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
```
### Used GitLab Runner version
```
Version: 9.1.0
Git revision: 0118d89
Git branch: 9-1-stable
GO version: go1.7.5
Built: Fri, 21 Apr 2017 14:32:04 +0000
OS/Arch: linux/amd64
```Backloghttps://gitlab.com/gitlab-org/gitlab-runner/-/issues/2422Debian package seems to overwrite the service config2023-11-08T07:07:32ZAlexander MenkDebian package seems to overwrite the service config## Summary
> Summarize the bug encountered concisely
## Steps to reproduce
gitlab-runner uninstall
gitlab-runner install --user www-data -d "/var/www/html/example/web"
gitlab-runner stop
gitlab-runner start
ps aux...## Summary
> Summarize the bug encountered concisely
## Steps to reproduce
gitlab-runner uninstall
gitlab-runner install --user www-data -d "/var/www/html/example/web"
gitlab-runner stop
gitlab-runner start
ps aux|grep runner
root 30841 2.3 0.5 53652 22088 ? Ssl 16:20 0:00 /usr/bin/gitlab-ci-multi-runner run --working-directory /var/www/html/example/web --config /etc/gitlab-runner/config.toml --service gitlab-runner --syslog --user www-data
apt-get upgrade
# upgrades from gitlab-ci-multi-runner:amd64 (9.0.2, 9.1.0) as shown in the apt/history.log
## Actual behavior
The `/etc/systemd/system/gitlab-runner.service` was overwritten
## Expected behavior
The service file shall not be touched
There was no interaction during the upgrade (it did not ask to replace the config file). It just was replaced
## Environment description
Ubuntu 16.04.2 LTS
### Used GitLab Runner version
9.0.2 -> 9.1.0
gitlab-runner --version
Version: 9.1.0
Git revision: 0118d89
Git branch: 9-1-stable
GO version: go1.7.5
Built: Fri, 21 Apr 2017 14:32:04 +0000
OS/Arch: linux/amd64Backloghttps://gitlab.com/gitlab-org/gitlab-runner/-/issues/2457`artifacts: untracked: true` doesn't include submodules2022-08-01T20:43:29ZJonathon Reinhartjonathon.reinhart@gmail.com`artifacts: untracked: true` doesn't include submodules## Description
Given this [`.gitlab-ci.yml`](https://gitlab.com/help/ci/yaml/README.md#artifacts):
```yaml
job:
artifacts:
untracked: true
```
One would expect that *all* untracked files would be uploaded. However, this currently...## Description
Given this [`.gitlab-ci.yml`](https://gitlab.com/help/ci/yaml/README.md#artifacts):
```yaml
job:
artifacts:
untracked: true
```
One would expect that *all* untracked files would be uploaded. However, this currently does not include untracked files in submodules. This is because [`git ls-files -o` is used](https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/2a6f728e2b2b809c3664e9b1c4e7075fc8fa5361/commands/helpers/file_archiver.go#L140) to find the untracked files.
## Proposal
The solution to this would be to also include the output of `git submodule --quiet foreach --recursive git ls-files -o` when building the list of untracked files.Backloghttps://gitlab.com/gitlab-org/gitlab-runner/-/issues/1842Problem building with docker-in-docker using gitlab Registry Container with s...2023-09-09T20:45:31ZFrancesco DurantiProblem building with docker-in-docker using gitlab Registry Container with self-signed certificateHi, I have a problem with this configuration.
It seems that from a dind container running from gitlab-runner I'm not able to run docker login against my gitlab Registry Container. It work if I run the docker login from the host (also fr...Hi, I have a problem with this configuration.
It seems that from a dind container running from gitlab-runner I'm not able to run docker login against my gitlab Registry Container. It work if I run the docker login from the host (also from gitlab runner), from a docker with socket configuration or manually running the docker:dind container mounting local /etc/certs.d into the contained.
My configuration include:
rhel7.2
gitlab 8.13.1
gitlab-ci-multi-runner-1.7.1-1.x86_64
docker-engine-1.12.3-1.el7.centos.x86_64
gitlab (and registry) are configured for https (with http redirection) with a self signed certificate on the same hostname (registry on port 5500)
On the gitlab-runner/docker server I've configured the certificate in the server trusted certificate and in the /etc/docker/certs.d/registryserverhost:5500 directory.
Running docker login work correctly from the host:
```
docker login registryserver:5500
Username (user):
Password:
Login Succeeded
```
If i start a contained with docker:dind and dont' mount the /etc/docker/certs.d I get certificate error (same error I get from gitlab runner):
```
[root@server]# docker run --privileged -d docker:dind
c54ffb48a0e52c5180b436f001d060558cc3d567c123894bf8362ced22b99e1d
[root@server]# docker exec c54ffb48a0e52c5180b436f001d060558cc3d567c123894bf8362ced22b99e1d docker login -u user -p password registryserver:5500
Error response from daemon: Get https://registryserver:5500/v1/users/: x509: certificate signed by unknown authority
```
If I mount the /etc/docker/certs.d into my docker:dind container it work correctly:
```
[root@server]# docker run -v /etc/docker/certs.d/:/etc/docker/certs.d --privileged -d docker:dind
7190ca51b735a302f86bf777761309206801d6398f1795474b1d038339bcfa3c
[root@server]# docker exec 7190ca51b735a302f86bf777761309206801d6398f1795474b1d038339bcfa3c docker login -u user -p password registryserver:5500
Login Succeeded
```
I've configured the dind gitlab-runner as explained in this document: https://docs.gitlab.com/ce/ci/docker/using_docker_build.html
I have this configuration in the runner (trying to mount the /etc/docker/certs.d directory as I'm doing manually but it don't work:
```
[[runners]]
name = "dind"
url = "https://server/ci"
token = "token"
executor = "docker"
[runners.docker]
tls_verify = false
image = "docker:latest"
privileged = true
disable_cache = false
volumes = ["/cache", "/etc/docker/certs.d:/etc/docker/certs.d"]
[runners.cache]
```
My .gitlab-ci.yml script is something like this:
```
image: docker:latest
services:
- docker:dind
before_script:
- docker info
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registryserver:5500
variables:
CONTAINER_DIND_IMAGE: registryserver:5500/testgroup/testwebserver:dind
build_dind:
stage: build
script:
- docker build --pull -t $CONTAINER_DIND_IMAGE .
- docker push $CONTAINER_DIND_IMAGE
- echo "----------------------------------------"
tags:
- dind
```
When it run I get the login error:
$ docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registryserver:5500
Error response from daemon: Get https://registryserver:5500/v1/users/: x509: certificate signed by unknown authority
Those are the information I got from the containers created by gitlab-runner (I've put a sleep command before the docker login so I can try to run commands manually). This is what I get:
```
List of the container running on the server (started from gitlab-runner)
[root@server]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
58c70f60ea41 1aed5271702d "docker-entrypoint.sh" 8 seconds ago Up 6 seconds runner-2c21ca3d-project-20-concurrent-0-build
3d8f8788e4f6 36ddb0269e3e "dockerd-entrypoint.s" 12 seconds ago Up 11 seconds 2375/tcp runner-2c21ca3d-project-20-concurrent-0-docker
```
Running the docker login on the 2 container I get that docker daemon is running in one of them (the docker:dind ?) and not on the other (docker:latest ?) so on one I get the login error and on the other one i get the error that docker is not running on the host.
```
[root@server]# docker exec 58c70f60ea41 docker login -u user -p password registryserver:5500
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
[root@server]# docker exec 3d8f8788e4f6 docker login -u user -p password registryserver:5500
Error response from daemon: Get https://registryserver:5500/v1/users/: x509: certificate signed by unknown authority
```
Checking if my directory is mounted I see that it is only on the machine where docker daemon is not running (probably it's correct as it's mounted on the docker:latest that is the image) and this create my problem.
```
[root@server]# docker exec 3d8f8788e4f6 ls -laR /etc/docker/
/etc/docker/:
total 8
drwx------ 2 root root 21 Oct 31 08:40 .
drwxr-xr-x 18 root root 4096 Oct 31 08:40 ..
-rw------- 1 root root 244 Oct 31 08:40 key.json
[root@server]# docker exec 58c70f60ea41 ls -laR /etc/docker/
/etc/docker/:
total 8
drwxr-xr-x 3 root root 20 Oct 31 08:40 .
drwxr-xr-x 17 root root 4096 Oct 31 08:40 ..
drwxr-xr-x 3 root root 4096 Oct 30 17:15 certs.d
/etc/docker/certs.d:
total 8
drwxr-xr-x 3 root root 4096 Oct 30 17:15 .
drwxr-xr-x 3 root root 20 Oct 31 08:40 ..
drwxr-xr-x 2 root root 4096 Oct 30 17:16 registryserver:5500
/etc/docker/certs.d/registryserver:5500:
total 12
drwxr-xr-x 2 root root 4096 Oct 30 17:16 .
drwxr-xr-x 3 root root 4096 Oct 30 17:15 ..
-rw-r--r-- 1 root root 1440 Oct 30 17:25 ca.crt
```
This is the docker info on the container where docker daemon is running:
```
[root@server]# docker exec 3d8f8788e4f6 docker info
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 1.12.2
Storage Driver: vfs
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: null host bridge overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: seccomp
Kernel Version: 3.10.0-327.18.2.el7.x86_64
Operating System: Alpine Linux v3.4 (containerized)
OSType: linux
Architecture: x86_64
CPUs: 2
WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled
Total Memory: 15.67 GiB
Name: 3d8f8788e4f6
ID: SVA2:MG3R:74OZ:ZGBM:BMLU:ZY3U:EVZQ:4A5A:LJJL:5OK5:XEMF:DWMI
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Insecure Registries:
127.0.0.0/8
```
I'm not sure I'm doing everything correctly but running the same integration on a runner defined as script or using docker-socket method described in the documentation works correctly. The only configuration not working is the one with docker-in-docker.
Can someone help me with this configuration?Backloghttps://gitlab.com/gitlab-org/gitlab-runner/-/issues/1038Concurrent jobs on docker runner fail2023-08-22T18:19:22ZFabio TodaroConcurrent jobs on docker runner fail# Steps to reproduce:
- 1 shared runner docker with limit 0
- 2 jobs of the same stage (I.E. build)
The runner launches both concurrently and docker crash.
# Output
## 1st Job
```
gitlab-ci-multi-runner 1.0.1 (cffb5c7)
Using Docker ...# Steps to reproduce:
- 1 shared runner docker with limit 0
- 2 jobs of the same stage (I.E. build)
The runner launches both concurrently and docker crash.
# Output
## 1st Job
```
gitlab-ci-multi-runner 1.0.1 (cffb5c7)
Using Docker executor with image node:wheezy ...
Pulling docker image node:wheezy ...
ERROR: Build failed with: container already exists
```
## 2nd Job
```
gitlab-ci-multi-runner 1.0.1 (cffb5c7)
Using Docker executor with image node:wheezy ...
Pulling docker image node:wheezy ...
ERROR: Build failed with: API error (404): no such id: aa48e2410d612b7e6a333a5f56238d2d5cd7c2403a626109e2da91e879ca7b0b
```Backloghttps://gitlab.com/gitlab-org/gitlab-runner/-/issues/2611limit parameter in runner config.toml is ignored2024-03-13T22:22:43ZJoe Conwaylimit parameter in runner config.toml is ignored## Summary
limit parameter in runner config.toml is ignored whilst using the following config file and .gitlab-ci.yaml file, I get multiple jobs running in parallel on the same runner in spite of defining the 'limit' parameter on my run...## Summary
limit parameter in runner config.toml is ignored whilst using the following config file and .gitlab-ci.yaml file, I get multiple jobs running in parallel on the same runner in spite of defining the 'limit' parameter on my runner.
## Steps to reproduce
Use the following config.toml and gitlab-ci.yaml and the stage 'test' will run multiple times in parallel.
```
$ cat ~/.gitlab-runner/config.toml
concurrent = 1
check_interval = 0
[[runners]]
name = "ios-gitlab-ci"
url = "redacted"
token = "redacted"
executor = "shell"
limit = 1
[runners.cache]
$ cat .gitlab-ci.yml
stages:
- nightly
- test
- beta
before_script:
- source /usr/local/share/chruby/chruby.sh
- chruby ruby 2.3.1
- export PATH=$PATH:/usr/local/bin
deploy_nightly:
stage: nightly
only:
- development
script:
- ./jenkins.sh
tags:
- ios
test_project:
stage: test
script:
- fastlane test
tags:
- ios
artifacts:
paths:
- ./test-output/*
when: always
deploy_beta:
stage: beta
only:
- /^release_.*$/
- tags
except:
- branches
script:
- fastlane beta
variables:
FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT: "60"
```
## Actual behavior
More than one job will run at once. Because this happens in the same git working copy, all parallel running builds will break each other resulting in me having to limit all jobs to a single git branch in order to have a function Gitlab CI
## Expected behavior
Jobs should be listed as pending whilst only a single job per runner executes.
## Relevant logs and/or screenshots
![Screen_Shot_2017-07-18_at_9.20.15_PM](/uploads/7973c7a8a183ca9e902ceefff8510d8a/Screen_Shot_2017-07-18_at_9.20.15_PM.png)
## Environment description
The runner in question is a specific runner locked to a specific project. The runner is running in user mode on MacOS 10.12.5
Gitlab:
GitLab Enterprise Edition 9.2.2-ee b004167
### Used GitLab Runner version
gitlab-runner:
```
$ gitlab-runner --version
Version: 9.3.0
Git revision: 3df822b
Git branch: 9-3-stable
GO version: go1.7.5
Built: Thu, 22 Jun 2017 10:57:56 +0000
OS/Arch: darwin/amd64
```17.1https://gitlab.com/gitlab-org/gitlab-runner/-/issues/2711Dedicated CI Runner stops responding and seems to hang but finish the job any...2023-08-22T18:19:26ZSeriousMDedicated CI Runner stops responding and seems to hang but finish the job anyway with success## Summary
A docker build running on my own ci runner completes (I see the result in the gitlab registry) but the ci runner doesn't signal a finish nor sends logs after a few minutes.
## Steps to reproduce
- Start this `https://gitlab...## Summary
A docker build running on my own ci runner completes (I see the result in the gitlab registry) but the ci runner doesn't signal a finish nor sends logs after a few minutes.
## Steps to reproduce
- Start this `https://gitlab.com/bipio/docker/blob/master/Dockerfile` on a dedicated runner in the described environment.
## Actual behavior
The runner completes on the machine and pushes the docker image to the registry, but does not report any success signal to gitlab.com so that the build seems to hang which is not true.
## Expected behavior
The runner should keep posting the logs and signal success when done.
## Relevant logs and/or screenshots
### Logs
#### ...of a shared runner from gitlab.com that worked as expected
https://gitlab.com/bipio/docker/-/jobs/30739078
File: https://gitlab.com/bipio/docker/-/jobs/30739078/raw
#### ...of gitlab.com job execution that stopped responding
https://gitlab.com/bipio/docker/-/jobs/30745455
```
Running with gitlab-ci-multi-runner 9.5.0 (413da38)
on win-runner (4bee240f)
Using Docker executor with image docker:latest ...
Starting service docker:dind ...
Pulling docker image docker:dind ...
Using docker image docker:dind ID=sha256:7731e67e3def0af852ea8ab3788063fc640ce359d399b86fe5a009e6d814f625 for docker service...
Waiting for services to be up and running...
Using docker image sha256:1286a5b8c7033347b9fc47b23564349e200ad23b935dba46cbdf63497a9821ca for predefined container...
Pulling docker image docker:latest ...
Using docker image docker:latest ID=sha256:be47faef67c2e5950a540799e72189867b517010ad8ef98aa0181878d81b0064 for build container...
Running on runner-4bee240f-project-4026289-concurrent-0 via WSDEV31...
Cloning repository...
Cloning into '/builds/bipio/docker'...
Checking out c1276319 as master...
Skipping Git submodules setup
$ docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
Login Succeeded
$ docker build --pull -t "$CI_REGISTRY_IMAGE" .
Sending build context to Docker daemon 166.9kB
Step 1/22 : FROM node:6.11.2
6.11.2: Pulling from library/node
ad74af05f5a2: Pulling fs layer
2b032b8bbe8b: Pulling fs layer
a9a5b35f6ead: Pulling fs layer
49fb60496f63: Pulling fs layer
3894583bc464: Pulling fs layer
321f9e1d7334: Pulling fs layer
1640fa56da73: Pulling fs layer
5a8e826f1803: Pulling fs layer
321f9e1d7334: Waiting
1640fa56da73: Waiting
49fb60496f63: Waiting
5a8e826f1803: Waiting
3894583bc464: Waiting
2b032b8bbe8b: Download complete
```
### Logs of docker execution
```
================ SNIP ================
2017-08-30T12:10:12.941956000Z
npm info ok
---> 9642f1eee05d
Removing intermediate container c25aeed9ed01
Step 18/22 : RUN mv /etc/localtime /etc/localtime.bak && ln -s /usr/share/zoneinfo/Etc/UTC /etc/localtime
---> Running in cc126b1531de
---> 0fc22d8ba5b6
Removing intermediate container cc126b1531de
Step 19/22 : EXPOSE 5000
---> Running in fa8728936c36
---> fcf5582f57b5
Removing intermediate container fa8728936c36
Step 20/22 : ADD ./bootstrap.sh /root/bootstrap.sh
---> 40b8670c8699
Step 21/22 : RUN chmod 755 /root/*.sh
---> Running in 3d42589378b4
---> d31df7086fa7
Removing intermediate container 3d42589378b4
Step 22/22 : CMD /root/bootstrap.sh
---> Running in 652bedaa3d9e
---> fc7622c1b8cd
Removing intermediate container 652bedaa3d9e
Successfully built fc7622c1b8cd
Successfully tagged registry.gitlab.com/bipio/docker:latest
$ docker push "$CI_REGISTRY_IMAGE"
The push refers to a repository [registry.gitlab.com/bipio/docker]
4ef7df19a420: Preparing
ea6a65201d2e: Preparing
de95a124340b: Preparing
e3fe819a4102: Preparing
02c2a684f48b: Preparing
33c8ec586de8: Preparing
5436f7fcfcbc: Preparing
afe34e2d3fb5: Preparing
1567d8c5e7cb: Preparing
7887eb88a9e6: Preparing
53bdc2a8ca4c: Preparing
97385931c721: Preparing
2b10d2f7a114: Preparing
f08a91def194: Preparing
317794bb275a: Preparing
f11d21a6f426: Preparing
f3ed6cb59ab0: Preparing
654f45ecb7e3: Preparing
2c40c66f7667: Preparing
33c8ec586de8: Waiting
5436f7fcfcbc: Waiting
afe34e2d3fb5: Waiting
1567d8c5e7cb: Waiting
7887eb88a9e6: Waiting
53bdc2a8ca4c: Waiting
97385931c721: Waiting
2b10d2f7a114: Waiting
f08a91def194: Waiting
317794bb275a: Waiting
f11d21a6f426: Waiting
f3ed6cb59ab0: Waiting
654f45ecb7e3: Waiting
2c40c66f7667: Waiting
de95a124340b: Pushed
ea6a65201d2e: Pushed
4ef7df19a420: Pushed
33c8ec586de8: Pushed
1567d8c5e7cb: Pushed
02c2a684f48b: Pushed
7887eb88a9e6: Pushed
53bdc2a8ca4c: Pushed
97385931c721: Pushed
f08a91def194: Pushed
317794bb275a: Pushed
2b10d2f7a114: Pushed
afe34e2d3fb5: Pushed
e3fe819a4102: Pushed
f3ed6cb59ab0: Pushed
654f45ecb7e3: Pushed
2c40c66f7667: Pushed
5436f7fcfcbc: Pushed
f11d21a6f426: Pushed
latest: digest: sha256:25141a997002704e1f47b0ae562bb5c2435294fa2b18c191ebd46e10a0a14c6d size: 4307
```
## Environment description
### Used GitLab Runner version
```
>gitlab-ci-multi-runner-windows-amd64.exe --version
Version: 9.5.0
Git revision: 413da38
Git branch: 9-5-stable
GO version: go1.8.3
Built: Tue, 22 Aug 2017 13:40:42 +0000
OS/Arch: windows/amd64
```
#### `config.toml`
```toml
concurrent = 1
check_interval = 0
[[runners]]
name = "WSDEV31"
url = "https://gitlab.com/"
token = "4bee240fcde025acf8812eac88b4e1"
executor = "docker"
[runners.docker]
tls_verify = false
image = "alpine:latest"
privileged = true
disable_cache = false
volumes = ["/cache"]
shm_size = 0
[runners.cache]
```
The runner's machine docker: `Docker version 17.07.0-ce-rc4, build fe143e3`Backloghttps://gitlab.com/gitlab-org/gitlab-runner/-/issues/2730Job can run successful without executing all script commands on Windows2023-11-13T03:19:17ZAlex BeerJob can run successful without executing all script commands on Windows## Summary
The Windows version does not always execute all commands of the job's script. The script execution can somehow get interrupted by a command.
For me Node's NPM command produces this behavior consistently. It interrupts/stops t...## Summary
The Windows version does not always execute all commands of the job's script. The script execution can somehow get interrupted by a command.
For me Node's NPM command produces this behavior consistently. It interrupts/stops the script execution without any errors and then returns success.
## Steps to reproduce
Create a simple Node.js project with a failing example test (I used mocha).
In `package.json` add test script so it can be called via NPM.
Add a gitlab-ci config file: `.gitlab-ci.yml`
```yaml
stages:
- test
all_tests:
stage: test
script:
- npm install
- npm test
```
Here's the example project:
[https://gitlab.com/alexbeer/gitlab-runner-fail-test.git]()
Set up a gitlab runner for Node on Windows:
- Install latest Node.js (v8.x) w/ NPM
- Register gitlab-runner
- Use executor: 'shell'
Push project to gitlab and run test job with our Windows based runner.
## Actual behavior
The test runs successful.
## Expected behavior
The test should fail.
## Relevant logs and/or screenshots
```
Running with gitlab-ci-multi-runner 9.5.0 (413da38)
on abe-test-winsrv2012-nodejs8 (5ec4c44a)
Using Shell executor...
Running on my-virtual-machine...
Cloning repository...
Cloning into 'C:/GitLab-Runner/builds/5ec4c44a/0/alexbeer/gitlab-runner-fail-test'...
Checking out 1f46c467 as master...
Skipping Git submodules setup
$ npm install
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN gitlab-runner-fail-test@1.0.0 No description
npm WARN gitlab-runner-fail-test@1.0.0 No repository field.
added 41 packages in 15.147s
Job succeeded
```
For some reason, after this first line of the script (`npm install`) it seems to be happy with the result and then ignore the rest.
Here is the log of the __same job running on Linux__:
```
Running with gitlab-ci-multi-runner 9.5.0 (413da38)
on abe-test-debian-nodejs8 (639122a9)
Using Shell executor...
Running on my-other-virtual-machine...
Cloning repository...
Cloning into '/home/gitlab-runner/builds/639122a9/0/alexbeer/gitlab-runner-fail-test'...
Checking out 1f46c467 as master...
Skipping Git submodules setup
$ npm install
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN gitlab-runner-fail-test@1.0.0 No description
npm WARN gitlab-runner-fail-test@1.0.0 No repository field.
added 41 packages in 7.119s
$ npm test
> gitlab-runner-fail-test@1.0.0 test /home/gitlab-runner/builds/639122a9/0/alexbeer/gitlab-runner-fail-test
> mocha
Test
1) will fail
0 passing (59ms)
1 failing
1) Test will fail:
AssertionError: We're dooomed!!!
at Context.<anonymous> (test/fail.js:5:9)
npm ERR! Test failed. See above for more details.
ERROR: Job failed: exit status 1
```
Instead of ___'Job succeeded'___ this one continues with the next line of the job script `npm test` as expected.
Note:
Not every command interrupts the script. To investigate where the bug might be, I used some `$echo` commands within the job script to see what's going on and they did not stop the process. But a simple command to show NPM's version `npm --version` did stop the process.
## Environment description
```
OS: Microsoft Windows Server 2012
> .\gitlab-runner.exe --version
Version: 9.5.0
Git revision: 413da38
Git branch: 9-5-stable
GO version: go1.8.3
Built: Tue, 22 Aug 2017 13:40:42 +0000
OS/Arch: windows/amd64
> node --version
v8.4.0
> npm --version
5.3.0
```Backloghttps://gitlab.com/gitlab-org/gitlab-runner/-/issues/2747CI PowerShell variables do not resolve properly for cache keys2023-08-22T18:19:26ZTaha EldeibCI PowerShell variables do not resolve properly for cache keys## Summary
PowerShell CI variables e.g. `$env:CI_BUILD_REF_NAME` are not resolved properly for cache keys.
(Same issue with new variables as well e.g. `CI_COMMIT_REF_NAME`)
## Steps to reproduce
1. Use PowerShell as the shell execute...## Summary
PowerShell CI variables e.g. `$env:CI_BUILD_REF_NAME` are not resolved properly for cache keys.
(Same issue with new variables as well e.g. `CI_COMMIT_REF_NAME`)
## Steps to reproduce
1. Use PowerShell as the shell executer
```toml
[[runners]]
name = "windows-01"
url = ""
token = ""
executor = "shell"
shell = "powershell"
```
2. Set global cache using `$env:CI_BUILD_REF_NAME` as cache key
```yaml
cache:
key: "$env:CI_BUILD_REF_NAME"
untracked: true
```
3. Run build
## Actual behavior
1. Extracting cache
```
Checking cache for :CI_BUILD_REF_NAME...
FATAL: open ..\..\..\..\..\cache\engine\electron\:CI_BUILD_REF_NAME\cache.zip: The filename, directory name, or volume label syntax is incorrect.
Failed to extract cache
```
2. Writing cache
```
WARNING: GetFileAttributesEx ..\..\..\..\..\cache\engine\electron\:CI_BUILD_REF_NAME\cache.zip: The filename, directory name, or volume label syntax is incorrect.
FATAL: open ..\..\..\..\..\cache\engine\electron\:CI_BUILD_REF_NAME\archive_025139343: The filename, directory name, or volume label syntax is incorrect.
Failed to create cache
```
## Expected behavior
1. Extracting cache
```
Checking cache for master...�
Successfully extracted cache�
```
2. Writing cache
```
Creating cache master...
...
Created cache
Job succeeded
```
## Relevant logs and/or screenshots
Added in sections above
## Environment description
1. Custom Gitlab installation
2. `gitlab-runner` on Microsoft Windows Server 2016 Standard
### Used GitLab Runner version
```
Version: 9.5.0
Git revision: 413da38
Git branch: 9-5-stable
GO version: go1.8.3
Built: Tue, 22 Aug 2017 13:40:42 +0000
OS/Arch: windows/amd64
```Backloghttps://gitlab.com/gitlab-org/gitlab-runner/-/issues/2890More and more CI tests failing with "Cannot connect to the Docker daemon"2023-12-15T19:29:04ZThomas PetazzoniMore and more CI tests failing with "Cannot connect to the Docker daemon"In the Buildroot project, we are using Gitlab CI on gitlab.com to test Buildroot. Since a few weeks, we are seeing more and more random failures, where the test fails with "ERROR: Job failed (system failure): Cannot connect to the Docker...In the Buildroot project, we are using Gitlab CI on gitlab.com to test Buildroot. Since a few weeks, we are seeing more and more random failures, where the test fails with "ERROR: Job failed (system failure): Cannot connect to the Docker daemon at tcp://165.227.82.17:2376. Is the docker daemon running?"
It never happens on the same jobs, and the jobs we are doing used to be stable a few weeks back.
Examples:
https://gitlab.com/buildroot.org/buildroot/pipelines/13960893/failures
https://gitlab.com/buildroot.org/buildroot/-/jobs/40002242
etc. Having random failures in CI jobs is of course not really nice, as it creates some noise in the CI results :-/
Is there anything that can be done about it? Thanks!Backloghttps://gitlab.com/gitlab-org/gitlab-runner/-/issues/1742Bug with quotes in quotes and scripts2023-11-10T07:57:43ZVictor NoëlBug with quotes in quotes and scriptsHi,
I have the following in my gitlab-ci.yml (I removed what I think are unimportant lines):
```yaml
variables:
MVN: "mvn --errors -B -U -Dmaven.repo.local=m2cache"
MVN_BUILD: "$MVN -Pjacoco -DaltDeploymentRepository='staging::defau...Hi,
I have the following in my gitlab-ci.yml (I removed what I think are unimportant lines):
```yaml
variables:
MVN: "mvn --errors -B -U -Dmaven.repo.local=m2cache"
MVN_BUILD: "$MVN -Pjacoco -DaltDeploymentRepository='staging::default::file:staging'"
...
build-test-backend:
<<: *mvn-java-8
stage: build
script:
- "apk update && apk add git"
- "git clone --depth 1 https://github.com/victornoel/jersey-pac4j"
- "echo MVN_BUILD=$MVN_BUILD"
- "$MVN_BUILD clean deploy"
- "$MVN_BUILD -f jersey-pac4j clean deploy"
- "$MVN_BUILD -f backend clean deploy"
- "ls"
artifacts:
paths:
- staging
```
And when I look at the logs, I see the following:
```
$ echo MVN_BUILD=$MVN_BUILD
MVN_BUILD=mvn --errors -B -U -Dmaven.repo.local=m2cache -Pjacoco -DaltDeploymentRepository='staging::default::file:staging'
...
[INFO] Using alternate deployment repository 'staging::default::file:staging'
```
And the thing is that there should be written: `Using alternate deployment repository staging::default::file:staging` without the quotes (that's what actually happens locally on my machine if I execute the same command.
In this particular case, it is unfortunate because it creates a directory named `staging'` instead of `staging` (that's how I realised there was something fishy :).
I guess I can mitigate this problem by not using quotes (I don't really need to in this specific case), but I guess there is other cases where it could be problematic.Backloghttps://gitlab.com/gitlab-org/gitlab-runner/-/issues/1767Pulling docker image is too slow2023-08-12T00:12:34ZYuriy GlukhovPulling docker image is too slowThe image is specified in `.gitlab-ci.yml`. Every job starts with a "Pulling docker image..." message, which hangs up to 10 mins. The image is around 2GB, so it looks like the cache is ignored and it is actually being pulled for every jo...The image is specified in `.gitlab-ci.yml`. Every job starts with a "Pulling docker image..." message, which hangs up to 10 mins. The image is around 2GB, so it looks like the cache is ignored and it is actually being pulled for every job in the pipeline.
- Gitlab CI version: 1.6.0
- OS: Debian stable
- Docker version: 1.12.1
If I run `docker pull` for this image on my own machine (same network as build machine), the command exits immediately as the cached image version is the latest.Backloghttps://gitlab.com/gitlab-org/gitlab-runner/-/issues/1764Building for Illumos / Solaris 102023-08-22T18:19:23ZmikekoetterBuilding for Illumos / Solaris 10I don't have much Golang experience but compiling for Solaris appears to initially hang on the text_formatter in `logrus`
I took a quick look at logrus and there appears to be a newer version available with Solaris support.
Has anyone ...I don't have much Golang experience but compiling for Solaris appears to initially hang on the text_formatter in `logrus`
I took a quick look at logrus and there appears to be a newer version available with Solaris support.
Has anyone had any luck compiling or cross compiling for Solaris?Backloghttps://gitlab.com/gitlab-org/gitlab-runner/-/issues/2250runner outputs logs with color even when no console is connected2023-08-22T18:19:24ZJean-François Labbérunner outputs logs with color even when no console is connectedIs there a way to disable color in logs?
I run gitlab-runner in containers and use awslog as log driver, tty and interactive options are false but logs contains color, it hard to read and parse.
```
16:45:05
Job succeeded �[0;m build�[...Is there a way to disable color in logs?
I run gitlab-runner in containers and use awslog as log driver, tty and interactive options are false but logs contains color, it hard to read and parse.
```
16:45:05
Job succeeded �[0;m build�[0;m=12388263 project�[0;m=161701 runner�[0;m=93069c20
16:45:11
Job succeeded �[0;m build�[0;m=12388261 project�[0;m=161701 runner�[0;m=93069c20
16:50:59
�[0;33mWARNING: Checking for builds... failed �[0;m �[0;33mrunner�[0;m=93069c20 �[0;33mstatus�[0;m=503 Service Unavailable
16:52:00
Checking for builds... received �[0;m build�[0;m=12389951 repo_url�[0;m=https://gitlab.com/society/society-project.git runner�[0;m=93069c20
16:52:01
Checking for builds... received �[0;m build�[0;m=12389952 repo_url�[0;m=https://gitlab.com/society/society-project.git runner�[0;m=93069c20
16:52:25
Job succeeded �[0;m build�[0;m=12389952 project�[0;m=161701 runner�[0;m=93069c20
16:56:42
Job succeeded �[0;m build�[0;m=12389951 project�[0;m=161701 runner�[0;m=93069c20
17:02:29
Checking for builds... received �[0;m build�[0;m=12390123 repo_url�[0;m=https://gitlab.com/society/society-project.git runner�[0;m=93069c20
17:02:29
Checking for builds... received �[0;m build�[0;m=12390124 repo_url�[0;m=https://gitlab.com/society/society-project.git runner�[0;m=93069c20
```Backloghttps://gitlab.com/gitlab-org/gitlab-runner/-/issues/1926before_script, script, after_script not in same context2023-08-03T18:30:20ZJeJebefore_script, script, after_script not in same context### Summary
I don't known if it's bug, but i am not able to use ssh command in after_script
### Steps to reproduce
In gitlab-ci configuration file have something like this :
```
before_script:
# run ssh-agent
- eval $(ssh-age...### Summary
I don't known if it's bug, but i am not able to use ssh command in after_script
### Steps to reproduce
In gitlab-ci configuration file have something like this :
```
before_script:
# run ssh-agent
- eval $(ssh-agent -s)
# add ssh key stored in DEPLOY_SSH_PRIVATE_KEY variable to the agent store
- ssh-add <(echo "$DEPLOY_SSH_PRIVATE_KEY")
- mkdir -p ~/.ssh
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
- 'ping -c 1 $DEPLOY_SSH_HOST || ( echo "Host OK" )'
after_script:
- 'ssh -v $DEPLOY_SSH_USER@$DEPLOY_SSH_HOST -C " ./do_some_post_script "'
stepOne:
variables:
MY_CUSTOM_CONF: "hi"
environment: production
when: manual
script:
- 'ssh $DEPLOY_SSH_USER@$DEPLOY_SSH_HOST -C "echo test"'
```
### Expected behavior
Connection SSH will works, i thinks
### Actual behavior
Connection failed (permission denied), it seams ssh-agent not running in after_script context.
Need to add ssh-agent initialisation (like below) in after_script to connection success.
```
after_script:
# run ssh-agent
- eval $(ssh-agent -s)
# add ssh key stored in DEPLOY_SSH_PRIVATE_KEY variable to the agent store
- ssh-add <(echo "$DEPLOY_SSH_PRIVATE_KEY")
- mkdir -p ~/.ssh
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
- 'ssh -v $DEPLOY_SSH_USER@$DEPLOY_SSH_HOST -C " ./do_some_post_script "'
```
### Relevant logs and/or screenshots
(Paste any relevant logs - please use code blocks (```) to format console output,
logs, and code as it's very hard to read otherwise.)
### Output of checks
#### Results of GitLab application Check
(For installations with omnibus-gitlab package run and paste the output of:
`sudo gitlab-rake gitlab:check SANITIZE=true`)
(For installations from source run and paste the output of:
`sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true`)
(we will only investigate if the tests are passing)
#### Results of GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of:
`sudo gitlab-rake gitlab:env:info`)
(For installations from source run and paste the output of:
`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
### Possible fixes
(If you can, link to the line of code that might be responsible for the problem)Backloghttps://gitlab.com/gitlab-org/gitlab-runner/-/issues/1918CI_PROJECT_DIR is not respected when set in the gitlab-ci.yml2022-08-01T20:54:04ZJasonCI_PROJECT_DIR is not respected when set in the gitlab-ci.ymlWhen setting the CI_PROJECT_DIR variable within a job, I expected to have my code checked out in that directory.
I'm basing my assumptions on this document: https://docs.gitlab.com/ce/ci/variables/README.html
My gitlab runner is config...When setting the CI_PROJECT_DIR variable within a job, I expected to have my code checked out in that directory.
I'm basing my assumptions on this document: https://docs.gitlab.com/ce/ci/variables/README.html
My gitlab runner is configured as ```executor = "docker"```
My **.gitlab-ci.yml** file contains the following:
```yaml
stages:
- build
- package
- test
- deploy
build:linux:
image: golang:1.7.1
stage: build
variables:
CI_PROJECT_DIR: /go/src/$CI_PROJECT_PATH/
script:
- git submodule init
- git submodule update --recursive
- go build -v -x -o build/$CI_PROJECT_NAME
```
Upon inspecting the environment of the newly created container, I can see that the environment variable persists, but It simply will not affect where the code is checked out / cloned.
This presents a problem for me because the [golang docker image](https://hub.docker.com/_/golang/) sets the [$GOPATH](https://github.com/golang/go/wiki/GOPATH) to **/go/** and I do not wish to junk up my CI file with moves, copies, symlinks, etc.
It would be nice if I could, per job, set the CI_PROJECT_DIR to determine where the code actually gets checked out.Backloghttps://gitlab.com/gitlab-org/gitlab-runner/-/issues/1864Windows shell runner can't use exclamation mark2023-08-03T18:23:49ZFlorianWindows shell runner can't use exclamation mark## Summary
The runner displays the exclamation mark in the command it will execute but actually discards it when executing the command
## Steps to reproduce
I created a gitlab-ci.yml file with commands using the exclamation mark symbo...## Summary
The runner displays the exclamation mark in the command it will execute but actually discards it when executing the command
## Steps to reproduce
I created a gitlab-ci.yml file with commands using the exclamation mark symbol
## Actual behavior
Exclamation mark is ignored and never used in any command, even if the shell command shows it
## Expected behavior
The exclamation mark should be used in the actual command
## Relevant logs and/or screenshots
Below are examples I ran using the echo command. But the same happens with any command (I needed exclamation mark as a parameter for mstest.exe).
I tried many ways to get the exclamation mark to work but couldn't find one
script code :
`
variables:
exclamationMarkVariable: "!"
script:
- 'echo on'
- echo "!"
- echo "\!"
- echo '!'
- echo %exclamationMarkVariable%
- 'echo !'
- "echo !"
- 'echo !!'
- 'echo %21'
- "echo %21"
- "echo \\!"
- 'echo \\!'
`
output of the runner (1.7.1) :
`
$ echo on
$ echo "^"
""
$ echo "\^"
"\"
$ echo '!'
''
$ echo %exclamationMarkVariable%
ECHO is on.
$ echo !
ECHO is on.
$ echo !
ECHO is on.
$ echo !!
ECHO is on.
$ echo %21
1
$ echo %21
1
$ echo \!
\
$ echo \\!
\\
`
## Environment description
I'm using a runner (1.7.1) launched in windows with shell executor on our lab's gitlabCE
### Used GitLab Runner version
Running with gitlab-ci-multi-runner 1.7.1 (f896af7)
Using Shell executor...Backloghttps://gitlab.com/gitlab-org/gitlab-runner/-/issues/1846Connect CI Runner to Docker network2024-02-06T00:24:19ZGiovanniConnect CI Runner to Docker network## Summary
I have the following configuration:
dockered gitlab (named gitlab)
dockered gitlab-ci-multirunner (linked to gitlab and named gitlab-runners).
```
┌──────────────────────┐ ┌─────────┐
│ 172.12.x.x │ ...## Summary
I have the following configuration:
dockered gitlab (named gitlab)
dockered gitlab-ci-multirunner (linked to gitlab and named gitlab-runners).
```
┌──────────────────────┐ ┌─────────┐
│ 172.12.x.x │ │172.13.x.│
┌┴──────────┬┬──────────┴┐┌┴─────────┴┐
│ GitLab ││ GitLab ││ GitLab │
│ ││ Runners ││ Runners │
│ ││ ││ │
└───────────┘└───────────┘└───────────┘
│ │ │ ▲
│ │ │ ╱
│ │ │ ╱
│ │ ▼ ╱
───────┴────────────┴────────────────────
```
I successfully registered a runner into gitlab, but when I try to run a build I cannot manage to connect the docker container of the project spawned by the gitlab-runners to my gitlab docker; therefore when the project docker tries to clone the project, the runner is not able to resolve the name http://gitlab/ I tried to use the parameter -links=["network-name:gitlab"] in the toml file of my runner, but this leads to:
```
API error (500) Could not get container for <network name>.
```
I also tried to use the extra_hosts parameter and to write the IP address of my gitlab container (this is a solution that I have found in two issues on this repo). Unfortunately, since the two containers are not in the same network this leads to a time out.
## Steps to reproduce
Here is my docker compose:
version: '2'
```
services:
gitlab:
container_name: 'gitlab'
image: 'gitlab/gitlab-ce:latest'
restart: always
hostname: 'gitlab'
ports:
- '80:80'
- '443:443'
- '2222:22'
expose:
- 80
- 443
- 2222
volumes:
- '/docker/gitlab/conf:/etc/gitlab'
- '/docker/gitlab/logs:/var/log/gitlab'
- '/docker/gitlab/data:/var/opt/gitlab'
networks:
- mynet
gitlab-runners:
container_name: 'gitlab-runners'
image: 'gitlab/gitlab-runner:latest'
restart: always
volumes:
- '/srv/gitlab-runnes:/etc/gitlab-runner'
- '/var/run/docker.sock:/var/run/docker.sock'
privileged: false
networks:
- mynet
gitlab-runners-data:
external: true
networks:
mynet:
external: true
```
- mynet is a simple bridge network I created.
- multi runner has been setup so that there is a specific runner for a project that runs in docker mode.
## Actual behavior
The containers generated by the multi-runner are in a different logical network, therefore the \gitlab name or its IP address are either not resolvable nor reachable.
## Expected behavior
I should be able to connect the containers created by the multi-runner in the same docker network of my gitlab instance.
## Environment description
- custom installation on Centos 7
- docker 1.12.2
- kernel 3-10.0-327.el7.x86_64
### Used GitLab Runner version
gitlab-ci-multi-runner 1.7.1Backloghttps://gitlab.com/gitlab-org/gitlab-runner/-/issues/1593docker executor with private registry service2022-08-01T20:54:06ZYehiyam Livnehdocker executor with private registry serviceHi
I'm trying to use a private registry for a docker image to be used as a service.
e.g.
services:
- my.registry.com:5000/redis:latest
in this case, in what name is the service exposed (linked) in my build container?
According to the d...Hi
I'm trying to use a private registry for a docker image to be used as a service.
e.g.
services:
- my.registry.com:5000/redis:latest
in this case, in what name is the service exposed (linked) in my build container?
According to the documentation, and also by looking at the code of the runner, the service's name should be
The alias hostname for the service is made from the image name following these rules:
1. Everything after : is stripped
2. Slash (/) is replaced with double underscores (__)
In the case of a private registry, it comes out to: name= my.registry.com, and not name=redis
Is there a way to overcome this problem?
Thanks
YehiyamBackloghttps://gitlab.com/gitlab-org/gitlab-runner/-/issues/1519allowed_images with asterisk tag does not allow image without tag2024-03-26T00:23:57ZNikola Kovacsallowed_images with asterisk tag does not allow image without tagIf you specify an allowed image with an asterisk tag, e.g. `allowed_images = ["registry.example.org/group/project:*"]`, gitlab runner will not let you use just the image name in .gitlab-ci.yml, e.g. `image: registry.example.org/group/pro...If you specify an allowed image with an asterisk tag, e.g. `allowed_images = ["registry.example.org/group/project:*"]`, gitlab runner will not let you use just the image name in .gitlab-ci.yml, e.g. `image: registry.example.org/group/project`, you have to specify a tag, e.g. `image: registry.example.org/group/project:latest`.
On the other hand `allowed_images = ["registry.example.org/group/project"]` only lets you use the image without a tag, which doesn't really make sense either . I think it should be equivalent to `"registry.example.org/group/project:*"`.
You have to combine the two to actually allow any tag and just the image name: `allowed_images = ["registry.example.org/group/project", "registry.example.org/group/project:*"]`.Backloghttps://gitlab.com/gitlab-org/gitlab-runner/-/issues/1423Wait for IdleTime before destroying an autoscaled runner with IdleCount = 02023-08-22T18:19:23ZThéo ChamleyWait for IdleTime before destroying an autoscaled runner with IdleCount = 0# Context / use case
I am configuring a gitlab runner with autoscaling enabled for a project with only a few commits a day, for an organization tight on money. I would like to stop all runners when there is no job to be built, but I woul...# Context / use case
I am configuring a gitlab runner with autoscaling enabled for a project with only a few commits a day, for an organization tight on money. I would like to stop all runners when there is no job to be built, but I would also like to keep a runner some time after it has been used in case of a new job comming to avoid waiting the creation of a new one.
# Problem
Today, my configuration looks like this:
```
concurrent = 2
[[runners]]
name = "My autoscale runner"
url = "https://gitlab.com/ci"
token = "XXXXXXXXXXXXXXXXXXXXXXXXXX"
executor = "docker+machine"
limit = 2
[runners.machine]
IdleCount = 0
IdleTime = 1800
MaxBuilds = 100
MachineName = "gitlab-runner-autoscale-%s"
MachineDriver = "amazonec2"
MachineOptions = [
"amazonec2-access-key=XXXXXXXXXXXXXXXXXXXXXXXXX",
"amazonec2-secret-key=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"amazonec2-region=eu-west-1",
"amazonec2-instance-type=c4.large",
"amazonec2-request-spot-instance=true",
"amazonec2-spot-price=0.03"
]
```
The problem is that, as I have ``IdleCount`` set to 0, the autoscaled runners are terminated just after finishing the job, even if there are other jobs in the queue.
# Suggested solution
In case of ``IdleCount=0``, wait for ``IdleTime`` before actually terminating the runner, or provide an option that allows this behavior.
Also, #1374 seems a very good idea for optimizing the use of runners and lower their cost.Backloghttps://gitlab.com/gitlab-org/gitlab-runner/-/issues/1380ENTRYPOINT is executed twice2023-08-22T18:19:22ZNikola KovacsENTRYPOINT is executed twiceI've created a docker image with a custom entrypoint as described in https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/docs/executors/docker.md#the-entrypoint: https://hub.docker.com/r/nkovacs/runner-test/~/dockerfile/
Wh...I've created a docker image with a custom entrypoint as described in https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/docs/executors/docker.md#the-entrypoint: https://hub.docker.com/r/nkovacs/runner-test/~/dockerfile/
When it executes a build using a simple .gitlab-ci.yml file, the entrypoint is called twice: https://gitlab.com/nkovacs/runner-test/builds/1647419
The first is the normal build script, the second is an eval of an empty string.
If I add an after_script, it evals that instead of the empty string: https://gitlab.com/nkovacs/runner-test/builds/1647440
We partially fixed this problem with https://gitlab.com/gitlab-org/gitlab-runner/-/merge_requests/2081/https://gitlab.com/gitlab-org/gitlab-runner/-/issues/25233 because we no longer run `after_script` if it's empty.Backloghttps://gitlab.com/gitlab-org/gitlab-runner/-/issues/2822Service aliases are not ping2023-08-22T18:19:38ZIvan SkiridomovService aliases are not pingI have next ci file
```
variables:
ZOOKEEPER_CLIENT_PORT: '2181'
ZOOKEEPER_TICK_TIME: '2000'
services:
- name: confluentinc/cp-zookeeper
alias: zookeeper
ping:
image: python:2
script:
- ping -c 1 zookeper
```
And I...I have next ci file
```
variables:
ZOOKEEPER_CLIENT_PORT: '2181'
ZOOKEEPER_TICK_TIME: '2000'
services:
- name: confluentinc/cp-zookeeper
alias: zookeeper
ping:
image: python:2
script:
- ping -c 1 zookeper
```
And I try to run it with exec command
```
(venv) ➜ bw-kafka git:(refactor) ✗ gitlab-runner exec docker ping
WARNING: Since GitLab Runner 10.0 this command is marked as DEPRECATED and will be removed in one of upcoming releases
WARNING: You most probably have uncommitted changes.
WARNING: These changes will not be tested.
Running with gitlab-runner 10.0.2 (a9a76a50)
on ()
Using Docker executor with image python:2 ...
Starting service confluentinc/cp-zookeeper:latest ...
Pulling docker image confluentinc/cp-zookeeper:latest ...
Using docker image confluentinc/cp-zookeeper:latest ID=sha256:7d8fb327b1f68c58da35fb0b8094ef003437c477371f0051ed0d98d17e5294bd for confluentinc/cp-zookeeper service...
Waiting for services to be up and running...
Using docker image sha256:e3075c6b18b79a9456340fd8c93dac59f9ca2784c0fe918ba94fcb78d3a0c804 for predefined container...
Pulling docker image python:2 ...
Using docker image python:2 ID=sha256:b1d5c2d7dda802e246cbbbaf058377edba0b7acfd5950d70111239b706d6d282 for build container...
Running on runner--project-0-concurrent-0 via CY1-AL-032...
Cloning repository...
Cloning into '/builds/project-0'...
done.
Checking out 31e1cdc6 as refactor...
Skipping Git submodules setup
$ ping -c 1 zookeper
ping: unknown host
Running after script...
ERROR: Job failed: exit code 1
FATAL: exit code 1
(venv) ➜ bw-kafka git:(refactor) ✗
```
What I'm do wrong ?Backloghttps://gitlab.com/gitlab-org/gitlab-runner/-/issues/2850Docker+Machine Artifacts no matching files2023-08-22T18:19:39Zghost-83988-986593Docker+Machine Artifacts no matching files* Gitlab-EE: 10.1.0-ee
* Gitlab-Runner: Tried both 10.0.2 and 10.1.0
* Docker Machine: 0.13.0-rc1 (I have to use this rc, stable doesn't properly work with GCE)
* Docker: 17.09.0-ce
I recently switched over to using docker+machine again...* Gitlab-EE: 10.1.0-ee
* Gitlab-Runner: Tried both 10.0.2 and 10.1.0
* Docker Machine: 0.13.0-rc1 (I have to use this rc, stable doesn't properly work with GCE)
* Docker: 17.09.0-ce
I recently switched over to using docker+machine against GCE and since then our builds create the artifacts properly in our $CI_BUILD_DIR/coverage directory and the upload "works" but every single build reports "no file matches" and we get an empty 22byte zip file. I've logged into each runner after a build and the files are in the proper place.
What I do is have docker+machine spin up a GCE server that just has docker-CE installed and /var/run/docker.sock is mounted in my config.toml so the docker containers in my builds run directly on the GCE server that was started by docker+machine. Our docker images for integration tests are started via docker compose.
I've enabled debug mode and at the bottom we get this;
**Job Log**
```
++ /usr/bin/gitlab-runner-helper --version
++ echo 'Uploading artifacts...'
++ /usr/bin/gitlab-runner-helper artifacts-uploader --url https://git.mydomain.com --token xxxxxxxxxxxxxxxxxxxx --id 62360 --path coverage/
Uploading artifacts...
WARNING: coverage/: no matching files
Uploading artifacts to coordinator... ok id=62360 responseStatus=201 Created token=Bmyp95pz
+ exit 0
Job succeeded
```
**Config.toml**
```
[runners]]
name = "gitlab-runner-autoscaler"
url = "https://git.mydomain.com"
token = "mytoken"
executor = "docker+machine"
output_limit = 10240
[runners.docker]
tls_verify = false
image = "node:latest" # The default image used for builds
disable_cache = false
shm_size = 0
privileged = true
cache_dir = "/cache"
volumes = ["/var/cache:/cache:rw", "/var/run/docker.sock:/var/run/docker.sock"]
```Backlog