Skip to content

Commit 022a66b

Browse files
authored
feat(dagger): Allow to bypass policy checks on failures (#1773)
Signed-off-by: Javier Rodriguez <[email protected]>
1 parent 30b3b8e commit 022a66b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

extras/dagger/main.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,9 @@ func (att *Attestation) Push(
374374
// The passphrase to decrypt the private key
375375
// +optional
376376
passphrase *dagger.Secret,
377+
// Whether not fail if the policy check fails
378+
// +optional
379+
exceptionBypassPolicyCheck *bool,
377380
) (string, error) {
378381
container := att.Container(0)
379382
args := []string{
@@ -388,6 +391,9 @@ func (att *Attestation) Push(
388391
if passphrase != nil {
389392
container = container.WithSecretVariable("CHAINLOOP_SIGNING_PASSWORD", passphrase)
390393
}
394+
if exceptionBypassPolicyCheck != nil && *exceptionBypassPolicyCheck {
395+
args = append(args, "--exception-bypass-policy-check")
396+
}
391397

392398
return container.WithExec(args, execOpts).Stdout(ctx)
393399
}

0 commit comments

Comments
 (0)