-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
template: Create a my
alias for the current pack
#221
Merged
Merged
Conversation
This file contains 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
angrycub
added
type/enhancement
theme/template/variable
Relates to the variables passed to templates
labels
Mar 10, 2022
angrycub
force-pushed
the
f-alias-pack-as-my
branch
2 times, most recently
from
March 10, 2022 19:31
7a8fb14
to
1de8429
Compare
angrycub
force-pushed
the
f-alias-pack-as-my
branch
from
March 11, 2022 01:29
1de8429
to
f9e27ce
Compare
angrycub
changed the title
WIP: template: Create a
template: Create a Mar 11, 2022
my
alias for the current packmy
alias for the current pack
angrycub
requested review from
DerekStrickland,
jazzyfresh,
jrasell and
lgfa29
as code owners
March 11, 2022 01:33
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests for this fail after pull. Should they?
Click for test output
``` internal/cli/api_test.go:9:2: github.com/hashicorp/nomad@v1.2.7-0.20220223202307-7bcf0afd810b: invalid version: git fetch -f origin refs/heads/*:refs/heads/* refs/tags/*:refs/tags/* in /Users/derekstrickland/go/pkg/mod/cache/vcs/911d2abcaf3e75a0404250248d67881ab48f5b0fce3b832faf67761fee0fe0f2: exit status 128: error: Could not read e6814c08afe92af1e3e09ae9653fd3130d5d893a error: Could not read d7edf9b2e42348865908735996359c7869fb16b5 error: Could not read 80185938a8bda74a28e4f8b381c677f87ffb13a4 error: Could not read b7248824cf2e3e9889e506f384bb585f03452939 error: Could not read 2a6beed6dab27c55fcc5106fadae6a81274dffb2 error: Could not read b511af94e6aa4bad62a5552f7c33581ede65b0d5 error: Could not read d496f7b030a5544fd07e79ae5f9a20720dfc3437 error: Could not read fcd42f639221c537c126b6f7d556de421a612d58 error: Could not read e8a418b1ecad109ca8834ef6ed22fe27b1c46164 error: Could not read 9d4ff89eaff3ef4f32df90b00e1c56b5a280e2ea error: Could not read 4c40d62f684e96c0ff20616d93044de681ad48d6 error: Could not read 6b43ecb4250450e5939fad6238fe2bbbba3192b8 error: Could not read d28bf3231ecf59dba16bdc74da91611fef1c7c68 error: Could not read 72b9b879e521124e8ce097f00fb424358ac8007d error: Could not read f3c944aaf585ca2abc630e4be00e170af9b6759c error: Could not read 4cac8448726749d859890a0752f255a39ec5a5f2 error: Could not read f75f5c9b3b30c82085bafd068a5bb4c48236b167 error: Could not read 97d03887c767c0e9c78a2cdd15825544c2010dbe error: Could not read f95749f1cacad532f97875ea2e68e3315e5872ae error: Could not read 069455c0e414e3824db121634d0074729e233e55 error: Could not read bb8ce73cc7bc998f879a3420cb28c3de4f6a5630 error: Could not read 858e98cea0bd623279652c9886364f28d3b8c13f error: Could not read 6708a0ccc9032010eb6ac34c07463b8dedaffd58 error: Could not read e87d9cc8a689685e0a346f9b7dc71ef3d53c6cdc error: Could not read 8920d56212835e09cad3def7b4f77d4ebb813bd1 error: Could not read 382bbbe29fac9341b639f7dfcfe10b9084a4e853 error: Could not read 058a8daac3913c673fc39ff9af452bc37f8e0a90 error: Could not read 0ecda992317d3300e1c1da05170f8bba18410357 error: Could not read 855caf72328e02ef7b20292872bd892f3eb5d5c5 error: Could not read 4b070e8e18228ff8dc60d9a1d74a99630b3c26d7 error: Could not read cafdcc9216bc5af0d7db97de12807a0f504e7c88 error: Could not read 830c0b16d2ed3d1e3ac17caf683a64aafdbcfba1 ```
DerekStrickland
approved these changes
Mar 14, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
Description
Currently a pack's variables are accessed through a variable with the packs name. For example, the
simple_service
pack's
job_name
value is accessed in templates using.simple_service.job_name
. This PR creates an alias—my
—that can also be used to refer to the current pack's variables. In this same example, a template of
simple_service
can also access the
job_name
value using.my.job_name
.This can facilitate template reuse between packs with less editing.
Commits
my
alias to pack variablesReminders
CHANGELOG.md
entry