Accessing Provider Settings from pre-deployment script
I've found examples of how to access environment variables but can't find how to access Provider Settings from before-deploy.ps1.
Basically, I'm trying to access the deployment location 'path' variable so that I can explicitly delete a file which isn't being updated by the deployment. I just seem to be going further down the rabbit hole on this! :(
Thanks
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 joelb on 21 Jun, 2017 10:44 PM
So, I've discovered my root problem, i.e. a file not being updated by the deployment agent. It looks like AppVeyor does a file compare to determine whether a file should be updated. This particular file was being used to get its 'meta-data' (e.g. last modified date) and the content itself was never changed. :( (That's an easy fix).
I'm still curious about how to access Provider Settings from PS1 scripts but now this is more for possible future reference. (If it's not possible I suppose I'd have to create env vars as required).
Thanks!
2 Posted by Ilya Finkelshte... on 22 Jun, 2017 01:22 AM
Hi Joel,
You can Get environment settings API to get this information from the script. You can store API token as secure variable and pass this variable to deployment. Environment ID can be found in browser address when you open specific Environment.
Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:18 AM.