yml and deployment tab from UI
Right we are changing all of the our settings in our project directly in UI, but we would like to move part of this settings to the appveyor.yml and store in git like scripts in hooks. I know that is possible but only for all the settings and UI and yml file are not merged together. My question is what is the best approach since we have ~30 deployment slots and right now we are choosing which one to publish from the UI.. and we would like to keep it like that but rest we would like to move to git.
I attached a screenshot how we are choosing on which env we are going to publish (we are using some hacky implementation that we are putting some dumb branch name and then this env is ignored)
Do you have any ideas how we can improve our workflow?
-
env.png 17.4 KB
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 31 Jul, 2017 09:17 PM
Hope I understood you correctly. And I assume you are using Azure AppService deployment slots.
I believe that you can achieve this with overriding environment variables feature. Environment variables are one of few settings which are being merged from UI with those set in YAML. Idea is to have single Environment, but provide different site name (and hostname because they are different in case of deployment slot) as environment variables.
So step by step:
create single "master" environment
use deployment credentials instead of site credentials (those from publishing profile). Thus you do not have different credentials (and variables) for each slot.
add the following variables:
siteName
andhostName
. Note that they are the same for default site, but for slots it issitename__slotname
(2 underscores) andsitename-slotname
(single dash) for hostname. Use default values of some non-production site or slot so error to be harmless. Or even non-exiting values.Set up this environment deployment with YAML
siteName
andhostName
into UI.Now you can always change slot by altering those variables in the UI, while having build configuration in YAML.
2 Posted by Ilya Finkelshte... on 31 Jul, 2017 09:22 PM
Better project UI screenshot
3 Posted by Lukasz on 31 Jul, 2017 10:04 PM
No they are not slots, we are always publishing to test slot (we have test, staging, prod) but our service is in multiple countries (so what I showed in the first screen are test env for each country) so we need to be able to choose to which countries we are going to deploy particular version. So for example we have country A, B ,C, D, E and we should be able to deploy only to countries we want for example A and D.
4 Posted by Ilya Finkelshte... on 01 Aug, 2017 12:02 AM
So it is not always 1 of 5 countries, but can be say 2 or 3 of them?
5 Posted by Ilya Finkelshte... on 01 Aug, 2017 01:50 AM
You can do something like this:
and manage values for environment variables
deploy_a
,deploy_b
, ...deploy_e
with UI.6 Posted by Lukasz on 01 Aug, 2017 07:17 AM
that sound good, and how I'll actually deploy based on this variables?
7 Posted by Ilya Finkelshte... on 01 Aug, 2017 02:58 PM
The similar way as you do now. As I understand that now you go and manually set
BranchThatDoNotExistWillNotPublishThere
. With this configuration you will go toSettings > Environment
in UI and set appropriate values for those variables. So you will be able to change what country to deploy with UI, while having rest of build configuration in YAML.Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:18 AM.