Draft: POC - interpolation to use local context data
What does this MR do and why?
This is just for a general idea for how interpolation with local context data can work.
Ignore the code, tests, etc.
References
Components - Allow interpolation to use local c... (#438275)
Screenshots or screen recordings
Test component file:
# templates/test-component.yml
spec:
context: [component, pipeline, project]
inputs:
a:
default: a
b:
default: b
c:
default: c
---
link-check:
script:
- echo "$[[ inputs.a ]] $[[ inputs.b ]] $[[ inputs.c ]]"
- echo $[[ context.component.name ]]
- echo $[[ context.component.version ]]
- echo $[[ context.component.sha ]]
- echo $[[ context.pipeline.ref ]]
- echo $[[ context.project.full_path ]]
- echo $[[ context.project.id ]]
Main CI file to test
include:
- component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/test-component@$CI_COMMIT_SHA
Result:
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
