mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
vendor: update buildkit to v0.8
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
20
vendor/github.com/moby/buildkit/client/llb/meta.go
generated
vendored
20
vendor/github.com/moby/buildkit/client/llb/meta.go
generated
vendored
@ -19,6 +19,7 @@ var (
|
||||
keyDir = contextKeyT("llb.exec.dir")
|
||||
keyEnv = contextKeyT("llb.exec.env")
|
||||
keyUser = contextKeyT("llb.exec.user")
|
||||
keyHostname = contextKeyT("llb.exec.hostname")
|
||||
keyExtraHost = contextKeyT("llb.exec.extrahost")
|
||||
keyPlatform = contextKeyT("llb.platform")
|
||||
keyNetwork = contextKeyT("llb.network")
|
||||
@ -143,6 +144,25 @@ func getUser(s State) func(context.Context) (string, error) {
|
||||
}
|
||||
}
|
||||
|
||||
func Hostname(str string) StateOption {
|
||||
return func(s State) State {
|
||||
return s.WithValue(keyHostname, str)
|
||||
}
|
||||
}
|
||||
|
||||
func getHostname(s State) func(context.Context) (string, error) {
|
||||
return func(ctx context.Context) (string, error) {
|
||||
v, err := s.getValue(keyHostname)(ctx)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
if v != nil {
|
||||
return v.(string), nil
|
||||
}
|
||||
return "", nil
|
||||
}
|
||||
}
|
||||
|
||||
func args(args ...string) StateOption {
|
||||
return func(s State) State {
|
||||
return s.WithValue(keyArgs, args)
|
||||
|
Reference in New Issue
Block a user