Skip to content

Commit 86026ba

Browse files
committed
cleanup: use CredsDir from entrypoint pkg instead of pipeline
1 parent 29b53ce commit 86026ba

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

cmd/entrypoint/main.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ import (
3131
"github.com/containerd/containerd/platforms"
3232
"github.com/tektoncd/pipeline/cmd/entrypoint/subcommands"
3333
featureFlags "github.com/tektoncd/pipeline/pkg/apis/config"
34-
"github.com/tektoncd/pipeline/pkg/apis/pipeline"
3534
v1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1"
3635
"github.com/tektoncd/pipeline/pkg/credentials/dockercreds"
3736
"github.com/tektoncd/pipeline/pkg/credentials/gitcreds"
@@ -98,7 +97,7 @@ func main() {
9897
// stored credentials.
9998
builders := []credwriter.Writer{dockercreds.NewBuilder(), gitcreds.NewBuilder()}
10099
for _, c := range builders {
101-
if err := c.Write(pipeline.CredsDir); err != nil {
100+
if err := c.Write(entrypoint.CredsDir); err != nil {
102101
log.Printf("Error initializing credentials: %s", err)
103102
}
104103
}

pkg/entrypoint/entrypointer.go

+5
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ const (
5656
breakpointExitSuffix = ".breakpointexit"
5757
breakpointBeforeStepSuffix = ".beforestepexit"
5858
)
59+
const (
60+
// CredsDir is the directory where credentials are placed to meet the legacy credentials
61+
// helpers image (aka "creds-init") contract
62+
CredsDir = "/tekton/creds" // #nosec
63+
)
5964

6065
// DebugBeforeStepError is an error means mark before step breakpoint failure
6166
type DebugBeforeStepError string

0 commit comments

Comments
 (0)