Backend: Create alternative "duplicate" templates without top-level keywords
Summary
In a discussion in #416101 (comment 1749068254), it was mentioned about creating alternative "duplicate" templates without top-level keywords that would provide users, who use templates, a way to start to migrate more easily to the new syntax in the future without top-level keywords.
Proposal
Create "duplicate" templates that are distinguished by a different suffix like .stable
or something similar. We could then document it so that would make it obvious to users that they should be going towards using .stable
templates which would allow the top-level keyword removal to take place in #393121.
Before - inside of the original template
variables:
RUBY_VERSION: "3.0"
DOCKER_TYPE: "docker:find"
CACHE_PATH: "vendor/"
image: "ruby:${RUBY_VERSION}"
services:
- "${DOCKER_TYPE}"
cache:
paths:
- "${CACHE_PATH}"
before_script:
- bundle config set path vendor/bundle
- bundle install
after_script:
- rm -rf tmp/
job:
script: echo
.stable
suffix
After inside of a template WITH variables:
RUBY_VERSION: "3.0"
DOCKER_TYPE: "docker:find"
CACHE_PATH: "vendor/"
default:
image: "ruby:${RUBY_VERSION}"
services:
- "${DOCKER_TYPE}"
cache:
paths:
- "${CACHE_PATH}"
before_script:
- bundle config set path vendor/bundle
- bundle install
after_script:
- rm -rf tmp/
job:
script: echo
Confirm purpose and User Reception (how does this benefit the user?)
Additional details
Some relevant technical details, if applicable, such as:
- Does this need a feature flag?
- Does there need to be an associated instrumentation issue created related to this work?
- Is there an example response showing the data structure that should be returned (new endpoints only)?
- What permissions should be used?
- Is this EE or CE?
-
EE -
CE
-
- Additional comments:
Implementation Table
Links/References
Edited by Leaminn Ma