-
Notifications
You must be signed in to change notification settings - Fork 89
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
Add support of remote task on remote Pipeline #1494
Add support of remote task on remote Pipeline #1494
Conversation
82b5e82
to
899c60e
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1494 +/- ##
==========================================
+ Coverage 61.61% 61.76% +0.15%
==========================================
Files 137 138 +1
Lines 10373 10422 +49
==========================================
+ Hits 6391 6437 +46
- Misses 3465 3466 +1
- Partials 517 519 +2
☔ View full report in Codecov by Sentry. |
/test go-testing |
docs/content/docs/guide/resolver.md
Outdated
pipelinesascode.tekton.dev/task-1: "./my-task.yaml | ||
pipelinesascode.tekton.dev/task-2: "git-clone" |
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.
task-1
, task-2
are just "index", they don't "refer" the name of the Task in the pipeline, right ?
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.
right, just because annotation length are not infinite and looks better than having a really long line 🙃
pkg/resolve/resolve.go
Outdated
|
||
// Merge remote tasks with local tasks | ||
for _, remoteTask := range remoteTasks { | ||
if alreadySeen(types.Tasks, remoteTask) { |
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.
Should not this will give preference to local tasks, then remote task?
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.
This is what happen here, the precedence works like this:
The tasks in the tekton directory (we get all files in .tekton dir and subdir and parses it)
The tasks in the PipelineRun annotations
The tasks in the Pipeline annotations
Maybe we should make the tasks in PipelineRun annotation precedence over tekton directory tasks
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.
I am fine with this order also, maybe we just mention this in doc.
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.
I refactored the PR to make it more idiomatic, moved it to its own files and improved the docs to make it clear... Please let me know what do you think
62fccf3
to
71fa73f
Compare
82f0239
to
93980fa
Compare
lgtm |
We now support remote tasks on remote Pipeline, allowing to share a remote Pipeline across multiple repositories. User can override tasks from the remote pipeline by adding a task with the same name. Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
93980fa
to
46a705e
Compare
Can we have E2E for this feature ? |
@savitaashture not now for the e2e this is well tested in the unittest already.. |
Ah i see So are you planning to add in another PR ? |
We now support remote tasks on remote Pipeline, allowing to share a remote Pipeline across multiple repositories.
User can override tasks from the remote pipeline by adding a task with the same name.
Demo here: https://youtu.be/PetZInZTbM8?si=4P6VoYnl_dSbMAjG
Changes
Submitter Checklist
make test
before submitting a PR (ie: with pre-commit, no need to waste CPU cycle on CI. (or even better install pre-commit and dopre-commit install
in the root of this repo).make lint
before submitting a PR. The markdownlint error can get usually fixed by runningmake fix-markdownlint
(make sure it's installed first)