diff --git a/app/cli/pkg/action/workflow_run_list.go b/app/cli/pkg/action/workflow_run_list.go index face16221..075294fbc 100644 --- a/app/cli/pkg/action/workflow_run_list.go +++ b/app/cli/pkg/action/workflow_run_list.go @@ -1,5 +1,5 @@ // -// Copyright 2024-2025 The Chainloop Authors. +// Copyright 2024-2026 The Chainloop Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -193,6 +193,7 @@ func humanizedRunnerType(in v1.CraftingSchema_Runner_RunnerType) string { *v1.CraftingSchema_Runner_CIRCLECI_BUILD.Enum(): "CircleCI Build", *v1.CraftingSchema_Runner_DAGGER_PIPELINE.Enum(): "Dagger Pipeline", *v1.CraftingSchema_Runner_TEAMCITY_PIPELINE.Enum(): "TeamCity Pipeline", + *v1.CraftingSchema_Runner_TEKTON_PIPELINE.Enum(): "Tekton Pipeline", } hrt, ok := mapping[in] diff --git a/app/cli/pkg/action/workflow_run_list_test.go b/app/cli/pkg/action/workflow_run_list_test.go index afd7c2dfa..fd452ef27 100644 --- a/app/cli/pkg/action/workflow_run_list_test.go +++ b/app/cli/pkg/action/workflow_run_list_test.go @@ -1,5 +1,5 @@ // -// Copyright 2023 The Chainloop Authors. +// Copyright 2023-2026 The Chainloop Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -64,6 +64,10 @@ func (s *workflowRunListSuite) TestHumanizedRunnerType() { name: "teamcity runner", testInput: v1.CraftingSchema_Runner_TEAMCITY_PIPELINE, expectedOutput: "TeamCity Pipeline", + }, { + name: "tekton runner", + testInput: v1.CraftingSchema_Runner_TEKTON_PIPELINE, + expectedOutput: "Tekton Pipeline", }, { name: "unknown runner", testInput: -34, diff --git a/app/controlplane/api/gen/frontend/workflowcontract/v1/crafting_schema.ts b/app/controlplane/api/gen/frontend/workflowcontract/v1/crafting_schema.ts index 823bc500e..5703a9ca2 100644 --- a/app/controlplane/api/gen/frontend/workflowcontract/v1/crafting_schema.ts +++ b/app/controlplane/api/gen/frontend/workflowcontract/v1/crafting_schema.ts @@ -59,6 +59,7 @@ export enum CraftingSchema_Runner_RunnerType { CIRCLECI_BUILD = 5, DAGGER_PIPELINE = 6, TEAMCITY_PIPELINE = 7, + TEKTON_PIPELINE = 8, UNRECOGNIZED = -1, } @@ -88,6 +89,9 @@ export function craftingSchema_Runner_RunnerTypeFromJSON(object: any): CraftingS case 7: case "TEAMCITY_PIPELINE": return CraftingSchema_Runner_RunnerType.TEAMCITY_PIPELINE; + case 8: + case "TEKTON_PIPELINE": + return CraftingSchema_Runner_RunnerType.TEKTON_PIPELINE; case -1: case "UNRECOGNIZED": default: @@ -113,6 +117,8 @@ export function craftingSchema_Runner_RunnerTypeToJSON(object: CraftingSchema_Ru return "DAGGER_PIPELINE"; case CraftingSchema_Runner_RunnerType.TEAMCITY_PIPELINE: return "TEAMCITY_PIPELINE"; + case CraftingSchema_Runner_RunnerType.TEKTON_PIPELINE: + return "TEKTON_PIPELINE"; case CraftingSchema_Runner_RunnerType.UNRECOGNIZED: default: return "UNRECOGNIZED"; diff --git a/app/controlplane/api/gen/jsonschema/attestation.v1.Attestation.jsonschema.json b/app/controlplane/api/gen/jsonschema/attestation.v1.Attestation.jsonschema.json index 52e25ff42..79631f02e 100644 --- a/app/controlplane/api/gen/jsonschema/attestation.v1.Attestation.jsonschema.json +++ b/app/controlplane/api/gen/jsonschema/attestation.v1.Attestation.jsonschema.json @@ -60,7 +60,8 @@ "JENKINS_JOB", "CIRCLECI_BUILD", "DAGGER_PIPELINE", - "TEAMCITY_PIPELINE" + "TEAMCITY_PIPELINE", + "TEKTON_PIPELINE" ], "title": "Runner Type", "type": "string" @@ -166,7 +167,8 @@ "JENKINS_JOB", "CIRCLECI_BUILD", "DAGGER_PIPELINE", - "TEAMCITY_PIPELINE" + "TEAMCITY_PIPELINE", + "TEKTON_PIPELINE" ], "title": "Runner Type", "type": "string" diff --git a/app/controlplane/api/gen/jsonschema/attestation.v1.Attestation.schema.json b/app/controlplane/api/gen/jsonschema/attestation.v1.Attestation.schema.json index a63621a89..733a8dbed 100644 --- a/app/controlplane/api/gen/jsonschema/attestation.v1.Attestation.schema.json +++ b/app/controlplane/api/gen/jsonschema/attestation.v1.Attestation.schema.json @@ -60,7 +60,8 @@ "JENKINS_JOB", "CIRCLECI_BUILD", "DAGGER_PIPELINE", - "TEAMCITY_PIPELINE" + "TEAMCITY_PIPELINE", + "TEKTON_PIPELINE" ], "title": "Runner Type", "type": "string" @@ -166,7 +167,8 @@ "JENKINS_JOB", "CIRCLECI_BUILD", "DAGGER_PIPELINE", - "TEAMCITY_PIPELINE" + "TEAMCITY_PIPELINE", + "TEKTON_PIPELINE" ], "title": "Runner Type", "type": "string" diff --git a/app/controlplane/api/gen/jsonschema/attestation.v1.RunnerEnvironment.jsonschema.json b/app/controlplane/api/gen/jsonschema/attestation.v1.RunnerEnvironment.jsonschema.json index 5232b1d25..66d729043 100644 --- a/app/controlplane/api/gen/jsonschema/attestation.v1.RunnerEnvironment.jsonschema.json +++ b/app/controlplane/api/gen/jsonschema/attestation.v1.RunnerEnvironment.jsonschema.json @@ -29,7 +29,8 @@ "JENKINS_JOB", "CIRCLECI_BUILD", "DAGGER_PIPELINE", - "TEAMCITY_PIPELINE" + "TEAMCITY_PIPELINE", + "TEKTON_PIPELINE" ], "title": "Runner Type", "type": "string" diff --git a/app/controlplane/api/gen/jsonschema/attestation.v1.RunnerEnvironment.schema.json b/app/controlplane/api/gen/jsonschema/attestation.v1.RunnerEnvironment.schema.json index a106ad10c..cf6cb244d 100644 --- a/app/controlplane/api/gen/jsonschema/attestation.v1.RunnerEnvironment.schema.json +++ b/app/controlplane/api/gen/jsonschema/attestation.v1.RunnerEnvironment.schema.json @@ -29,7 +29,8 @@ "JENKINS_JOB", "CIRCLECI_BUILD", "DAGGER_PIPELINE", - "TEAMCITY_PIPELINE" + "TEAMCITY_PIPELINE", + "TEKTON_PIPELINE" ], "title": "Runner Type", "type": "string" diff --git a/app/controlplane/api/gen/jsonschema/controlplane.v1.AttestationServiceInitRequest.jsonschema.json b/app/controlplane/api/gen/jsonschema/controlplane.v1.AttestationServiceInitRequest.jsonschema.json index 4eb02cd6b..85c42f1fc 100644 --- a/app/controlplane/api/gen/jsonschema/controlplane.v1.AttestationServiceInitRequest.jsonschema.json +++ b/app/controlplane/api/gen/jsonschema/controlplane.v1.AttestationServiceInitRequest.jsonschema.json @@ -60,7 +60,8 @@ "JENKINS_JOB", "CIRCLECI_BUILD", "DAGGER_PIPELINE", - "TEAMCITY_PIPELINE" + "TEAMCITY_PIPELINE", + "TEKTON_PIPELINE" ], "title": "Runner Type", "type": "string" diff --git a/app/controlplane/api/gen/jsonschema/controlplane.v1.AttestationServiceInitRequest.schema.json b/app/controlplane/api/gen/jsonschema/controlplane.v1.AttestationServiceInitRequest.schema.json index 0379ff6f5..707469a66 100644 --- a/app/controlplane/api/gen/jsonschema/controlplane.v1.AttestationServiceInitRequest.schema.json +++ b/app/controlplane/api/gen/jsonschema/controlplane.v1.AttestationServiceInitRequest.schema.json @@ -60,7 +60,8 @@ "JENKINS_JOB", "CIRCLECI_BUILD", "DAGGER_PIPELINE", - "TEAMCITY_PIPELINE" + "TEAMCITY_PIPELINE", + "TEKTON_PIPELINE" ], "title": "Runner Type", "type": "string" diff --git a/app/controlplane/api/gen/jsonschema/controlplane.v1.MetricsRunnerCount.jsonschema.json b/app/controlplane/api/gen/jsonschema/controlplane.v1.MetricsRunnerCount.jsonschema.json index 34950a0c9..63d9c4a21 100644 --- a/app/controlplane/api/gen/jsonschema/controlplane.v1.MetricsRunnerCount.jsonschema.json +++ b/app/controlplane/api/gen/jsonschema/controlplane.v1.MetricsRunnerCount.jsonschema.json @@ -14,7 +14,8 @@ "JENKINS_JOB", "CIRCLECI_BUILD", "DAGGER_PIPELINE", - "TEAMCITY_PIPELINE" + "TEAMCITY_PIPELINE", + "TEKTON_PIPELINE" ], "title": "Runner Type", "type": "string" @@ -44,7 +45,8 @@ "JENKINS_JOB", "CIRCLECI_BUILD", "DAGGER_PIPELINE", - "TEAMCITY_PIPELINE" + "TEAMCITY_PIPELINE", + "TEKTON_PIPELINE" ], "title": "Runner Type", "type": "string" diff --git a/app/controlplane/api/gen/jsonschema/controlplane.v1.MetricsRunnerCount.schema.json b/app/controlplane/api/gen/jsonschema/controlplane.v1.MetricsRunnerCount.schema.json index 066e8b29e..54a36e983 100644 --- a/app/controlplane/api/gen/jsonschema/controlplane.v1.MetricsRunnerCount.schema.json +++ b/app/controlplane/api/gen/jsonschema/controlplane.v1.MetricsRunnerCount.schema.json @@ -14,7 +14,8 @@ "JENKINS_JOB", "CIRCLECI_BUILD", "DAGGER_PIPELINE", - "TEAMCITY_PIPELINE" + "TEAMCITY_PIPELINE", + "TEKTON_PIPELINE" ], "title": "Runner Type", "type": "string" @@ -44,7 +45,8 @@ "JENKINS_JOB", "CIRCLECI_BUILD", "DAGGER_PIPELINE", - "TEAMCITY_PIPELINE" + "TEAMCITY_PIPELINE", + "TEKTON_PIPELINE" ], "title": "Runner Type", "type": "string" diff --git a/app/controlplane/api/gen/jsonschema/controlplane.v1.WorkflowRunItem.jsonschema.json b/app/controlplane/api/gen/jsonschema/controlplane.v1.WorkflowRunItem.jsonschema.json index 02fb307e1..cfa5aee10 100644 --- a/app/controlplane/api/gen/jsonschema/controlplane.v1.WorkflowRunItem.jsonschema.json +++ b/app/controlplane/api/gen/jsonschema/controlplane.v1.WorkflowRunItem.jsonschema.json @@ -42,7 +42,8 @@ "JENKINS_JOB", "CIRCLECI_BUILD", "DAGGER_PIPELINE", - "TEAMCITY_PIPELINE" + "TEAMCITY_PIPELINE", + "TEKTON_PIPELINE" ], "title": "Runner Type", "type": "string" @@ -102,7 +103,8 @@ "JENKINS_JOB", "CIRCLECI_BUILD", "DAGGER_PIPELINE", - "TEAMCITY_PIPELINE" + "TEAMCITY_PIPELINE", + "TEKTON_PIPELINE" ], "title": "Runner Type", "type": "string" diff --git a/app/controlplane/api/gen/jsonschema/controlplane.v1.WorkflowRunItem.schema.json b/app/controlplane/api/gen/jsonschema/controlplane.v1.WorkflowRunItem.schema.json index 6192da887..67c1560a8 100644 --- a/app/controlplane/api/gen/jsonschema/controlplane.v1.WorkflowRunItem.schema.json +++ b/app/controlplane/api/gen/jsonschema/controlplane.v1.WorkflowRunItem.schema.json @@ -42,7 +42,8 @@ "JENKINS_JOB", "CIRCLECI_BUILD", "DAGGER_PIPELINE", - "TEAMCITY_PIPELINE" + "TEAMCITY_PIPELINE", + "TEKTON_PIPELINE" ], "title": "Runner Type", "type": "string" @@ -102,7 +103,8 @@ "JENKINS_JOB", "CIRCLECI_BUILD", "DAGGER_PIPELINE", - "TEAMCITY_PIPELINE" + "TEAMCITY_PIPELINE", + "TEKTON_PIPELINE" ], "title": "Runner Type", "type": "string" diff --git a/app/controlplane/api/gen/jsonschema/controlplane.v1.WorkflowServiceListRequest.jsonschema.json b/app/controlplane/api/gen/jsonschema/controlplane.v1.WorkflowServiceListRequest.jsonschema.json index 363cd21a5..d870a1966 100644 --- a/app/controlplane/api/gen/jsonschema/controlplane.v1.WorkflowServiceListRequest.jsonschema.json +++ b/app/controlplane/api/gen/jsonschema/controlplane.v1.WorkflowServiceListRequest.jsonschema.json @@ -82,7 +82,8 @@ "JENKINS_JOB", "CIRCLECI_BUILD", "DAGGER_PIPELINE", - "TEAMCITY_PIPELINE" + "TEAMCITY_PIPELINE", + "TEKTON_PIPELINE" ], "title": "Runner Type", "type": "string" @@ -184,7 +185,8 @@ "JENKINS_JOB", "CIRCLECI_BUILD", "DAGGER_PIPELINE", - "TEAMCITY_PIPELINE" + "TEAMCITY_PIPELINE", + "TEKTON_PIPELINE" ], "title": "Runner Type", "type": "string" diff --git a/app/controlplane/api/gen/jsonschema/controlplane.v1.WorkflowServiceListRequest.schema.json b/app/controlplane/api/gen/jsonschema/controlplane.v1.WorkflowServiceListRequest.schema.json index d6683179e..7f7ddac4d 100644 --- a/app/controlplane/api/gen/jsonschema/controlplane.v1.WorkflowServiceListRequest.schema.json +++ b/app/controlplane/api/gen/jsonschema/controlplane.v1.WorkflowServiceListRequest.schema.json @@ -82,7 +82,8 @@ "JENKINS_JOB", "CIRCLECI_BUILD", "DAGGER_PIPELINE", - "TEAMCITY_PIPELINE" + "TEAMCITY_PIPELINE", + "TEKTON_PIPELINE" ], "title": "Runner Type", "type": "string" @@ -184,7 +185,8 @@ "JENKINS_JOB", "CIRCLECI_BUILD", "DAGGER_PIPELINE", - "TEAMCITY_PIPELINE" + "TEAMCITY_PIPELINE", + "TEKTON_PIPELINE" ], "title": "Runner Type", "type": "string" diff --git a/app/controlplane/api/gen/jsonschema/workflowcontract.v1.CraftingSchema.Runner.jsonschema.json b/app/controlplane/api/gen/jsonschema/workflowcontract.v1.CraftingSchema.Runner.jsonschema.json index 266e46c79..ae0d21cb3 100644 --- a/app/controlplane/api/gen/jsonschema/workflowcontract.v1.CraftingSchema.Runner.jsonschema.json +++ b/app/controlplane/api/gen/jsonschema/workflowcontract.v1.CraftingSchema.Runner.jsonschema.json @@ -14,7 +14,8 @@ "JENKINS_JOB", "CIRCLECI_BUILD", "DAGGER_PIPELINE", - "TEAMCITY_PIPELINE" + "TEAMCITY_PIPELINE", + "TEKTON_PIPELINE" ], "title": "Runner Type", "type": "string" diff --git a/app/controlplane/api/gen/jsonschema/workflowcontract.v1.CraftingSchema.Runner.schema.json b/app/controlplane/api/gen/jsonschema/workflowcontract.v1.CraftingSchema.Runner.schema.json index 440b24ed4..ac54e3edc 100644 --- a/app/controlplane/api/gen/jsonschema/workflowcontract.v1.CraftingSchema.Runner.schema.json +++ b/app/controlplane/api/gen/jsonschema/workflowcontract.v1.CraftingSchema.Runner.schema.json @@ -14,7 +14,8 @@ "JENKINS_JOB", "CIRCLECI_BUILD", "DAGGER_PIPELINE", - "TEAMCITY_PIPELINE" + "TEAMCITY_PIPELINE", + "TEKTON_PIPELINE" ], "title": "Runner Type", "type": "string" diff --git a/app/controlplane/api/workflowcontract/v1/crafting_schema.pb.go b/app/controlplane/api/workflowcontract/v1/crafting_schema.pb.go index 67639c853..879c60cd3 100644 --- a/app/controlplane/api/workflowcontract/v1/crafting_schema.pb.go +++ b/app/controlplane/api/workflowcontract/v1/crafting_schema.pb.go @@ -48,6 +48,7 @@ const ( CraftingSchema_Runner_CIRCLECI_BUILD CraftingSchema_Runner_RunnerType = 5 CraftingSchema_Runner_DAGGER_PIPELINE CraftingSchema_Runner_RunnerType = 6 CraftingSchema_Runner_TEAMCITY_PIPELINE CraftingSchema_Runner_RunnerType = 7 + CraftingSchema_Runner_TEKTON_PIPELINE CraftingSchema_Runner_RunnerType = 8 ) // Enum value maps for CraftingSchema_Runner_RunnerType. @@ -61,6 +62,7 @@ var ( 5: "CIRCLECI_BUILD", 6: "DAGGER_PIPELINE", 7: "TEAMCITY_PIPELINE", + 8: "TEKTON_PIPELINE", } CraftingSchema_Runner_RunnerType_value = map[string]int32{ "RUNNER_TYPE_UNSPECIFIED": 0, @@ -71,6 +73,7 @@ var ( "CIRCLECI_BUILD": 5, "DAGGER_PIPELINE": 6, "TEAMCITY_PIPELINE": 7, + "TEKTON_PIPELINE": 8, } ) @@ -1789,7 +1792,7 @@ var File_workflowcontract_v1_crafting_schema_proto protoreflect.FileDescriptor const file_workflowcontract_v1_crafting_schema_proto_rawDesc = "" + "\n" + - ")workflowcontract/v1/crafting_schema.proto\x12\x13workflowcontract.v1\x1a\x1bbuf/validate/validate.proto\"\x82\x0e\n" + + ")workflowcontract/v1/crafting_schema.proto\x12\x13workflowcontract.v1\x1a\x1bbuf/validate/validate.proto\"\x97\x0e\n" + "\x0eCraftingSchema\x122\n" + "\x0eschema_version\x18\x01 \x01(\tB\v\xbaH\x06r\x04\n" + "\x02v1\x18\x01R\rschemaVersion\x12N\n" + @@ -1798,9 +1801,9 @@ const file_workflowcontract_v1_crafting_schema_proto_rawDesc = "" + "\x06runner\x18\x04 \x01(\v2*.workflowcontract.v1.CraftingSchema.RunnerB\x02\x18\x01R\x06runner\x12E\n" + "\vannotations\x18\x05 \x03(\v2\x1f.workflowcontract.v1.AnnotationB\x02\x18\x01R\vannotations\x12=\n" + "\bpolicies\x18\x06 \x01(\v2\x1d.workflowcontract.v1.PoliciesB\x02\x18\x01R\bpolicies\x12S\n" + - "\rpolicy_groups\x18\a \x03(\v2*.workflowcontract.v1.PolicyGroupAttachmentB\x02\x18\x01R\fpolicyGroups\x1a\x9e\x02\n" + + "\rpolicy_groups\x18\a \x03(\v2*.workflowcontract.v1.PolicyGroupAttachmentB\x02\x18\x01R\fpolicyGroups\x1a\xb3\x02\n" + "\x06Runner\x12W\n" + - "\x04type\x18\x01 \x01(\x0e25.workflowcontract.v1.CraftingSchema.Runner.RunnerTypeB\f\xbaH\a\x82\x01\x04\x10\x01 \x00\x18\x01R\x04type\"\xb6\x01\n" + + "\x04type\x18\x01 \x01(\x0e25.workflowcontract.v1.CraftingSchema.Runner.RunnerTypeB\f\xbaH\a\x82\x01\x04\x10\x01 \x00\x18\x01R\x04type\"\xcb\x01\n" + "\n" + "RunnerType\x12\x1b\n" + "\x17RUNNER_TYPE_UNSPECIFIED\x10\x00\x12\x11\n" + @@ -1810,7 +1813,8 @@ const file_workflowcontract_v1_crafting_schema_proto_rawDesc = "" + "\vJENKINS_JOB\x10\x04\x12\x12\n" + "\x0eCIRCLECI_BUILD\x10\x05\x12\x13\n" + "\x0fDAGGER_PIPELINE\x10\x06\x12\x15\n" + - "\x11TEAMCITY_PIPELINE\x10\a:\x02\x18\x01\x1a\xf9\a\n" + + "\x11TEAMCITY_PIPELINE\x10\a\x12\x13\n" + + "\x0fTEKTON_PIPELINE\x10\b:\x02\x18\x01\x1a\xf9\a\n" + "\bMaterial\x12[\n" + "\x04type\x18\x01 \x01(\x0e29.workflowcontract.v1.CraftingSchema.Material.MaterialTypeB\f\xbaH\a\x82\x01\x04\x10\x01 \x00\x18\x01R\x04type\x12\x99\x01\n" + "\x04name\x18\x02 \x01(\tB\x84\x01\xbaH\x7f\xba\x01|\n" + diff --git a/app/controlplane/api/workflowcontract/v1/crafting_schema.proto b/app/controlplane/api/workflowcontract/v1/crafting_schema.proto index 2f2039ea7..a653f88ad 100644 --- a/app/controlplane/api/workflowcontract/v1/crafting_schema.proto +++ b/app/controlplane/api/workflowcontract/v1/crafting_schema.proto @@ -63,6 +63,7 @@ message CraftingSchema { CIRCLECI_BUILD = 5; DAGGER_PIPELINE = 6; TEAMCITY_PIPELINE = 7; + TEKTON_PIPELINE = 8; } } diff --git a/pkg/attestation/crafter/runner.go b/pkg/attestation/crafter/runner.go index 56c32158c..cab1c1d91 100644 --- a/pkg/attestation/crafter/runner.go +++ b/pkg/attestation/crafter/runner.go @@ -1,5 +1,5 @@ // -// Copyright 2023 The Chainloop Authors. +// Copyright 2023-2026 The Chainloop Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -85,6 +85,9 @@ var RunnerFactories = map[schemaapi.CraftingSchema_Runner_RunnerType]RunnerFacto schemaapi.CraftingSchema_Runner_TEAMCITY_PIPELINE: func(_ string, _ *zerolog.Logger) SupportedRunner { return runners.NewTeamCityPipeline() }, + schemaapi.CraftingSchema_Runner_TEKTON_PIPELINE: func(_ string, _ *zerolog.Logger) SupportedRunner { + return runners.NewTektonPipeline() + }, } // Load a specific runner diff --git a/pkg/attestation/crafter/runners/tektonpipeline.go b/pkg/attestation/crafter/runners/tektonpipeline.go new file mode 100644 index 000000000..7b869cf06 --- /dev/null +++ b/pkg/attestation/crafter/runners/tektonpipeline.go @@ -0,0 +1,66 @@ +// +// Copyright 2026 The Chainloop Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package runners + +import ( + "os" + + schemaapi "github.com/chainloop-dev/chainloop/app/controlplane/api/workflowcontract/v1" +) + +type TektonPipeline struct{} + +func NewTektonPipeline() *TektonPipeline { + return &TektonPipeline{} +} + +func (r *TektonPipeline) ID() schemaapi.CraftingSchema_Runner_RunnerType { + return schemaapi.CraftingSchema_Runner_TEKTON_PIPELINE +} + +// CheckEnv detects if we're running in a Tekton environment +// by checking for the existence of Tekton-specific directories +func (r *TektonPipeline) CheckEnv() bool { + // Check for /tekton/results directory (most reliable indicator) + if _, err := os.Stat("/tekton/results"); err == nil { + return true + } + return false +} + +func (r *TektonPipeline) ListEnvVars() []*EnvVarDefinition { + return []*EnvVarDefinition{} +} + +func (r *TektonPipeline) RunURI() string { + return "" +} + +func (r *TektonPipeline) ResolveEnvVars() (map[string]string, []*error) { + return resolveEnvVars(r.ListEnvVars()) +} + +func (r *TektonPipeline) WorkflowFilePath() string { + return "" +} + +func (r *TektonPipeline) IsAuthenticated() bool { + return false +} + +func (r *TektonPipeline) Environment() RunnerEnvironment { + return Unknown +}