Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove tekton as a provenance format #685

Merged
merged 1 commit into from
Jan 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ Supported keys include:

| Key | Description | Supported Values | Default |
| :--- | :--- | :--- | :--- |
| `artifacts.taskrun.format` | The format to store `TaskRun` payloads in. | `tekton`, `in-toto`| `tekton` |
| `artifacts.taskrun.format` | The format to store `TaskRun` payloads in. | `in-toto`| `in-toto` |
| `artifacts.taskrun.storage` | The storage backend to store `TaskRun` signatures in. Multiple backends can be specified with comma-separated list ("tekton,oci"). To disable the `TaskRun` artifact input an empty string (""). | `tekton`, `oci`, `gcs`, `docdb`, `grafeas` | `tekton` |
| `artifacts.taskrun.signer` | The signature backend to sign `TaskRun` payloads with. | `x509`, `kms` | `x509` |

### PipelineRun Configuration

| Key | Description | Supported Values | Default |
| :--- | :--- | :--- | :--- |
| `artifacts.pipelinerun.format` | The format to store `PipelineRun` payloads in. | `tekton`, `in-toto`| `tekton` |
| `artifacts.pipelinerun.format` | The format to store `PipelineRun` payloads in. | `in-toto`| `in-toto` |
| `artifacts.pipelinerun.storage` | The storage backend to store `PipelineRun` signatures in. Multiple backends can be specified with comma-separated list ("tekton,oci"). To disable the `PipelineRun` artifact input an empty string (""). | `tekton`, `oci`, `gcs`, `docdb`, `grafeas` | `tekton` |
| `artifacts.pipelinerun.signer` | The signature backend to sign `PipelineRun` payloads with. | `x509`, `kms` | `x509` |

Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/getting-started-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ storage and format is set to `tekton`.
You can set these fields by running the following command:

```shell
kubectl patch configmap chains-config -n tekton-chains -p='{"data":{"artifacts.oci.storage": "", "artifacts.taskrun.format":"tekton", "artifacts.taskrun.storage": "tekton"}}'
kubectl patch configmap chains-config -n tekton-chains -p='{"data":{"artifacts.oci.storage": "", "artifacts.taskrun.format":"in-toto", "artifacts.taskrun.storage": "tekton"}}'
```

Then restart the controller to ensure it picks up the changes:
Expand Down
1 change: 0 additions & 1 deletion pkg/chains/formats/all/all.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@ package all
import (
_ "github.com/tektoncd/chains/pkg/chains/formats/simple"
_ "github.com/tektoncd/chains/pkg/chains/formats/slsa/v1"
_ "github.com/tektoncd/chains/pkg/chains/formats/tekton"
)
59 changes: 0 additions & 59 deletions pkg/chains/formats/tekton/tekton.go

This file was deleted.

51 changes: 0 additions & 51 deletions pkg/chains/formats/tekton/tekton_test.go

This file was deleted.

