Skip to content
Snippets Groups Projects
Commit c6cf7dba authored by Tomasz Maczukin's avatar Tomasz Maczukin
Browse files

Merge branch 'zj-locked-by-default' into 'master'

Lock runners to project by default

Closes #2615

See merge request !657
parents 1b1f04ac 1a3497bb
No related branches found
No related tags found
No related merge requests found
...@@ -27,7 +27,7 @@ type RegisterCommand struct { ...@@ -27,7 +27,7 @@ type RegisterCommand struct {
LeaveRunner bool `long:"leave-runner" env:"REGISTER_LEAVE_RUNNER" description:"Don't remove runner if registration fails"` LeaveRunner bool `long:"leave-runner" env:"REGISTER_LEAVE_RUNNER" description:"Don't remove runner if registration fails"`
RegistrationToken string `short:"r" long:"registration-token" env:"REGISTRATION_TOKEN" description:"Runner's registration token"` RegistrationToken string `short:"r" long:"registration-token" env:"REGISTRATION_TOKEN" description:"Runner's registration token"`
RunUntagged bool `long:"run-untagged" env:"REGISTER_RUN_UNTAGGED" description:"Register to run untagged builds; defaults to 'true' when 'tag-list' is empty"` RunUntagged bool `long:"run-untagged" env:"REGISTER_RUN_UNTAGGED" description:"Register to run untagged builds; defaults to 'true' when 'tag-list' is empty"`
Locked bool `long:"locked" env:"REGISTER_LOCKED" description:"Lock Runner for current project, defaults to 'false'"` Locked bool `long:"locked" env:"REGISTER_LOCKED" description:"Lock Runner for current project, defaults to 'true'"`
common.RunnerConfig common.RunnerConfig
} }
...@@ -157,7 +157,7 @@ func (s *RegisterCommand) askRunner() { ...@@ -157,7 +157,7 @@ func (s *RegisterCommand) askRunner() {
} }
} }
locked, err := strconv.ParseBool(s.ask("locked", "Whether to lock Runner to current project [true/false]:", false)) locked, err := strconv.ParseBool(s.ask("locked", "Whether to lock the Runner to current project [true/false]:", true))
if err != nil { if err != nil {
log.Panicf("Failed to parse option 'locked': %v", err) log.Panicf("Failed to parse option 'locked': %v", err)
} }
......
...@@ -60,11 +60,11 @@ To register a Runner under GNU/Linux: ...@@ -60,11 +60,11 @@ To register a Runner under GNU/Linux:
1. Choose whether to lock the Runner to the current project, you can change 1. Choose whether to lock the Runner to the current project, you can change
this later in GitLab's UI. Useful when the Runner is specific (defaults to this later in GitLab's UI. Useful when the Runner is specific (defaults to
false): true):
``` ```
Whether to lock Runner to current project [true/false]: Whether to lock Runner to current project [true/false]:
[false]: false [true]: true
``` ```
1. Enter the [Runner executor](../executors/README.md): 1. Enter the [Runner executor](../executors/README.md):
...@@ -131,11 +131,11 @@ To register a Runner under macOS: ...@@ -131,11 +131,11 @@ To register a Runner under macOS:
1. Choose whether to lock the Runner to the current project, you can change 1. Choose whether to lock the Runner to the current project, you can change
this later in GitLab's UI. Useful when the Runner is specific (defaults to this later in GitLab's UI. Useful when the Runner is specific (defaults to
false): true):
``` ```
Whether to lock Runner to current project [true/false]: Whether to lock Runner to current project [true/false]:
[false]: false [true]: true
``` ```
1. Enter the [Runner executor](../executors/README.md): 1. Enter the [Runner executor](../executors/README.md):
...@@ -203,11 +203,11 @@ To register a Runner under Windows: ...@@ -203,11 +203,11 @@ To register a Runner under Windows:
1. Choose whether to lock the Runner to the current project, you can change 1. Choose whether to lock the Runner to the current project, you can change
this later in GitLab's UI. Useful when the Runner is specific (defaults to this later in GitLab's UI. Useful when the Runner is specific (defaults to
false): true):
``` ```
Whether to lock Runner to current project [true/false]: Whether to lock Runner to current project [true/false]:
[false]: false [true]: true
``` ```
1. Enter the [Runner executor](../executors/README.md): 1. Enter the [Runner executor](../executors/README.md):
...@@ -281,7 +281,7 @@ To register a Runner under FreeBSD: ...@@ -281,7 +281,7 @@ To register a Runner under FreeBSD:
``` ```
Whether to lock Runner to current project [true/false]: Whether to lock Runner to current project [true/false]:
[false]: false [true]: true
``` ```
1. Enter the [Runner executor](../executors/README.md): 1. Enter the [Runner executor](../executors/README.md):
...@@ -348,11 +348,11 @@ To register a Runner using a Docker container: ...@@ -348,11 +348,11 @@ To register a Runner using a Docker container:
1. Choose whether to lock the Runner to the current project, you can change 1. Choose whether to lock the Runner to the current project, you can change
this later in GitLab's UI. Useful when the Runner is specific (defaults to this later in GitLab's UI. Useful when the Runner is specific (defaults to
false): true):
``` ```
Whether to lock Runner to current project [true/false]: Whether to lock Runner to current project [true/false]:
[false]: false [true]: true
``` ```
1. Enter the [Runner executor](../executors/README.md): 1. Enter the [Runner executor](../executors/README.md):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment