Current Limitation: The Git Clone step's "Build Type" field does not currently support Harness expressions, which limits template flexibility and reusability.
Requested Enhancement: Enable expression support in the Git Clone step's Build Type field to allow dynamic configuration through stage variables.
Use Case: We are developing reusable templates where the build type (branch vs tag vs commit) needs to be configurable at runtime. Currently, templates must hardcode the build type, reducing their flexibility across different deployment scenarios.
Desired Functionality:
Expression Support: Allow expressions like <+stage.variables.BUILD_TYPE> in the Build Type field
Dynamic Field Population: Based on the selected build type expression, dynamically show/populate the appropriate fields:
If BUILD_TYPE = "branch" → Show Branch Name field
If BUILD_TYPE = "tag" → Show Tag field
If BUILD_TYPE = "commit" → Show Commit ID field
Business Impact: This enhancement would enable:
Template Reusability: Single template supporting multiple build types
Runtime Flexibility: Teams can choose build type during pipeline execution
Standardization: Consistent template patterns across environments
Reduced Maintenance: Fewer template variants to maintain
Expected Behavior: The Git Clone step should evaluate the build type expression at runtime and dynamically configure the appropriate source reference fields accordingly.