Custom executor is missing RunExec
Summary
I have issue setting up a custom executor for gitlab-runner inside of LXC container. Whatever I tried ends with following error
WARNING: custom executor is missing RunExec
ERROR: Job failed: custom executor is missing RunExec
FATAL: custom executor is missing RunExec
Steps to reproduce
Following this example: https://docs.gitlab.com/runner/executors/custom_examples/lxd.html Register custom executor
$ gitlab-runner register -n \
--url http://gitlab.example.com/ \
--registration-token xxxxx \
--executor custom \
--description "lxd-executor" \
--builds-dir "/builds" \
--cache-dir "/cache" \
--custom-run-exec "/opt/lxd-executor/run.sh" \
--custom-prepare-exec "/opt/lxd-executor/prepare.sh" \
--custom-cleanup-exec "/opt/lxd-executor/cleanup.sh"
Run test locally
$ gitlab-runner exec custom test
.gitlab-ci.yml
stages:
- test
test:
stage: test
coverage: '/\d+\%$/'
script:
- source ~/.venv/bspump/bin/activate
- python setup.py install
- pip install -r requirements-dev.txt
- coverage run -m unittest test
- coverage report -m
Actual behavior
$ gitlab-runner exec custom test
Runtime platform arch=amd64 os=linux pid=25524 revision=de7731dd version=12.1.0
Running with gitlab-runner 12.1.0 (de7731dd)
WARNING: custom executor is missing RunExec
ERROR: Job failed: custom executor is missing RunExec
FATAL: custom executor is missing RunExec
Expected behavior
Executing test locally
Environment description
config.toml contents
concurrent = 1
check_interval = 0
[session_server]
session_timeout = 1800
[[runners]]
name = "lxd-executor"
url = "http://gitlab.example.com/"
token = "xxxxx"
executor = "custom"
builds_dir = "/builds"
cache_dir = "/cache"
[runners.custom_build_dir]
[runners.cache]
[runners.cache.s3]
[runners.cache.gcs]
[runners.custom]
prepare_exec = "/opt/lxd-executor/prepare.sh"
run_exec = "/opt/lxd-executor/run.sh"
cleanup_exec = "/opt/lxd-executor/cleanup.sh"
Used GitLab Runner version
Version: 12.1.0
Git revision: de7731dd
Git branch: 12-1-stable
GO version: go1.8.7
Built: 2019-07-19T13:53:04+0000
OS/Arch: linux/amd64
Edited by Jakub Boukal