Skip to content

Commit

Permalink
Merge pull request #262 from adamreese/test/skip-build
Browse files Browse the repository at this point in the history
test(e2e): add ability to skip building docker image
  • Loading branch information
endocrimes authored Jul 8, 2024
2 parents 492f4be + c1a82ba commit fefd2b1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions e2e/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ func TestMain(m *testing.M) {

// build and load spin operator image into cluster
func(ctx context.Context, _ *envconf.Config) (context.Context, error) {
if p := utils.RunCommand(`bash -c "cd .. && IMG=ghcr.io/spinkube/spin-operator:dev make docker-build"`); p.Err() != nil {

return ctx, fmt.Errorf(ErrFormat, p.Err(), p.Out())
if os.Getenv("E2E_SKIP_BUILD") == "" { // nolint:forbidigo
if p := utils.RunCommand(`bash -c "cd .. && IMG=ghcr.io/spinkube/spin-operator:dev make docker-build"`); p.Err() != nil {
return ctx, fmt.Errorf(ErrFormat, p.Err(), p.Out())
}
}

if p := utils.RunCommand(("k3d image import -c " + cluster.name + " ghcr.io/spinkube/spin-operator:dev")); p.Err() != nil {
Expand Down

0 comments on commit fefd2b1

Please sign in to comment.