Skip to content
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

make k8s the default builder #541

Merged
merged 12 commits into from
Sep 5, 2024
Prev Previous commit
fix: put the set git repo out of retry loop
  • Loading branch information
mojtaba-esk committed Sep 4, 2024
commit 87dd4d617dbabbd6f1bd682f13f7e88af60f6aa3
14 changes: 6 additions & 8 deletions e2e/system/build_from_git_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,12 @@ func (s *Suite) TestBuildFromGitWithModifications() {
s.Require().NoError(err)

s.T().Log("Setting git repo")
err = s.RetryOperation(func() error {
return target.Build().SetGitRepo(ctx, builder.GitContext{
Repo: gitRepo,
Branch: gitBranch,
Username: "",
Password: "",
})
}, maxRetries)
err = target.Build().SetGitRepo(ctx, builder.GitContext{
Repo: gitRepo,
Branch: gitBranch,
Username: "",
Password: "",
})
s.Require().NoError(err)

s.Require().NoError(target.Build().SetStartCommand("sleep", "infinity"))
Expand Down
7 changes: 2 additions & 5 deletions pkg/instance/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,9 @@ func (b *build) SetGitRepo(ctx context.Context, gitContext builder.GitContext) e
}
b.builderFactory = factory
b.imageName = imageName

if err := b.builderFactory.BuildImageFromGitRepo(ctx, gitContext, imageName); err != nil {
return err
}
b.instance.SetState(StatePreparing)
return nil

return b.builderFactory.BuildImageFromGitRepo(ctx, gitContext, imageName)
}

// SetStartCommand sets the command to run in the instance
Expand Down
Loading