gitlab-ci
stages:
- deploy
deploy:
stage: deploy
script:
- npm install
- npm run build
- cp -R build/* /var/www/html
pipeline:
Preparing the "docker+machine" executor
00:28
Using Docker executor with image ruby:2.5 ...
Why docker ruby? Why not shell executor?
my config.toml
concurrent = 1
check_interval = 0
[session_server]
session_timeout = 1800
[[runners]]
name = "test"
url = "https://gitlab.com/"
token = "123321123"
executor = "shell"
shell = "bash"
You most likely have shared runners enabled on the repository, and it just so happens that when the job is submitted, that the job picks up the shared runner first, rather than your custom shell runner.
So an option available is to disable shared runners for your project:
A better solution would be to enable tags on the Runners.
When registering the runner, at step 5, you can provide tags associated with the runner. You can also change the tags in the GitLab UI if you have sufficient permissions in:
gitlab.com -> group -> settings -> CI/CD -> runner settings
Note, the tags are not changeable in the config.toml file.
You can now, for example, tag your runner with shell-internal, and then to run jobs only on this runner, add tags: - shell-internal in your gitlab-ci.yml file:
build:
script:
- echo "running on shell-internal"
tags:
- shell-internal
This link should explain how GitLab runners work: https://docs.gitlab.com/ee/ci/runners/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With