I have a Gitlab server from the company where the project and the pipeline are configured. By default, every time a commit is done, the pipeline starts to execute in the Gitlab server.

I have my personalized VM, which is completely different from Gitlab. I want that the pipeline will be executed in my personalized VM instead of the Gitlab server. What should I do so that the pipeline runs on the VM and not on the Gitlab server?

I have configured the following runner in config.toml that is located in $MYPROJECT/:

  name = "Project-name"
  url = "https://gitlab.server/"
  token = "TOKEN ID"
  executor = "shell"
  shell = "bash"

There are things that I don't understand.

  1. If I want to execute the pipeline in my personalized VM, should I install Gitlab runner in the VM [1]?
  2. Should I have the project source code in the VM so that it can read the config.toml file every time there is a commit?
  3. If I register the runner with the token key in the Gitlab server, how the Gitlab server knows that the pipeline is to be executed in the VM and not in the server [2]?
  4. Should I use the executor docker or shell, to execute the pipeline in the VM?

[1] https://docs.gitlab.com/runner/install/linux-manually.html

[2] https://docs.gitlab.com/runner/register/#registering-runners


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.