Reputation: 1566
This is the log.
Running with gitlab-runner 13.0.1 (xxx)
on x-runner xxx
Preparing the "docker" executor
Job succeeded
The Job succeeded
message comes after 0 seconds after the Preparing the "docker" executor
message.
The scripts is echo hello
and npm ci
Update: When I do docker exec -it gitlab-runner gitlab-runner --debug run
, I get the error panic: runtime error: invalid memory address or nil pointer dereference
after starting a pipeline. How do I fix this?
Update:
Versions
gitlab: 12.9.0
gitlab-runner: 13.0.1
docker: 19.03.11, build 42e35e61f3
Config
concurrent = 1
check_interval = 0
[session_server]
session_timeout = 1800
[[runners]]
name = "nuc-runner"
url = "https://gitlab.x.y/"
token = "xyz"
executor = "docker"
[runners.custom_build_dir]
[runners.cache]
[runners.cache.s3]
[runners.cache.gcs]
Update:
.gitlab-cli.yml
# see https://docs.gitlab.com/ce/ci/yaml/README.html for all available options
stages:
- install
- build
- test
- clean
build:
stage: build
script: npm run build
install:
stage: install
script: npm ci
test:
stage: test
script: npm run test
clean:
stage: clean
script: npm run clean
Update
When I type
root@xxxxxxxxxxxx:/# gitlab-runner status
Stdout
Runtime platform arch=amd64 os=linux pid=365 revision=21cb397c version=13.0.1
gitlab-runner: Service is not running.
Upvotes: 3
Views: 1546
Reputation: 1566
It turns out to not be the config in any way that caused the error. I didn't install the runner correctly. Another error was gitlab-runner service not starting as mentioned here that was caused by installing gitlab-runner via apt.
How to solve installed with apt problem.
$ sudo su
root:~# cd /var/lib
root:/var/lib# mkdir gitlab-runner
root:/var/lib# chown gitlab-runner:gitlab-runner gitlab-runner/
root:/var/lib# service gitlab-runner restart
How to solve not installed correctly problem.
$ gitlab-runner install -u root
$ sudo reboot
Upvotes: 3
Reputation: 263637
I don't see an image
definition in any of the stages. Without that, I don't think there's anything for the docker executor to do. I'm only used to seeing the script section listed as an array, not sure if the string value is also valid. The result, if you want to use the node:lts
image to run these, would look like:
stages:
- install
- build
- test
- clean
build:
stage: build
image: node:lts
script:
- npm run build
install:
stage: install
image: node:lts
script:
- npm ci
test:
stage: test
image: node:lts
script:
- npm run test
clean:
stage: clean
image: node:lts
script:
- npm run clean
Upvotes: 0