Unverified Commit b7405bc0 authored by Suzanne Selhorn's avatar Suzanne Selhorn Committed by Pedro Pombeiro

Removed please and changed e.g. to example

parent b897a7f6
...@@ -148,7 +148,7 @@ func (s *RegisterCommand) askExecutor() { ...@@ -148,7 +148,7 @@ func (s *RegisterCommand) askExecutor() {
for { for {
names := common.GetExecutorNames() names := common.GetExecutorNames()
executors := strings.Join(names, ", ") executors := strings.Join(names, ", ")
s.Executor = s.ask("executor", "Please enter the executor: "+executors+":", true) s.Executor = s.ask("executor", "Enter an executor: "+executors+":", true)
if common.GetExecutorProvider(s.Executor) != nil { if common.GetExecutorProvider(s.Executor) != nil {
return return
} }
...@@ -196,33 +196,33 @@ func (s *RegisterCommand) askBasicDocker(exampleHelperImage string) { ...@@ -196,33 +196,33 @@ func (s *RegisterCommand) askBasicDocker(exampleHelperImage string) {
s.Docker.Image = s.ask( s.Docker.Image = s.ask(
"docker-image", "docker-image",
fmt.Sprintf("Please enter the default Docker image (e.g. %s):", exampleHelperImage), fmt.Sprintf("Enter the default Docker image (for example, %s):", exampleHelperImage),
) )
} }
func (s *RegisterCommand) askParallels() { func (s *RegisterCommand) askParallels() {
s.Parallels.BaseName = s.ask("parallels-base-name", "Please enter the Parallels VM (e.g. my-vm):") s.Parallels.BaseName = s.ask("parallels-base-name", "Enter the Parallels VM (for example, my-vm):")
} }
func (s *RegisterCommand) askVirtualBox() { func (s *RegisterCommand) askVirtualBox() {
s.VirtualBox.BaseName = s.ask("virtualbox-base-name", "Please enter the VirtualBox VM (e.g. my-vm):") s.VirtualBox.BaseName = s.ask("virtualbox-base-name", "Enter the VirtualBox VM (for example, my-vm):")
} }
func (s *RegisterCommand) askSSHServer() { func (s *RegisterCommand) askSSHServer() {
s.SSH.Host = s.ask("ssh-host", "Please enter the SSH server address (e.g. my.server.com):") s.SSH.Host = s.ask("ssh-host", "Enter the SSH server address (for example, my.server.com):")
s.SSH.Port = s.ask("ssh-port", "Please enter the SSH server port (e.g. 22):", true) s.SSH.Port = s.ask("ssh-port", "Enter the SSH server port (for example, 22):", true)
} }
func (s *RegisterCommand) askSSHLogin() { func (s *RegisterCommand) askSSHLogin() {
s.SSH.User = s.ask("ssh-user", "Please enter the SSH user (e.g. root):") s.SSH.User = s.ask("ssh-user", "Enter the SSH user (for example, root):")
s.SSH.Password = s.ask( s.SSH.Password = s.ask(
"ssh-password", "ssh-password",
"Please enter the SSH password (e.g. docker.io):", "Enter the SSH password (for example, docker.io):",
true, true,
) )
s.SSH.IdentityFile = s.ask( s.SSH.IdentityFile = s.ask(
"ssh-identity-file", "ssh-identity-file",
"Please enter path to SSH identity file (e.g. /home/user/.ssh/id_rsa):", "Enter the path to the SSH identity file (for example, /home/user/.ssh/id_rsa):",
true, true,
) )
} }
...@@ -232,21 +232,25 @@ func (s *RegisterCommand) addRunner(runner *common.RunnerConfig) { ...@@ -232,21 +232,25 @@ func (s *RegisterCommand) addRunner(runner *common.RunnerConfig) {
} }
func (s *RegisterCommand) askRunner() { func (s *RegisterCommand) askRunner() {
s.URL = s.ask("url", "Enter your GitLab instance URL (the gitlab-ci coordinator URL), like https://gitlab.com/:") s.URL = s.ask("url", "Enter the GitLab instance URL [https://gitlab.com/]:", true)
if s.URL == "" {
s.URL = "https://gitlab.com/"
}
if s.Token != "" { if s.Token != "" {
logrus.Infoln("Token specified trying to verify runner...") logrus.Infoln("Token specified trying to verify runner...")
logrus.Warningln("If you want to register use the '-r' instead of '-t'.") logrus.Warningln("If you want to register use the '-r' instead of '-t'.")
if !s.network.VerifyRunner(s.RunnerCredentials) { if !s.network.VerifyRunner(s.RunnerCredentials) {
logrus.Panicln("Failed to verify this runner. Perhaps you are having network problems") logrus.Panicln("Failed to verify the runner. You may be having network problems.")
} }
return return
} }
// we store registration token as token, since we pass that to RunnerCredentials // we store registration token as token, since we pass that to RunnerCredentials
s.Token = s.ask("registration-token", "Please enter the gitlab-ci token for this runner:") s.Token = s.ask("registration-token", "Enter the registration token:")
s.Name = s.ask("name", "Please enter the gitlab-ci description for this runner:") s.Name = s.ask("name", "Enter a description for thr runner:")
s.TagList = s.ask("tag-list", "Please enter the gitlab-ci tags for this runner (comma separated):", true) s.TagList = s.ask("tag-list", "Enter tags for the runner (comma-separated):", true)
if s.TagList == "" { if s.TagList == "" {
s.RunUntagged = true s.RunUntagged = true
...@@ -264,7 +268,7 @@ func (s *RegisterCommand) askRunner() { ...@@ -264,7 +268,7 @@ func (s *RegisterCommand) askRunner() {
result := s.network.RegisterRunner(s.RunnerCredentials, parameters) result := s.network.RegisterRunner(s.RunnerCredentials, parameters)
if result == nil { if result == nil {
logrus.Panicln("Failed to register this runner. Perhaps you are having network problems") logrus.Panicln("Failed to register the runner. You may be having network problems.")
} }
s.Token = result.Token s.Token = result.Token
...@@ -367,7 +371,7 @@ func (s *RegisterCommand) Execute(context *cli.Context) { ...@@ -367,7 +371,7 @@ func (s *RegisterCommand) Execute(context *cli.Context) {
validAccessLevels := []AccessLevel{NotProtected, RefProtected} validAccessLevels := []AccessLevel{NotProtected, RefProtected}
if !accessLevelValid(validAccessLevels, AccessLevel(s.AccessLevel)) { if !accessLevelValid(validAccessLevels, AccessLevel(s.AccessLevel)) {
logrus.Panicln("Given access-level is not valid. " + logrus.Panicln("Given access-level is not valid. " +
"Please refer to gitlab-runner register -h for the correct options.") "Refer to gitlab-runner register -h for the correct options.")
} }
s.askRunner() s.askRunner()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment