Save implements ArtifactDriver.Save by calling the plugin service
(ctx context.Context, path string, outputArtifact *wfv1.Artifact)
| 196 | |
| 197 | // Save implements ArtifactDriver.Save by calling the plugin service |
| 198 | func (d *Driver) Save(ctx context.Context, path string, outputArtifact *wfv1.Artifact) error { |
| 199 | grpcArtifact := convertToGRPC(outputArtifact) |
| 200 | resp, err := d.client.Save(ctx, &artifact.SaveArtifactRequest{ |
| 201 | Path: path, |
| 202 | OutputArtifact: grpcArtifact, |
| 203 | }) |
| 204 | if err != nil { |
| 205 | return fmt.Errorf("plugin %s save failed: %w", d.pluginName, err) |
| 206 | } |
| 207 | if !resp.Success { |
| 208 | return fmt.Errorf("plugin %s save failed: %s", d.pluginName, resp.Error) |
| 209 | } |
| 210 | return nil |
| 211 | } |
| 212 | |
| 213 | // Delete implements ArtifactDriver.Delete by calling the plugin service |
| 214 | func (d *Driver) Delete(ctx context.Context, artifactRef *wfv1.Artifact) error { |
nothing calls this directly
no test coverage detected