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

Tkn bundle list split yamls #2091

Closed
Lima118 opened this issue Aug 2, 2023 · 3 comments · Fixed by #2373
Closed

Tkn bundle list split yamls #2091

Lima118 opened this issue Aug 2, 2023 · 3 comments · Fixed by #2373
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Milestone

Comments

@Lima118
Copy link

Lima118 commented Aug 2, 2023

Feature request

It would be a useful feature for us when we use tkn bundle list on an OCI image, that contains multiple tasks/pipelines the output would be a valid merged yaml file. Right now it does not separate the yamls with ---. Therefor if we use tkn bundle list, then pipe it to kubectl apply it only applies the last task/pipeline, not all of them.

Use case

If it would be implemented we could use bundle to bundle a Pipeline with all of its Tasks into one OCI Image, then we could version control our Pipelines and could easily deploy them from CI with one tkn bundle list piped into kubectl apply.

@Lima118 Lima118 added the kind/feature Categorizes issue or PR as related to a new feature. label Aug 2, 2023
@RohanGlitched
Copy link

/assign

lcarva added a commit to lcarva/cli that referenced this issue Aug 13, 2024
Some printers contain an internal state. The YAMLPrinter, for example,
tracks how many objects have been printed. When it prints an object, and
it is not the first one to be printed, it prints the YAML document
separator, `---`. If a new printer is used when printing each object,
then the YAMLPrinter always considers that it is printing the first
object. This causes the YAML objects to be muddled together.

This commit makes it so a printer is re-used when printing multiple
objects. For conformity, this is also done when a single object is
expected to be printed, e.g. get or describe.

Fixes tektoncd#2091

Signed-off-by: Luiz Carvalho <[email protected]>
lcarva added a commit to lcarva/cli that referenced this issue Aug 13, 2024
Some printers contain an internal state. The YAMLPrinter, for example,
tracks how many objects have been printed. When it prints an object, and
it is not the first one to be printed, it prints the YAML document
separator, `---`. If a new printer is used when printing each object,
then the YAMLPrinter always considers that it is printing the first
object. This causes the YAML objects to be muddled together.

This commit makes it so a printer is re-used when printing multiple
objects. For conformity, this is also done when a single object is
expected to be printed, e.g. get or describe.

Fixes tektoncd#2091

Signed-off-by: Luiz Carvalho <[email protected]>
@piyush-garg
Copy link
Contributor

/unassign @RohanGlitched
/assign @lcarva

as @lcarva has raised the PR

@tekton-robot
Copy link
Contributor

@piyush-garg: GitHub didn't allow me to assign the following users: lcarva.

Note that only tektoncd members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

/unassign @RohanGlitched
/assign @lcarva

as @lcarva has raised the PR

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants