Skip to content

Commit

Permalink
Remove tekton as a provenance format
Browse files Browse the repository at this point in the history
This PR removes tekton as a provenance format since it was
deprecated in an earlier release.
  • Loading branch information
chitrangpatel committed Jan 19, 2023
1 parent b4e5b53 commit c21f2f9
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 180 deletions.
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/intotoite6"
_ "github.com/tektoncd/chains/pkg/chains/formats/simple"
_ "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

0 comments on commit c21f2f9

Please sign in to comment.