46 changes: 7 additions & 39 deletions pkg/chains/signing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func TestSigner_Sign(t *testing.T) {
tcfg := &config.Config{
Artifacts: config.ArtifactConfigs{
TaskRuns: config.Artifact{
Format: "tekton",
Format: "in-toto",
StorageBackend: sets.NewString("mock"),
Signer: "x509",
},
Expand All @@ -67,7 +67,7 @@ func TestSigner_Sign(t *testing.T) {
pcfg := &config.Config{
Artifacts: config.ArtifactConfigs{
PipelineRuns: config.Artifact{
Format: "tekton",
Format: "in-toto",
StorageBackend: sets.NewString("mock"),
Signer: "x509",
},
Expand Down Expand Up @@ -240,22 +240,6 @@ func TestSigner_Transparency(t *testing.T) {
},
getNewObject: newTaskRun,
},
{
name: "taskrun tekton",
cfg: &config.Config{
Artifacts: config.ArtifactConfigs{
TaskRuns: config.Artifact{
Format: "tekton",
StorageBackend: sets.NewString("mock"),
Signer: "x509",
},
},
Transparency: config.TransparencyConfig{
Enabled: false,
},
},
getNewObject: newTaskRun,
},
{
name: "pipelinerun in-toto",
cfg: &config.Config{
Expand All @@ -272,22 +256,6 @@ func TestSigner_Transparency(t *testing.T) {
},
getNewObject: newPipelineRun,
},
{
name: "pipelinerun tekton",
cfg: &config.Config{
Artifacts: config.ArtifactConfigs{
PipelineRuns: config.Artifact{
Format: "tekton",
StorageBackend: sets.NewString("mock"),
Signer: "x509",
},
},
Transparency: config.TransparencyConfig{
Enabled: false,
},
},
getNewObject: newPipelineRun,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down Expand Up @@ -380,7 +348,7 @@ func TestSigningObjects(t *testing.T) {
config: config.Config{
Artifacts: config.ArtifactConfigs{
TaskRuns: config.Artifact{
Format: "tekton",
Format: "in-toto",
StorageBackend: sets.NewString("mock"),
Signer: "x509",
},
Expand All @@ -394,12 +362,12 @@ func TestSigningObjects(t *testing.T) {
config: config.Config{
Artifacts: config.ArtifactConfigs{
TaskRuns: config.Artifact{
Format: "tekton",
Format: "in-toto",
StorageBackend: sets.NewString("mock"),
Signer: "x509",
},
OCI: config.Artifact{
Format: "tekton",
Format: "in-toto",
StorageBackend: sets.NewString("mock"),
Signer: "x509",
},
Expand All @@ -413,11 +381,11 @@ func TestSigningObjects(t *testing.T) {
config: config.Config{
Artifacts: config.ArtifactConfigs{
TaskRuns: config.Artifact{
Format: "tekton",
Format: "in-toto",
StorageBackend: sets.NewString("mock"),
},
OCI: config.Artifact{
Format: "tekton",
Format: "in-toto",
StorageBackend: sets.NewString("mock"),
},
},
Expand Down
8 changes: 4 additions & 4 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,12 +208,12 @@ func defaultConfig() *Config {
return &Config{
Artifacts: ArtifactConfigs{
TaskRuns: Artifact{
Format: "tekton",
Format: "in-toto",
StorageBackend: sets.NewString("tekton"),
Signer: "x509",
},
PipelineRuns: Artifact{
Format: "tekton",
Format: "in-toto",
StorageBackend: sets.NewString("tekton"),
Signer: "x509",
},
Expand Down Expand Up @@ -250,12 +250,12 @@ func NewConfigFromMap(data map[string]string) (*Config, error) {
if err := cm.Parse(data,
// Artifact-specific configs
// TaskRuns
asString(taskrunFormatKey, &cfg.Artifacts.TaskRuns.Format, "tekton", "in-toto"),
asString(taskrunFormatKey, &cfg.Artifacts.TaskRuns.Format, "in-toto"),
asStringSet(taskrunStorageKey, &cfg.Artifacts.TaskRuns.StorageBackend, sets.NewString("tekton", "oci", "gcs", "docdb", "grafeas", "kafka")),
asString(taskrunSignerKey, &cfg.Artifacts.TaskRuns.Signer, "x509", "kms"),

// PipelineRuns
asString(pipelinerunFormatKey, &cfg.Artifacts.PipelineRuns.Format, "tekton", "in-toto"),
asString(pipelinerunFormatKey, &cfg.Artifacts.PipelineRuns.Format, "in-toto"),
asStringSet(pipelinerunStorageKey, &cfg.Artifacts.PipelineRuns.StorageBackend, sets.NewString("tekton", "oci", "grafeas")),
asString(pipelinerunSignerKey, &cfg.Artifacts.PipelineRuns.Signer, "x509", "kms"),

Expand Down
Loading