vendor: update buildkit to 8effd45b

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
Tonis Tiigi
2021-03-22 15:23:46 -07:00
parent 28809b82a2
commit d40a6082fa
618 changed files with 75150 additions and 10913 deletions

View File

@ -661,6 +661,14 @@ func (f *FileOp) Marshal(ctx context.Context, c *Constraints) (digest.Digest, []
pfo := &pb.FileOp{}
if f.constraints.Platform == nil {
p, err := getPlatform(*f.action.state)(ctx)
if err != nil {
return "", nil, nil, nil, err
}
f.constraints.Platform = p
}
pop, md := MarshalConstraints(c, &f.constraints)
pop.Op = &pb.Op_File{
File: pfo,

View File

@ -5,7 +5,6 @@ import (
_ "crypto/sha256" // for opencontainers/go-digest
"encoding/json"
"os"
"regexp"
"strconv"
"strings"
@ -207,8 +206,6 @@ const (
gitProtocolUnknown
)
var gitSSHRegex = regexp.MustCompile("^([a-z0-9]+@)?[^:]+:.*$")
func getGitProtocol(remote string) (string, int) {
prefixes := map[string]int{
"http://": gitProtocolHTTP,
@ -224,7 +221,7 @@ func getGitProtocol(remote string) (string, int) {
}
}
if protocolType == gitProtocolUnknown && gitSSHRegex.MatchString(remote) {
if protocolType == gitProtocolUnknown && sshutil.IsImplicitSSHTransport(remote) {
protocolType = gitProtocolSSH
}
@ -254,6 +251,9 @@ func Git(remote, ref string, opts ...GitOption) State {
remote = parts[0] + "/" + parts[1]
}
}
if protocolType == gitProtocolUnknown {
url = "https://" + url
}
id := remote