-
Notifications
You must be signed in to change notification settings - Fork 1.8k
RHDEVDOCS 5984 disabling inline spec #75534
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
Merged
adellape
merged 1 commit into
openshift:pipelines-docs-main
from
mramendi:RHDEVDOCS-5984
May 10, 2024
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
// This module is included in the following assemblies: | ||
// * install_config/customizing-configurations-in-the-tektonconfig-cr.adoc | ||
|
||
:_mod-docs-content-type: CONCEPT | ||
[id="op-disabling-inline-spec_{context}"] | ||
= Disabling inline specification of pipelines and tasks | ||
|
||
By default, {pipelines-shortname} supports inline specification of pipelines and tasks in the following cases: | ||
|
||
* You can create a `Pipeline` CR that includes one or more task specifications, as in the following example: | ||
+ | ||
.Example of an inline specification in a `Pipeline` CR | ||
[source,yaml] | ||
---- | ||
apiVersion: operator.tekton.dev/v1 | ||
kind: Pipeline | ||
metadata: | ||
name: pipelineInline | ||
spec: | ||
tasks: | ||
taskSpec: | ||
# ... | ||
---- | ||
|
||
* You can create a `PipelineRun` custom resource (CR) that includes a pipeline specification, as in the following example: | ||
+ | ||
.Example of an inline specification in a `PipelineRun` CR | ||
[source,yaml] | ||
---- | ||
apiVersion: operator.tekton.dev/v1 | ||
kind: PipelineRun | ||
metadata: | ||
name: pipelineRunInline | ||
spec: | ||
pipelineSpec: | ||
tasks: | ||
# ... | ||
---- | ||
|
||
* You can create a `TaskRun` custom resource (CR) that includes a task specification, as in the following example: | ||
+ | ||
.Example of an inline specification in a `TaskRun` CR | ||
[source,yaml] | ||
---- | ||
apiVersion: operator.tekton.dev/v1 | ||
kind: TaskRun | ||
metadata: | ||
name: taskRunInline | ||
spec: | ||
taskSpec: | ||
steps: | ||
# ... | ||
---- | ||
|
||
You can disable inline specification in some or all of these cases. To disable the inline specification, set the `disable-inline-spec` field of the `.spec.pipeline` specification of the `TektonConfig` CR, as in the following example: | ||
|
||
.Example configuration that disables inline specification | ||
[source,yaml] | ||
---- | ||
apiVersion: operator.tekton.dev/v1alpha1 | ||
kind: TektonConfig | ||
metadata: | ||
name: config | ||
spec: | ||
pipeline: | ||
disable-inline-spec: "pipeline,pipelinerun,taskrun" | ||
# ... | ||
---- | ||
|
||
You can set the `disable-inline-spec` parameter to any single value or to a comma-separated list of multiple values. The following values for the parameter are valid: | ||
|
||
.Supported values for the `disable-inline-spec` parameter | ||
|=== | ||
| Value | Description | ||
|
||
|`pipeline` | ||
|You cannot use a `taskSpec:` spec to define a task inside a `Pipeline` CR. Instead, you must use a `taskRef:` spec to incorporate a task from a `Task` CR or to specify a task using a resolver. | ||
|
||
|`pipelinerun` | ||
|You cannot use a `pipelineSpec:` spec to define a pipeline inside a `PipelineRun` CR. Instead, you must use a `pipelineRef:` spec to incorporate a pipeline from a `Pipeline` CR or to specify a pipeline using a resolver. | ||
|
||
|`taskrun` | ||
|You cannot use a `taskSpec:` spec to define a task inside a `TaskRun` CR. Instead, you must use a `taskRef:` spec to incorporate a task from a `Task` CR or to specify a task using a resolver. | ||
|
||
|=== |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@khrm what happens when I set
disable-inline-spec: "pipeline"
... will I be able to usetaskSpec
insidepipelinerun
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Setting
pipeline
only disables settingtaskSpec
andpipelineSpec
in the Pipeline resource.