Fixes Makefile publish target credential issue #87
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.
Problem
We changed the Splunk app ownership from the Splunk account
[email protected]
to the Splunk account[email protected]
. This means that we have to update the SPLUNK_CREDS Github secret with the new credentials. The password in these new credentials contained the characters$^
. When these credentials were passed into the Makefile, Make would substitute the$^
with the Makefile target's first dependency. So the curl would end up like the following:Obviously, the publish failed.
Solution
One solution is to change the password removing those special characters, but this is fragile because it could happen again in the future.
The solution was as follows:
Instead of doing:
curl -u "$(SPLUNKBASE_CREDS)" ...
We do:
curl -u $$SPLUNKBASE_CREDS ...
We also had to alter the publish.yml Github workflow to use single quotes instead of double as the double quotes would result in everything from the $ onward from being omitted. Bash was consuming it.