Skip to content

Commit

Permalink
Fix wait-for-job binary
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha committed Oct 5, 2023
1 parent fdfe1b4 commit 6f2760c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions pkg/cmds/hostctl.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ func NewCmdHostctl(ctx context.Context) *cobra.Command {
linode.DefaultOptions.GitHubToken = ghToken
firecracker.DefaultOptions.GitHubToken = ghToken

// For testing
// ncOpts.Addr = "192.168.0.233:4222"
// firecracker.DefaultOptions.NumInstances = 1

var natsUsername, natsPassword string
if v, ok := os.LookupEnv("NATS_USERNAME"); ok {
natsUsername = v
Expand All @@ -65,9 +69,6 @@ func NewCmdHostctl(ctx context.Context) *cobra.Command {
firecracker.DefaultOptions.NatsUsername = natsUsername
firecracker.DefaultOptions.NatsPassword = natsPassword

// For testing
// firecracker.DefaultOptions.NumInstances = 1

var err error
nc, err = backend.NewConnection(ncOpts.Addr, ncOpts.CredFile)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmds/wait_for_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func NewCmdWaitForJob() *cobra.Command {
// export runner_scope=$(cat repo_owner.txt)
// export labels=
label, _ := backend.RunsOnSelfHosted(event)
jobVars := fmt.Sprintf(`export runner_scope=%/%s
jobVars := fmt.Sprintf(`export runner_scope=%s/%s
export labels=%s
`, event.GetRepo().GetOwner().GetLogin(), event.GetRepo().GetName(), label)
return os.WriteFile("job_vars.txt", []byte(jobVars), 0o644)
Expand Down

0 comments on commit 6f2760c

Please sign in to comment.