Skip to content
Merged
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
2 changes: 1 addition & 1 deletion chart-sync/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.24.0

toolchain go1.24.3

replace github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20251217072256-6c8429c6cc72
replace github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20260227055702-7fe9d47354a0

require (
github.com/caarlos0/env v3.5.0+incompatible
Expand Down
4 changes: 2 additions & 2 deletions chart-sync/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20251217072256-6c8429c6cc72 h1:L1XupZ+tdjzcMjtzncAszzTeDZKUm7h9HThDIFYkTz4=
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20251217072256-6c8429c6cc72/go.mod h1:CqHnvltrng2O40hNGVl56qcAhv7tiXK3SKx47LKyE/A=
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20260227055702-7fe9d47354a0 h1:KnmMU3qEy/QRtEJaUQNnXvCrintij+BYhOJtw+OjxYw=
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20260227055702-7fe9d47354a0/go.mod h1:d6awSGcXQc57s4PJlwcyACovJ4PgBmR9jZJ7h6CScUM=
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
github.com/distribution/distribution/v3 v3.0.0 h1:q4R8wemdRQDClzoNNStftB2ZAfqOiN6UX90KJc4HjyM=
Expand Down
4 changes: 2 additions & 2 deletions chart-sync/vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ github.com/containerd/platforms
# github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
## explicit
github.com/davecgh/go-spew/spew
# github.com/devtron-labs/common-lib v0.19.1 => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20251217072256-6c8429c6cc72
# github.com/devtron-labs/common-lib v0.19.1 => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20260227055702-7fe9d47354a0
## explicit; go 1.24.0
github.com/devtron-labs/common-lib/constants
github.com/devtron-labs/common-lib/fetchAllEnv
Expand Down Expand Up @@ -975,4 +975,4 @@ sigs.k8s.io/structured-merge-diff/v4/value
sigs.k8s.io/yaml
sigs.k8s.io/yaml/goyaml.v2
sigs.k8s.io/yaml/goyaml.v3
# github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20251217072256-6c8429c6cc72
# github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20260227055702-7fe9d47354a0
6 changes: 3 additions & 3 deletions ci-runner/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.24.0

toolchain go1.24.3

replace github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20251217072256-6c8429c6cc72
replace github.com/devtron-labs/common-lib => github.com/devtron-labs/devtron-services/common-lib v0.0.0-20260227055702-7fe9d47354a0

require (
github.com/Knetic/govaluate v3.0.0+incompatible
Expand Down Expand Up @@ -136,12 +136,12 @@ require (
go.uber.org/zap v1.27.0 // indirect
go.yaml.in/yaml/v2 v2.4.2 // indirect
golang.org/x/crypto v0.40.0 // indirect
golang.org/x/net v0.41.0 // indirect
golang.org/x/net v0.42.0 // indirect
golang.org/x/oauth2 v0.30.0 // indirect
golang.org/x/sys v0.34.0 // indirect
golang.org/x/term v0.33.0 // indirect
golang.org/x/text v0.27.0 // indirect
golang.org/x/time v0.11.0 // indirect
golang.org/x/time v0.12.0 // indirect
google.golang.org/api v0.234.0 // indirect
google.golang.org/genproto v0.0.0-20250519155744-55703ea1f237 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20250519155744-55703ea1f237 // indirect
Expand Down
12 changes: 6 additions & 6 deletions ci-runner/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20251217072256-6c8429c6cc72 h1:L1XupZ+tdjzcMjtzncAszzTeDZKUm7h9HThDIFYkTz4=
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20251217072256-6c8429c6cc72/go.mod h1:CqHnvltrng2O40hNGVl56qcAhv7tiXK3SKx47LKyE/A=
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20260227055702-7fe9d47354a0 h1:KnmMU3qEy/QRtEJaUQNnXvCrintij+BYhOJtw+OjxYw=
github.com/devtron-labs/devtron-services/common-lib v0.0.0-20260227055702-7fe9d47354a0/go.mod h1:d6awSGcXQc57s4PJlwcyACovJ4PgBmR9jZJ7h6CScUM=
github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk=
github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
github.com/docker/cli v28.1.1+incompatible h1:eyUemzeI45DY7eDPuwUcmDyDj1pM98oD5MdSpiItp8k=
Expand Down Expand Up @@ -393,8 +393,8 @@ golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk=
golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY=
golang.org/x/net v0.41.0 h1:vBTly1HeNPEn3wtREYfy4GZ/NECgw2Cnl+nK6Nz3uvw=
golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA=
golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs=
golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8=
golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI=
golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
Expand Down Expand Up @@ -450,8 +450,8 @@ golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4=
golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU=
golang.org/x/time v0.11.0 h1:/bpjEDfN9tkoN/ryeYHnv5hcMlc8ncjMcM4XBk5NWV0=
golang.org/x/time v0.11.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg=
golang.org/x/time v0.12.0 h1:ScB/8o8olJvc+CQPWrK3fPZNfh7qgwCrY0zJmoEQLSE=
golang.org/x/time v0.12.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
Expand Down
105 changes: 78 additions & 27 deletions ci-runner/helper/DockerHelper.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,19 @@ import (
"encoding/json"
"errors"
"fmt"
"io"
"io/ioutil"
"log"
"os"
"os/exec"
"path"
"path/filepath"
"strconv"
"strings"
"sync"
"syscall"
"time"

"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds"
Expand All @@ -38,18 +51,6 @@ import (
"github.com/devtron-labs/common-lib/utils/dockerOperations"
"github.com/devtron-labs/common-lib/utils/retryFunc"
"golang.org/x/sync/errgroup"
"io"
"io/ioutil"
"log"
"os"
"os/exec"
"path"
"path/filepath"
"strconv"
"strings"
"sync"
"syscall"
"time"
)

const (
Expand All @@ -74,15 +75,23 @@ type DockerHelper interface {
GetDockerAuthConfigForPrivateRegistries(workflowRequest *CommonWorkflowRequest) *bean.DockerAuthConfig
}

// BuildxK8sClientFactory creates a BuildxK8sInterface from deployment names.
// Abstracted for testability — production code uses newBuildxK8sClient as the default.
type BuildxK8sClientFactory func(deploymentNames []string) (BuildxK8sInterface, error)

type DockerHelperImpl struct {
DockerCommandEnv []string
cmdExecutor CommandExecutor
k8sClientFactory BuildxK8sClientFactory
}

func NewDockerHelperImpl(cmdExecutor CommandExecutor) *DockerHelperImpl {
return &DockerHelperImpl{
DockerCommandEnv: os.Environ(),
cmdExecutor: cmdExecutor,
k8sClientFactory: func(names []string) (BuildxK8sInterface, error) {
return newBuildxK8sClient(names)
},
}
}

Expand Down Expand Up @@ -300,9 +309,27 @@ func (impl *DockerHelperImpl) DockerLogin(ciContext cicxt.CiContext, dockerCrede
return performDockerLogin()
}

// waitForBuilderPods waits until all buildx k8s driver pods reach Running state,
// or returns an error if the deadline is exceeded. Extracted for testability.
func waitForBuilderPods(ctx context.Context, k8sClient BuildxK8sInterface, duration time.Duration) error {
log.Println(util.DEVTRON, fmt.Sprintf("waiting for builder pods to be ready (timeout: %v)", duration))
initDone := make(chan bool, 1)
initCtx, initCancel := context.WithTimeout(ctx, duration)
defer initCancel()
go k8sClient.WaitUntilBuilderPodLive(initCtx, initDone)
select {
case <-initDone:
log.Println(util.DEVTRON, "builder pods are ready for build")
return nil
case <-initCtx.Done():
return fmt.Errorf("builder pods did not reach Running state within %v", duration)
}
}

func (impl *DockerHelperImpl) executeDockerReBuild(ciContext cicxt.CiContext, k8sClient BuildxK8sInterface,
useBuildxK8sDriver bool, dockerBuild string, deploymentNames []string,
dockerBuildStageMetadata bean2.DockerBuildStageMetadata, reBuildLogs []any) error {
dockerBuildStageMetadata bean2.DockerBuildStageMetadata, reBuildLogs []any,
builderPodWaitDuration time.Duration) error {
if !useBuildxK8sDriver {
return nil
}
Expand All @@ -311,7 +338,7 @@ func (impl *DockerHelperImpl) executeDockerReBuild(ciContext cicxt.CiContext, k8
log.Println(util.DEVTRON, fmt.Sprintf(" error in RestartBuilders : %s", k8sErr.Error()))
return k8sErr
}
k8sClient, err := newBuildxK8sClient(deploymentNames)
k8sClient, err := impl.k8sClientFactory(deploymentNames)
if err != nil {
log.Println(util.DEVTRON, " error in creating buildxK8sClient , err : ", err.Error())
return err
Expand All @@ -324,18 +351,15 @@ func (impl *DockerHelperImpl) executeDockerReBuild(ciContext cicxt.CiContext, k8
rebuildImageStage := func() error {
// wait for the builder pod to be up again
startTime := time.Now()
util.LogInfo("Waiting for builder pod to be ready,", "timeout: 2 minutes")
done := make(chan bool)
ctx, cancel := context.WithCancel(ciContext)
util.LogInfo("Waiting for builder pod to be ready,", fmt.Sprintf("timeout: %v", builderPodWaitDuration))
done := make(chan bool, 1) // buffered to prevent goroutine leak on timeout
ctx, cancel := context.WithTimeout(ciContext, builderPodWaitDuration)
defer cancel()
go k8sClient.WaitUntilBuilderPodLive(ctx, done)
select {
case <-done:
// builder pod is up again, continue with the build
cancel()
case <-time.After(2 * time.Minute):
// timeout after 2 minutes
cancel()
case <-ctx.Done():
return BuilderPodDeletedError
}
util.LogInfo("DONE -->", time.Since(startTime).Seconds())
Expand Down Expand Up @@ -403,6 +427,10 @@ func (impl *DockerHelperImpl) BuildArtifact(ciRequest *CommonWorkflowRequest) (s
if err != nil {
log.Println("Error while parsing environment variables", err)
}
builderPodWaitDuration := 2 * time.Minute // backward-compat default
if ciRequest.BuildxBuilderPodWaitDurationSecs > 0 {
builderPodWaitDuration = time.Duration(ciRequest.BuildxBuilderPodWaitDurationSecs) * time.Second
}
if ciRequest.DockerImageTag == "" {
ciRequest.DockerImageTag = "latest"
}
Expand Down Expand Up @@ -453,12 +481,12 @@ func (impl *DockerHelperImpl) BuildArtifact(ciRequest *CommonWorkflowRequest) (s
}
useBuildxK8sDriver, eligibleK8sDriverNodes = dockerBuildConfig.CheckForBuildXK8sDriver()
if useBuildxK8sDriver {
deploymentNames, err = impl.createBuildxBuilderWithK8sDriver(ciContext, ciRequest.PropagateLabelsInBuildxPod, ciRequest.DockerConnection, dockerBuildConfig.BuildxDriverImage, eligibleK8sDriverNodes, ciRequest.PipelineId, ciRequest.WorkflowId)
deploymentNames, err = impl.createBuildxBuilderWithK8sDriver(ciContext, ciRequest.PropagateLabelsInBuildxPod, ciRequest.DockerConnection, dockerBuildConfig.BuildxDriverImage, eligibleK8sDriverNodes, ciRequest.PipelineId, ciRequest.WorkflowId, builderPodWaitDuration)
if err != nil {
log.Println(util.DEVTRON, " error in creating buildxDriver , err : ", err.Error())
return err
}
k8sClient, err = newBuildxK8sClient(deploymentNames)
k8sClient, err = impl.k8sClientFactory(deploymentNames)
if err != nil {
log.Println(util.DEVTRON, " error in creating buildxK8sClient , err : ", err.Error())
return err
Expand All @@ -469,6 +497,11 @@ func (impl *DockerHelperImpl) BuildArtifact(ciRequest *CommonWorkflowRequest) (s
log.Println(util.DEVTRON, " error in registering builder pods ", " err: ", err)
return err
}
// Wait for builder pods to reach Running state before starting the build.
// Prevents false-positive BuilderPodDeletedError from pod startup latency.
if err = waitForBuilderPods(ciContext, k8sClient, builderPodWaitDuration); err != nil {
return err
}
} else {
err = impl.createBuildxBuilderForMultiArchBuild(ciContext, ciRequest.DockerConnection, dockerBuildConfig.BuildxDriverImage)
if err != nil {
Expand Down Expand Up @@ -534,7 +567,7 @@ func (impl *DockerHelperImpl) BuildArtifact(ciRequest *CommonWorkflowRequest) (s
reBuildLogs = []any{fmt.Sprintf("Starting re docker build (Attempt %d) : ", attempt), dockerBuild}
}
return impl.executeDockerReBuild(ciContext, k8sClient, useBuildxK8sDriver, dockerBuild,
deploymentNames, dockerBuildStageMetadata, reBuildLogs)
deploymentNames, dockerBuildStageMetadata, reBuildLogs, builderPodWaitDuration)
}
err = retryFunc.RetryWithOutLogging(callback, retryFunc.IsRetryableError, maxRetry, 1*time.Second)
if err != nil {
Expand Down Expand Up @@ -1097,14 +1130,14 @@ func (impl *DockerHelperImpl) createBuildxBuilderForMultiArchBuild(ciContext cic
return nil
}

func (impl *DockerHelperImpl) createBuildxBuilderWithK8sDriver(ciContext cicxt.CiContext, propagateLabelsInBuildxPod bool, dockerConnection, buildxDriverImage string, builderNodes []map[string]string, ciPipelineId, ciWorkflowId int) ([]string, error) {
func (impl *DockerHelperImpl) createBuildxBuilderWithK8sDriver(ciContext cicxt.CiContext, propagateLabelsInBuildxPod bool, dockerConnection, buildxDriverImage string, builderNodes []map[string]string, ciPipelineId, ciWorkflowId int, timeout time.Duration) ([]string, error) {
deploymentNames := make([]string, 0)
if len(builderNodes) == 0 {
return deploymentNames, errors.New("atleast one node is expected for builder with kubernetes driver")
}
for i := 0; i < len(builderNodes); i++ {
nodeOpts := builderNodes[i]
builderCmd, deploymentName, err := getBuildxK8sDriverCmd(propagateLabelsInBuildxPod, dockerConnection, buildxDriverImage, nodeOpts, ciPipelineId, ciWorkflowId)
builderCmd, deploymentName, err := getBuildxK8sDriverCmd(propagateLabelsInBuildxPod, dockerConnection, buildxDriverImage, nodeOpts, ciPipelineId, ciWorkflowId, timeout)
if err != nil {
return deploymentNames, err
}
Expand Down Expand Up @@ -1181,7 +1214,7 @@ func (impl *DockerHelperImpl) runCmd(cmd string) (error, *bytes.Buffer) {
return err, errBuf
}

func getBuildxK8sDriverCmd(propagateLabelsInBuildxPod bool, dockerConnection, buildxDriverImage string, driverOpts map[string]string, ciPipelineId, ciWorkflowId int) (string, string, error) {
func getBuildxK8sDriverCmd(propagateLabelsInBuildxPod bool, dockerConnection, buildxDriverImage string, driverOpts map[string]string, ciPipelineId, ciWorkflowId int, timeout time.Duration) (string, string, error) {
buildxCreate := "docker buildx create --buildkitd-flags '--allow-insecure-entitlement network.host --allow-insecure-entitlement security.insecure' --name=%s --driver=kubernetes --node=%s --bootstrap "
nodeName := driverOpts["node"]
if nodeName == "" {
Expand All @@ -1203,6 +1236,9 @@ func getBuildxK8sDriverCmd(propagateLabelsInBuildxPod bool, dockerConnection, bu
}

driverOpts["driverOptions"] = getBuildXDriverOptionsWithImage(buildxDriverImage, driverOpts["driverOptions"])
if timeout > 0 {
driverOpts["driverOptions"] = getBuildXDriverOptionsWithTimeout(timeout, driverOpts["driverOptions"])
}
if len(driverOpts["driverOptions"]) > 0 {
buildxCreate += " '--driver-opt=%s' "
buildxCreate = fmt.Sprintf(buildxCreate, driverOpts["driverOptions"])
Expand All @@ -1227,6 +1263,21 @@ func getBuildXDriverOptionsWithImage(buildxDriverImage, driverOptions string) st
return driverOptions
}

func getBuildXDriverOptionsWithTimeout(timeout time.Duration, driverOptions string) string {
if strings.HasPrefix(driverOptions, "timeout=") ||
strings.Contains(driverOptions, ",timeout=") {
// if timeout is already present in driver options then do not override it, just return the existing options
return driverOptions
}
timeoutOption := fmt.Sprintf("\"timeout=%s\"", timeout.String())
if len(driverOptions) > 0 {
driverOptions += fmt.Sprintf(",%s", timeoutOption)
} else {
driverOptions = timeoutOption
}
return driverOptions
}

func getBuildXDriverOptionsWithLabelsAndAnnotations(driverOptions string) (string, error) {
// not passing annotation as of now because --driver-opt=annotations is not supported by buildx if contains quotes
labels := make(map[string]string)
Expand Down
4 changes: 2 additions & 2 deletions ci-runner/helper/DockerHelper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func TestCreateBuildXK8sDriver(t *testing.T) {
eligibleK8sNodes := dockerBuildConfig.GetEligibleK8sDriverNodes()
impl := getDockerHelperImpl()
ciContext := cicxt.BuildCiContext(context.Background(), true)
_, err := impl.createBuildxBuilderWithK8sDriver(ciContext, false, "", "", eligibleK8sNodes, 1, 1)
_, err := impl.createBuildxBuilderWithK8sDriver(ciContext, false, "", "", eligibleK8sNodes, 1, 1, 0)
t.Cleanup(func() {
buildxDelete := fmt.Sprintf("docker buildx rm %s", BUILDX_K8S_DRIVER_NAME)
builderRemoveCmd := exec.Command("/bin/sh", "-c", buildxDelete)
Expand All @@ -64,7 +64,7 @@ func TestCleanBuildxK8sDriver(t *testing.T) {
eligibleK8sNodes := dockerBuildConfig.GetEligibleK8sDriverNodes()
impl := getDockerHelperImpl()
ciContext := cicxt.BuildCiContext(context.Background(), true)
_, err := impl.createBuildxBuilderWithK8sDriver(ciContext, false, "", "", eligibleK8sNodes, 1, 1)
_, err := impl.createBuildxBuilderWithK8sDriver(ciContext, false, "", "", eligibleK8sNodes, 1, 1, 0)
if err != nil {
fmt.Println(err.Error())
t.Fail()
Expand Down
Loading
Loading