setup_runner

package
v0.81.0-dev-2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &cobra.Command{
	Use:     "setup-runner",
	Short:   "Setup Gitlab Runner in Docker",
	Aliases: []string{"sr"},
	Run: func(c *cobra.Command, args []string) {
		var err error

		hostname, err := os.Hostname()
		if err != nil {
			log.Fatal(err)
		}

		gitlabUrl := FlagGitlabUrl
		token := FlagToken

		if FlagGitlabName != "" {
			gitlabUrl, token, err = vault_gitlab_ci.GetGitlabCiSecrets(FlagGitlabName)
			if err != nil {
				log.Fatal(err)
			}
		}

		if gitlabUrl == "" {
			log.Fatal("flags gitlab-url and registration-token OR flag gitlab (for Vault) are required")
		}

		err = setup_runner_utils.SetupGitlabRunnerDocker(gitlabUrl, token, hostname, FlagConcurrency, !FlagDontForwardDockerSocket, FlagDryRun)
		if err != nil {
			log.Fatal(err)
		}
	},
}
View Source
var FlagConcurrency int
View Source
var FlagDontForwardDockerSocket bool
View Source
var FlagDryRun bool
View Source
var FlagGitlabName string
View Source
var FlagGitlabUrl string
View Source
var FlagToken string

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL