Repository navigation
Add guide for templating with ytt - #442
Closed
taylorsilva wants to merge 1 commit into
Closed
taylorsilva wants to merge 1 commit into
taylorsilva wants to merge 1 commit into
Conversation
Signed-off-by: Taylor Silva <[email protected]>
Member
Author
aoldershaw
reviewed
Jul 6, 2021
Comment on lines
+736
to
+748
| #@ load("@ytt:data", "data") | ||
| jobs: | ||
| - name: #@ data.values.job_name + "-job" | ||
| plan: | ||
| - task: #@ data.values.task_name | ||
| config: | ||
| platform: linux | ||
| image_resource: | ||
| type: mock | ||
| source: {mirror_self: true} | ||
| run: | ||
| path: echo | ||
| args: #@ data.values.args |
Contributor
There was a problem hiding this comment.
I get we're trying to introduce some of the ytt concepts here, but this particular example is something that fly can already do directly (and more simply):
jobs:
- name: ((job_name))-job
plan:
- task: ((task_name))
config:
platform: linux
image_resource:
type: mock
source: {mirror_self: true}
run:
path: echo
args: ((args))...with the same vars.yml file, minus the #@data/values directive, and then fly sp --load-vars-from vars.yml.
Maybe we could add something that fly can't help us with, like an if statement that depends on the vars?
| We have all the pieces of a templated pipeline. Lets put it all together | ||
| and render the final pipeline. | ||
|
|
||
| Populate the \code{vas.yml} file with the value you want. |
Contributor
There was a problem hiding this comment.
Suggested change
| Populate the \code{vas.yml} file with the value you want. | |
| Populate the \code{vars.yml} file with the value you want. |
Member
Author
|
Had the idea of spinning this into something more general but I don't have the motivation for doing this right now so I'm closing this. Thanks for the feedback though Aidan! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rendered
