Skip to content

feat: add a --bootstrap-script to allow custom bootstrapping #1

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 16 additions & 10 deletions cmd/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,14 @@ type CLI struct {
Prompt bool `help:"Prompt before running steps"`
DryRun bool `help:"Dry run, don't actually run"`
ListenPort int `help:"The port to run on"`
BootstrapScript string `help:"Specify an alternative custom bootstrap command" type:"existingfile"`
}

func (c *CLI) Run(ctx *kong.Context) error {
if c.Debug {
runner.Debug = true
}

quit := make(chan os.Signal, 1)
signal.Notify(quit, os.Interrupt)

Expand Down Expand Up @@ -69,16 +74,17 @@ func (c *CLI) Run(ctx *kong.Context) error {
}

return runner.Run(cancelCtx, runner.Params{
Debug: c.Debug,
DebugHTTP: c.DebugHTTP,
Env: c.Env,
Metadata: c.Metadata,
DryRun: c.DryRun,
Command: command,
Dir: wd,
Prompt: c.Prompt,
StepFilter: stepFilterReg,
ListenPort: c.ListenPort,
Debug: c.Debug,
DebugHTTP: c.DebugHTTP,
Env: c.Env,
Metadata: c.Metadata,
DryRun: c.DryRun,
Command: command,
Dir: wd,
Prompt: c.Prompt,
StepFilter: stepFilterReg,
ListenPort: c.ListenPort,
BootstrapScript: c.BootstrapScript,
JobTemplate: runner.Job{
Commit: commit,
Branch: branch,
Expand Down
23 changes: 2 additions & 21 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,22 @@ module github.com/lox/bkl
go 1.17

require (
github.com/ahmetb/go-cursor v0.0.0-20131010032410-8136607ea412
github.com/alecthomas/kong v0.2.18
github.com/bmatcuk/doublestar v1.3.4
github.com/briandowns/spinner v1.16.0
github.com/buildkite/cli v1.2.0
github.com/fatih/color v1.13.0
github.com/go-test/deep v1.0.8
github.com/google/go-github v17.0.0+incompatible
github.com/manifoldco/promptui v0.9.0
github.com/mitchellh/go-homedir v1.1.0
github.com/sahilm/fuzzy v0.1.0
github.com/satori/go.uuid v1.2.0
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
)

require (
github.com/99designs/keyring v1.1.6 // indirect
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e // indirect
github.com/danieljoos/wincred v1.0.2 // indirect
github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b // indirect
github.com/godbus/dbus v4.1.0+incompatible // indirect
github.com/golang/protobuf v1.4.2 // indirect
github.com/google/go-querystring v0.0.0-20170111101155-53e6ce116135 // indirect
github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect
github.com/keybase/go-keychain v0.0.0-20191022214133-1c06e666bc46 // indirect
github.com/kr/pretty v0.1.0 // indirect
github.com/mattn/go-colorable v0.1.9 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mtibben/percent v0.2.1 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/skratchdot/open-golang v0.0.0-20160302144031-75fb7ed4208c // indirect
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110 // indirect
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c // indirect
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 // indirect
google.golang.org/appengine v1.6.6 // indirect
google.golang.org/protobuf v1.25.0 // indirect
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect
)
Loading