Skip to content

Commit

Permalink
fix(setup_runner): Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejsika committed Feb 26, 2023
1 parent b11dc93 commit 7395ff8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions cmd/gitlab_ci/setup_runner/setup_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
var FlagGitlabUrl string
var FlagRegistrationToken string
var FlagGitlabName string
var FlagConcurency int
var FlagConcurrency int
var FlagDryRun bool

var Cmd = &cobra.Command{
Expand Down Expand Up @@ -43,7 +43,7 @@ var Cmd = &cobra.Command{
log.Fatal("flags gitlab-url and registration-token OR flag gitlab (for Vault) are required")
}

err = setup_runner_utils.SetupGitlabRunnerDocker(gitlabUrl, registrationToken, hostname, FlagConcurency, FlagDryRun)
err = setup_runner_utils.SetupGitlabRunnerDocker(gitlabUrl, registrationToken, hostname, FlagConcurrency, FlagDryRun)
if err != nil {
log.Fatal(err)
}
Expand Down Expand Up @@ -76,8 +76,8 @@ func init() {
)
Cmd.MarkFlagsMutuallyExclusive("gitlab-url", "gitlab")
Cmd.PersistentFlags().IntVarP(
&FlagConcurency,
"concurency",
&FlagConcurrency,
"concurrency",
"c",
1,
"Set maximun concurency",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/sikalabs/slu/utils/exec_utils"
)

func SetupGitlabRunnerDocker(gitlabUrl, registrationToken, hostname string, concurency int, dryRun bool) error {
func SetupGitlabRunnerDocker(gitlabUrl, registrationToken, hostname string, concurrency int, dryRun bool) error {
var err error
var args []string

Expand Down Expand Up @@ -70,10 +70,10 @@ func SetupGitlabRunnerDocker(gitlabUrl, registrationToken, hostname string, conc
}
}

if concurency != 1 {
if concurrency != 1 {
args = []string{
"exec", "gitlab-runner",
"sed", "-i", "s+concurrent = 1+concurrent = " + strconv.Itoa(concurency) + "+g",
"sed", "-i", "s+concurrent = 1+concurrent = " + strconv.Itoa(concurrency) + "+g",
"/etc/gitlab-runner/config.toml",
}
if dryRun {
Expand Down

0 comments on commit 7395ff8

Please sign in to comment.