Deploying angularjs app (all javascript) to different environments with different configurations
We've got an angular app that builds using a set of gulp tasks and currently it all deploys to our staging env using the appveyor app with not issues.
However, the app uses a file called env.js to store all of the environment specific variables (like API URLs etc). I want to be able to change the file (we have env.staging.js and env.production.js) that is picked up and deployed depending on the environment the app is being deployed too but I can't think of a good way to do that in appveyor.
the gulp task could take in an environment variable but that only runs when the code is built the first time not when it is deployed to different environments.
So you have any pointers/suggestions?
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 Ilya Finkelshte... on 08 Sep, 2017 08:02 PM
From our previous messages I remember that you are using IIS website deployment with AppVeyor deployment agent.
I think that you could try to use
skip_files
setting (check here) and simple keep this file untouched.As I understand you do not need to update it often and if you need you can always do this by other means, for example with FTP or by RDP-ing to server. Or even with AppVeyor agent but with Windows Application deployment which will simple copy this file over (though this seems overkill to me).
Other option is to edit it on the fly with deploy.ps1 but this will leave small time window when this file has wrong (not updated) values.
2 Posted by ben on 08 Sep, 2017 11:49 PM
Thanks so much for your help as always IIlya.
Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:19 AM.