[semver:patch] fix unexpected string interpolation when using the task-definition-tags argument #131
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.
remove unnecessary quotes which create confusion around string interpolation.
These quotes make the command difficult to use, for example if you want to quote you values which may have special characters. It also throws an error if more than one key/value is used with the simple format. The json format also requires quotes around key/values which makes the removed quotes troublesome. Below are some of the manual tests I did via inlining the orb to show what I mean.
Before change:
Works:
task-definition-tags: key=key1,value=value1
Doesn't Work
After change:
Works:
task-definition-tags: key=key1,value=value1
task-definition-tags: key=tag,value="${CIRCLE_TAG}" key=BuildURL,value="${CIRCLE_BUILD_URL}"
task-definition-tags: "'[{\"key\": \"ReleaseIDTest\", \"value\": \"test\"}, {\"key\": \"BuildURLTest\",\"value\": \"test\"}]'"
Still Doesn't Work
^ Although confusing. I would say is expected. Since the evaluation of the env variable are not happening based on the quotes. In this scenario the json need to be pre processed with jq or something like that. The single quotes are required for the json input by the aws cli. eg.