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

Keep remote pipelines up to date documentation #173

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

fabriziosta
Copy link

No description provided.

@fabriziosta fabriziosta force-pushed the add-remote-pipeline-doc branch from 176a5b3 to bc754cf Compare November 18, 2024 13:09
@fabriziosta fabriziosta marked this pull request as ready for review November 18, 2024 13:09
Copy link
Member

@arewm arewm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some questions asked to start discussions. This topic also seems like it might fit better within the "workflow" section similar to the git submodule approach.

Comment on lines 27 to 35
├── .tekton
│ ├── <repository-name>-pipelines-pull-request.yaml # Used by Konflux to listen to pull requests
│ └── <repository-name>-pipelines-push.yaml # Used by Konflux to listen to pushes
├── pipelines
│ ├── remote-pipeline1.yaml
│ └── remote-pipeline2.yaml
├── tasks
│ ├── remote-task1.yaml
│ └── remote-task2.yaml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the difference between all of these files? What should go into each of these?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The several remote pipelines that could be run from different components. I.E.

  • multi aarch pipeline
  • hermetic pipeline
  • pipeline with disabled checks or a very few tasks in it
  • pipeline with pre-fetch enabled
  • custom pipeline with untrusted Tasks
    and so on.

@fabriziosta fabriziosta force-pushed the add-remote-pipeline-doc branch from bc754cf to 497673c Compare November 19, 2024 21:53
Copy link

🚀 Preview is available at https://pr-173--konflux-docs.netlify.app

Copy link
Member

@arewm arewm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like how this page is shaping up!

Instead of using Konflux directly, we use {ProductName}.


. Pipelines are stored in a Git repository and fetched during execution, eliminating the need to maintain local or static pipeline definitions.
. Teams can leverage Git’s versioning to access specific pipeline branches
. In case of issues, it's very simple to rollback to a previous pipeline version, and apply it globally among the Konflux Components.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is possible to roll back to previous versions without this remote pipeline strategy as well. I guess that the suggestion is to rollback the reference pipeline commit based on the use of a floating branch tag? If you are suggesting that it is easy to roll back, I think we should document that in this page.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess that the suggestion is to rollback the reference pipeline commit based on the use of a floating branch tag?
Yup, that's exactly what I meant. Let me specify it better


== The solution

To workaround the above issue, the suggested approach is to onboard the repository where the shared pipelines are stored as a Konflux Component, so that Konflux and MintMaker will be able to discover and update digests for us.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we give this location of the shared pipelines a name to make it easier to refer to? For example a common pipeline component or reference component (I don't think that my naming suggestions are that good right now).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you rephrase your idea? I am not sure I get it

Comment on lines +56 to +58
.*Prerequisites*

* Having a repository where to store shared Pipelines and Tasks.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this not a prerequisite for the entire workflow? Or is it possible to achieve this workflow without this?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it's a prerequisite for the entire workflow, should I move it under another section or paragraph?

@@ -0,0 +1,107 @@
= Maintaining remote Tekton pipelines up to date
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General comment on structure of this page. If we create a structure similar to the git submodule approach, I think that this page would have sections like:

(brief description of the problem we are trying to solve)

  • Implementing this guideline
    • Basic definitions
    • Create a reference component (see comment about naming the component)
    • Configure renovate
    • Configure additional components with the remote resolver
  • Benefits of this guideline
  • Potential drawbacks

Comment on lines +76 to +78
├── pipelines
│ ├── remote-pipeline1.yaml
│ └── remote-pipeline2.yaml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like the general recommendation might be to have a reference component build for each of these pipelines (i.e. if you have a single arch and multi-arch pipeline, one component that exercises each in a way that is representative for your other components). This would enable the CI for this repo to catch when task/pipeline updates will present issues downstream.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you suggesting to rename the pipelines with some more descriptive namings?

Comment on lines +74 to +75
│ ├── <repository-name>-pipelines-pull-request.yaml # Used by Konflux to listen to pull requests
│ └── <repository-name>-pipelines-push.yaml # Used by Konflux to listen to pushes
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These PipelineRun files should reference the common pipelines (and by extension common tasks) below, right?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No they don't need to reference the common pipelines. I mean, they probably could reference them as the repo itself it's a Component. But for the sake of the documentation I would like to keep them separated, as it will be more clear to the users the difference between shared pipelines and non-shared ones, wdyt?


.*Prerequisites*

* Having a repository where to store shared Pipelines and Tasks.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Having a repository where to store shared Pipelines and Tasks.
* Having a repository to store shared Pipelines and Tasks.

* MintMaker will read the default configuration from "https://docs.renovatebot.com/renovate-schema.json" and will extend it using the subsequent custom settings.
====

. xref:how-tos/creating.adoc[Create a Konflux Application and a Konflux Component] where to reference the repository and branch name.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
. xref:how-tos/creating.adoc[Create a Konflux Application and a Konflux Component] where to reference the repository and branch name.
. xref:how-tos/creating.adoc[Create a Konflux Application and a Konflux Component] to reference the repository and branch name.

@@ -35,3 +35,4 @@
** xref:how-tos/deleting.adoc[Deleting applications and components]
** xref:how-tos/workflows/index.adoc[Guidelines for {ProductName} integrated repositories]
*** xref:how-tos/workflows/git-submodules.adoc[Building upstream projects with git submodules]
*** xref:how-tos/workflows/keep-remote-pipelines-up-to-date.adoc[Maintaining remote pipelines up to date]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
*** xref:how-tos/workflows/keep-remote-pipelines-up-to-date.adoc[Maintaining remote pipelines up to date]
*** xref:how-tos/workflows/keep-remote-pipelines-up-to-date.adoc[Maintaining remote pipelines]

I think "Maintaining" implies "keeping up to date"

@@ -0,0 +1,107 @@
= Maintaining remote Tekton pipelines up to date
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
= Maintaining remote Tekton pipelines up to date
= Maintaining remote Tekton pipelines

reason as above


[IMPORTANT]
====
* This article assumed knowledge of link:https://tekton.dev/docs/pipelines/resolution/[Tekton remote pipelines]. If this is not the case, please read more about this feature before proceeding.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* This article assumed knowledge of link:https://tekton.dev/docs/pipelines/resolution/[Tekton remote pipelines]. If this is not the case, please read more about this feature before proceeding.
* This article assumes knowledge of link:https://tekton.dev/docs/pipelines/resolution/[Tekton remote pipelines]. If this is not the case, please read more about this feature before proceeding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants