Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty parameter option #49

Open
dansta opened this issue Jun 11, 2019 · 3 comments
Open

Empty parameter option #49

dansta opened this issue Jun 11, 2019 · 3 comments

Comments

@dansta
Copy link

dansta commented Jun 11, 2019

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 5.5.8
  • Ruby: n/a
  • Distribution: Voxpopuli
  • Module version: Github head

How to reproduce (e.g Puppet code you use)

Feature request

What are you seeing

No option to omit URL and registration-token

What behaviour did you expect instead

Possibility to omit URL and registration-token

Output log

Notice: /Stage[main]/Gitlab::Cirunner/Gitlab::Runner[test_runner]/Exec[Register_runner_test_runner]/returns: PANIC: The url needs to be entered
Error: '/usr/bin/gitlab-runner register -n --name test_runner' returned 1 instead of one of [0]
Error: /Stage[main]/Gitlab::Cirunner/Gitlab::Runner[test_runner]/Exec[Register_runner_test_runner]/returns: change from 'notrun' to ['0'] failed: '/usr/bin/gitlab-runner register -n --name test_runner' returned 1 instead of one of [0]
Notice: Applied catalog in 2.92 seconds

Any additional information you'd like to impart

The user may want to customize the runner and have control. If puppet controls these parameters exclusively then it becomes a non-option because puppet will set url and registration token on each run. I.e "I want a runner, I'll configure it myself".

A parameter should be able to envelop the options similar to "::gitlab::cirunner::manage_docker: false". It should be named something like "::gitlab::cirunner::configure_runner" and be a boolean.

@baurmatt
Copy link
Contributor

baurmatt commented Feb 5, 2020

Hey @dansta, thanks for opening this issue! :) URL and the registration-token seem to be required parameter for the runner registration. Could you please explain in more detail what you're trying to achieve?

@nmaludy
Copy link
Member

nmaludy commented Apr 1, 2020

I'm not sure if this is related, but i'm trying to specify a runner with tags, but is also allowed to run untagged jobs by passing the --run-untagged option.

I can't figure out how to specify that in the config setting the proper way so the CLI comes out right.

@baurmatt
Copy link
Contributor

baurmatt commented Apr 3, 2020

Ah, --run-untagged seems to be an boolean value which isn't currently handled by this module. This effects the following parameters:

root@gitlab-runner:/# gitlab-runner register --help 2> /dev/null | grep -A1000000 OPTIONS: | grep -v value
OPTIONS:
   -n, --non-interactive                                        Run registration unattended [$REGISTER_NON_INTERACTIVE]
   --leave-runner                                               Don't remove runner if registration fails [$REGISTER_LEAVE_RUNNER]
   --run-untagged                                               Register to run untagged builds; defaults to 'true' when 'tag-list' is empty [$REGISTER_RUN_UNTAGGED]
   --locked                                                     Lock Runner for current project, defaults to 'true' [$REGISTER_LOCKED]
   --paused                                                     Set Runner to be paused, defaults to 'false' [$REGISTER_PAUSED]
   --debug-trace-disabled                                       When set to true Runner will disable the possibility of using the CI_DEBUG_TRACE feature [$RUNNER_DEBUG_TRACE_DISABLED]
   --custom_build_dir-enabled                                   Enable job specific build directories [$CUSTOM_BUILD_DIR_ENABLED]
   --cache-shared                                               Enable cache sharing between runners. [$CACHE_SHARED]
   --cache-s3-insecure                                          Use insecure mode (without https) [$CACHE_S3_INSECURE]
   --docker-tlsverify                                           Use TLS and verify the remote [$DOCKER_TLS_VERIFY]
   --docker-privileged                                          Give extended privileges to container [$DOCKER_PRIVILEGED]
   --docker-disable-entrypoint-overwrite                        Disable the possibility for a container to overwrite the default image entrypoint [$DOCKER_DISABLE_ENTRYPOINT_OVERWRITE]
   --docker-oom-kill-disable                                    Do not kill processes in a container if an out-of-memory (OOM) error occurs [$DOCKER_OOM_KILL_DISABLE]
   --docker-disable-cache                                       Disable all container caching [$DOCKER_DISABLE_CACHE]
   --parallels-disable-snapshots                                Disable snapshoting to speedup VM creation [$PARALLELS_DISABLE_SNAPSHOTS]
   --virtualbox-disable-snapshots                               Disable snapshoting to speedup VM creation [$VIRTUALBOX_DISABLE_SNAPSHOTS]
   --kubernetes-bearer_token_overwrite_allowed                  Bool to authorize builds to specify their own bearer token for creation. [$KUBERNETES_BEARER_TOKEN_OVERWRITE_ALLOWED]
   --kubernetes-privileged                                      Run all containers with the privileged flag enabled [$KUBERNETES_PRIVILEGED]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants