Skip to content
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
6 changes: 6 additions & 0 deletions docs/TektonPipeline.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ spec:
enable-tekton-oci-bundles: false
require-git-ssh-secret-known-hosts: false
running-in-environment-with-injected-sidecars: true
scope-when-expressions-to-task: false
```
You can install this component using [TektonConfig](./TektonConfig.md) by choosing appropriate `profile`.

Expand Down Expand Up @@ -93,6 +94,11 @@ You can install this component using [TektonConfig](./TektonConfig.md) by choosi

Setting this flag will determine which gated features are enabled. Acceptable values are "stable" or "alpha".


- `scope-when-expressions-to-task` (Default: `false`)

Setting this flag to "true" scopes when expressions to guard a Task only instead of a Task and its dependent Tasks.

### Optional Properties
This fields doesn't have default values so will be considered only if user passes them. By default Operator won't add
this fields CR and won't configure for pipelines.
Expand Down
3 changes: 3 additions & 0 deletions pkg/apis/operator/v1alpha1/tektonpipeline_defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,7 @@ func (p *PipelineProperties) setDefaults() {
if p.EnableApiFields == "" {
p.EnableApiFields = PipelineApiFieldStable
}
if p.ScopeWhenExpressionsToTask == nil {
p.ScopeWhenExpressionsToTask = ptr.Bool(false)
}
}
1 change: 1 addition & 0 deletions pkg/apis/operator/v1alpha1/tektonpipeline_defaults_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ func Test_SetDefaults_PipelineProperties(t *testing.T) {
EnableTektonOciBundles: ptr.Bool(false),
EnableCustomTasks: ptr.Bool(false),
EnableApiFields: PipelineApiFieldStable,
ScopeWhenExpressionsToTask: ptr.Bool(false),
}

tp.SetDefaults(context.TODO())
Expand Down
1 change: 1 addition & 0 deletions pkg/apis/operator/v1alpha1/tektonpipeline_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ type PipelineProperties struct {
EnableTektonOciBundles *bool `json:"enable-tekton-oci-bundles,omitempty"`
EnableCustomTasks *bool `json:"enable-custom-tasks,omitempty"`
EnableApiFields string `json:"enable-api-fields,omitempty"`
ScopeWhenExpressionsToTask *bool `json:"scope-when-expressions-to-task,omitempty"`
// +optional
OptionalPipelineProperties `json:",inline"`
}
Expand Down
5 changes: 5 additions & 0 deletions pkg/apis/operator/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pkg/reconciler/openshift/tektonconfig/extension.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package tektonconfig

import (
"context"

"github.com/go-logr/zapr"
mfc "github.com/manifestival/client-go-client"
mf "github.com/manifestival/manifestival"
Expand Down
3 changes: 2 additions & 1 deletion pkg/reconciler/openshift/tektontrigger/extension.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@ package tektontrigger

import (
"context"

mf "github.com/manifestival/manifestival"
"github.com/tektoncd/operator/pkg/apis/operator/v1alpha1"
"github.com/tektoncd/operator/pkg/client/clientset/versioned"
operatorclient "github.com/tektoncd/operator/pkg/client/injection/client"
"github.com/tektoncd/operator/pkg/reconciler/common"
occommon "github.com/tektoncd/operator/pkg/reconciler/openshift/common"
"k8s.io/apimachinery/pkg/apis/meta/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

const triggersPrefix = "quay.io/openshift-pipeline/tektoncd-triggers-"
Expand Down