Skip to content

Instantly share code, notes, and snippets.

@pivotaljohn
Last active June 14, 2022 22:22
Show Gist options
  • Save pivotaljohn/a7ac9e295dbebe00b0aa15a76f7ce42a to your computer and use it in GitHub Desktop.
Save pivotaljohn/a7ac9e295dbebe00b0aa15a76f7ce42a to your computer and use it in GitHub Desktop.
Native ytt equivalent of GitLab's !reference
#! .gitlab-ci.yml
#@ load("@ytt:template", "template")
#@ load("helpers.lib.yaml", "setup", "teardown")
test:
script:
- #@ template.replace(setup())
- echo running my own command
- #@ template.replace(teardown())
#! Content of helpers.lib.yaml
---
#@ def setup():
- echo creating environment1
- echo creating environment2
#@ end
---
#@ def teardown():
- echo deleting environment1
- echo deleting environment2
#@ end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment