Call `chainloop reset` to mark the attestation as either failed or cancelled.
(ctx context.Context, // +optional // The trigger that caused the reset. // May be "failure" or "cancellation" trigger string, // The reason for the reset, in human-readable form // +optional reason string, )
| 802 | |
| 803 | // Call `chainloop reset` to mark the attestation as either failed or cancelled. |
| 804 | func (att *Attestation) reset(ctx context.Context, |
| 805 | // +optional |
| 806 | // The trigger that caused the reset. |
| 807 | // May be "failure" or "cancellation" |
| 808 | trigger string, |
| 809 | // The reason for the reset, in human-readable form |
| 810 | // +optional |
| 811 | reason string, |
| 812 | ) error { |
| 813 | args := []string{ |
| 814 | "attestation", "reset", |
| 815 | "--attestation-id", att.AttestationID, |
| 816 | } |
| 817 | |
| 818 | if reason != "" { |
| 819 | args = append(args, "--reason", reason) |
| 820 | } |
| 821 | |
| 822 | if trigger != "" { |
| 823 | args = append(args, "--trigger", trigger) |
| 824 | } |
| 825 | |
| 826 | _, err := att. |
| 827 | Container(0). |
| 828 | WithExec(args, execOpts). |
| 829 | Sync(ctx) |
| 830 | return err |
| 831 | } |
| 832 | |
| 833 | /// standalone API calls |
| 834 |
no test coverage detected