I don't think this is possible with the predefined variables since they only contain CI_RUNNER_DESCRIPTION, CI_RUNNER_ID and CI_RUNNER_TAGS.
You could create a workaround by using the environment setting in the runner config.toml as described in this section and the example:
[[runners]]
name = "ruby-2.1-docker"
url = "https://CI/"
token = "TOKEN"
limit = 0
executor = "docker"
builds_dir = ""
shell = ""
environment = ["ENV=value", "CI_RUNNER_VERSION=10.2"]
clone_url = "http://gitlab.example.local
If you use stuff like Ansible, Puppet, Chef or another provisioning tool you could make sure they update the config when they upgrade the runner e.g.
Or create a bash script that replaces the CI_RUNNER_VERSION value in the config.toml based on a every day/night and restarts the runner service. That would be pretty easy.
You can get the version or your runner (and only the exact version) by running:
$ gitlab-runner --version | head -n 1 | awk '{print $2}'
Answer from Stefan van Gastel on Stack OverflowHow can I check the version of GitLab? - Stack Overflow
Gitlab Runners Version
Need help with runner registration after I used latest version of gitlab-ce
Gitlab-CI: How to test if package version already exists in pkg repo?
I have updated my server to GitLab 6.6.4 and finally found the way to get version of GitLab remotely without SSH access to server.
You should be logged in to access the following page:
https://your.domain.name/help
It shows something similar to:
GitLab 6.6.4 42e34ae
GitLab is open source software to collaborate on code.
...
etc.
For omnibus versions:
sudo gitlab-rake gitlab:env:info
Example:
System information
System: Ubuntu 12.04
Current User: git
Using RVM: no
Ruby Version: 2.1.7p400
Gem Version: 2.2.5
Bundler Version:1.10.6
Rake Version: 10.4.2
Sidekiq Version:3.3.0
GitLab information
Version: 8.2.2
Revision: 08fae2f
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: postgresql
URL: https://your.hostname
HTTP Clone URL: https://your.hostname/some-group/some-project.git
SSH Clone URL: git@your.hostname:some-group/some-project.git
Using LDAP: yes
Using Omniauth: no
GitLab Shell
Version: 2.6.8
Repositories: /var/opt/gitlab/git-data/repositories
Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks/
Git: /opt/gitlab/embedded/bin/git
I’m unable to find the dedicated page listing the runner versions. Any suggestions where its available?