HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

Gitlab CI Runner command line doesn't care about --parameters

Submitted by: @import:stackexchange-devops··
0
Viewed 0 times
linegitlabcarerunnerdoesnaboutcommandparameters

Problem

I'm trying to write a windows batch file to automate the gitlab runner registration :

SET /p token=Token ?:
gitlab-runner register --locked false --run-untagged true --tag-list java --name foo --token %token% --url https://myurl --executor


I found the parameters in help documentation (gitlab-runner register --help) but it doesn't care about them. It still continues to ask question whose answers are in the parameters.

Thanks for helping

Solution

You're missing the --non-interactive tag to your registration command.

Full command should be:

gitlab-runner register --non-interactive --locked false --run-untagged true --tag-list java --name foo --registration-token %token% --url https://myurl --executor shell


Relevant documentation for non-interactive registration.

Code Snippets

gitlab-runner register --non-interactive --locked false --run-untagged true --tag-list java --name foo --registration-token %token% --url https://myurl --executor shell

Context

StackExchange DevOps Q#2641, answer score: 3

Revisions (0)

No revisions yet.