Add executor provider for Tekton CI/CD
Description
There's some demand for tekton CI/CD integration, particularly the re-use of parameterized tasks is a huge plus. I started writing an executor provider to find a way of integrating.
The architectural approach follows in "proposal".
I'll update this with a "WIP" PR soon. Please let me know if my suggestion is never going to make it into the project, since I would then retreat from developing.
Proposal
Tekton usually uses a PipelineRun whereas the pipeline of a Gitlab CI run will be automatically split to the jobs and scheduled to the next runner being available and matching the selected criteria.
A possible mapping from a job
in the .gitlab-ci.yml
in the domain of Tekton would be a TaskRun (ofc with additional resources).
This TaskRun
can be configured to either reference an existing Task or define the task specification (embedded).
The Task inputs can be filled using the variables:
in .gitlab-ci.yml
.
I suggest the following conventions (non-breaking):
- Referenced
Task
my-referenced-job:
image: 'task://<task-reference>'
variables: {} # These will be mapped to the task inputs
before_script: [] # may not be used
script: [] # may not be used
after_script: [] # may not be used
- Inline definition
my-inline-job:
image: 'busybox'
# ... (business as usual)
I think this approach can be used later to re-use a complete tekton pipeline.