Skip to content

Commit 755ae39

Browse files
committed
tests: add signer fixture progress metadata
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
1 parent ede1c33 commit 755ae39

2 files changed

Lines changed: 9 additions & 7 deletions

File tree

frontend/request.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ func MaybeSign(ctx context.Context, client gwclient.Client, st llb.State, spec *
203203
Warnf(ctx, client, st, "Spec signing config overwritten by config at path %q in build-context %q", cfgPath, configCtxName)
204204
}
205205

206-
cfg, err := getSigningConfigFromContext(ctx, client, cfgPath, configCtxName, sOpt)
206+
cfg, err := getSigningConfigFromContext(ctx, client, cfgPath, configCtxName, sOpt, opts...)
207207
if err != nil {
208208
return dalec.ErrorState(llb.Scratch(), err)
209209
}

test/fixtures/signer/main.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import (
1616
"github.com/moby/buildkit/util/appcontext"
1717
"github.com/moby/buildkit/util/bklog"
1818
"github.com/pkg/errors"
19+
"github.com/project-dalec/dalec"
1920
"github.com/project-dalec/dalec/frontend/pkg/bkfs"
2021
"github.com/sirupsen/logrus"
2122
"google.golang.org/grpc/grpclog"
@@ -90,10 +91,11 @@ func main() {
9091
return nil, errors.Wrap(err, "error marshalling file manifest")
9192
}
9293

94+
pg := dalec.ProgressGroup("phony signer output")
9395
output := llb.Scratch().
94-
File(llb.Mkfile("/target", 0o600, []byte(target))).
95-
File(llb.Mkfile("/config.json", 0o600, configBytes)).
96-
File(llb.Mkfile("/manifest.json", 0o600, mfst))
96+
File(llb.Mkfile("/target", 0o600, []byte(target)), pg).
97+
File(llb.Mkfile("/config.json", 0o600, configBytes), pg).
98+
File(llb.Mkfile("/manifest.json", 0o600, mfst), pg)
9799

98100
// For any build-arg seen, write a file to /env/<KEY> with the contents
99101
// being the value of the arg.
@@ -104,11 +106,11 @@ func main() {
104106
continue
105107
}
106108
output = output.
107-
File(llb.Mkdir("/env", 0o755)).
108-
File(llb.Mkfile("/env/"+key, 0o600, []byte(v)))
109+
File(llb.Mkdir("/env", 0o755), pg).
110+
File(llb.Mkfile("/env/"+key, 0o600, []byte(v)), pg)
109111
}
110112

111-
def, err := output.Marshal(ctx)
113+
def, err := output.Marshal(ctx, pg)
112114
if err != nil {
113115
return nil, err
114116
}

0 commit comments

Comments
 (0)