How to use private env variables in build script without log giving away secret
I want to automatically publish my built NuGet package when tags are pushed. I have added my NuGet API key as a secret env variable in the appveyor build definition. I have also prepared a ps1 script that runs on successful build completion to publish that uses that secret environment variable as a command line parameter to nuget.exe. But it just occurred to me that the console log would reveal the secret, and the logs for every build are publicly available.
How can I keep a command line out of the build logs?
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by andrewarnott on 30 Jan, 2016 05:56 PM
Oh, never mind. I see that the logged command doesn't expand the variable references. So we're good here. :)
andrewarnott closed this discussion on 30 Jan, 2016 05:56 PM.