GitLab runner

Install
wget https://packages.gitlab.com/runner/gitlab-runner/gpgkey -O - | apt-key add -
cat < /etc/apt/sources.list.d/gitlab-runner.list
deb https://packages.gitlab.com/runner/gitlab-runner/ubuntu/ xenial main
EOF
apt update
apt install gitlab-runner

Instlal with Ansible
https://github.com/panticz/ansible/tree/master/roles/gitlab-runner

Get token from GitLab server
http:///admin/runners

# configure DNS for GitLab server
echo "10.0.1.12 gitlab.example.com gitlab" >> /etc/hosts

Register
sudo gitlab-runner register \
--non-interactive \
--url "http://gitlab/" \
--registration-token "XAr8-bZz2PbpFSrYRFMt" \
--executor "shell" \
--description "runner1" \
--tag-list "shell,runner" \
--run-untagged \
--locked="false"

.gitlab-ci.yml
before_script:
- date > /tmp/date

step1:
script:
- touch /tmp/x

GitLab runner configuration
/etc/gitlab-runner/config.toml
/etc/systemd/system/gitlab-runner.service

Max Archive size
# grep -r client_max_body_size /etc/gitlab/gitlab.rb /var/opt/gitlab/nginx/conf/*
/etc/gitlab/gitlab.rb:nginx['client_max_body_size'] = '1024m'
/var/opt/gitlab/nginx/conf/gitlab-http.conf: client_max_body_size 1024m;
Admin > Settings > Continuous Integration and Deployment > Maximum artifacts size (MB)

Links
https://docs.gitlab.com/ce/ci/runners/
https://docs.gitlab.com/ee/ci/README.html
https://docs.gitlab.com/ee/ci/yaml/#variables