You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
Currently, we are using a specific technical approach to determine which pipeline should be triggered on specific events from the version control system. The pipeline name for PipelineRun is dynamically generated via TriggerTemplates located in the pipelines-library and follows the structure below:
This naming convention facilitates the automatic creation of PipelineRun instances in response to payload from GitHub during Merge Request events. However, this approach has limitations:
We cannot define a specific pipeline for a code branch (codebasebranch).
We must always manipulate buildtool, framework, codebase.type, and versioning type to generate the pipeline name.
To address these challenges, we propose defining review and build pipelines inside the codebasebranch API spec. With this approach, the EDP Interceptor will retrieve the pipeline name from the codebasebranch and return it for further processing to TriggerBinding. TriggerBinding will pass this value to TriggerTemplate in the pipelineRef section.
The new structure for TriggerTemplate will be:
pipelineRef:
name: $(tt.params.pipelineName)
Acceptance Criteria
The EDP Interceptor should be able to retrieve the pipeline name from the codebasebranch API spec.
The retrieved pipeline name should be correctly passed to TriggerBinding.
TriggerBinding should correctly pass the pipeline name to TriggerTemplate in the pipelineRef section.
The new naming convention should be used:
pipelineRef:
name: $(tt.params.pipelineName)
Codebase-operator should populate default values for review/build pipelines based on the old schema:
{code}
github-$(tt.params.buildtool)-$(tt.params.framework)-$(tt.params.cbtype)-build-$(tt.params.versioning-type)
{code}
to ensure backward compatibility.
The solution should be tested to ensure that review and build pipelines can be dynamically triggered based on the codebasebranch API spec.
Documentation should be updated to reflect the changes in the pipeline naming and triggering process.
Ensure backward compatibility by verifying that existing pipelines using the old schema continue to function correctly.
Implementation Plan
Update the codebasebranch API spec to include fields for review and build pipelines.
Modify the EDP Interceptor to retrieve the pipeline name from the codebasebranch API spec.
Update TriggerBinding to pass the retrieved pipeline name to TriggerTemplate.
Modify TriggerTemplate to use the new naming convention:
pipelineRef:
name: $(tt.params.pipelineName)
Implement logic in the codebase-operator to populate default values for review/build pipelines based on the old schema to ensure backward compatibility.
Conduct unit and integration tests to verify that:
The new pipeline naming convention works as expected.
Review and build pipelines are dynamically triggered based on the codebasebranch API spec.
Existing pipelines using the old schema continue to function correctly.
Update documentation to reflect changes in the pipeline naming and triggering process.
The text was updated successfully, but these errors were encountered:
Description
Currently, we are using a specific technical approach to determine which pipeline should be triggered on specific events from the version control system. The pipeline name for PipelineRun is dynamically generated via TriggerTemplates located in the pipelines-library and follows the structure below:
This naming convention facilitates the automatic creation of PipelineRun instances in response to payload from GitHub during Merge Request events. However, this approach has limitations:
To address these challenges, we propose defining review and build pipelines inside the codebasebranch API spec. With this approach, the EDP Interceptor will retrieve the pipeline name from the codebasebranch and return it for further processing to TriggerBinding. TriggerBinding will pass this value to TriggerTemplate in the pipelineRef section.
The new structure for TriggerTemplate will be:
Acceptance Criteria
{code}
github-$(tt.params.buildtool)-$(tt.params.framework)-$(tt.params.cbtype)-build-$(tt.params.versioning-type)
{code}
to ensure backward compatibility.
Implementation Plan
Update the codebasebranch API spec to include fields for review and build pipelines.
Modify the EDP Interceptor to retrieve the pipeline name from the codebasebranch API spec.
Update TriggerBinding to pass the retrieved pipeline name to TriggerTemplate.
Modify TriggerTemplate to use the new naming convention:
Implement logic in the codebase-operator to populate default values for review/build pipelines based on the old schema to ensure backward compatibility.
Conduct unit and integration tests to verify that:
Update documentation to reflect changes in the pipeline naming and triggering process.
The text was updated successfully, but these errors were encountered: