uat and production builds
I have 2 projects setup and each of those projects has 2 environments a live and uat. I do run a build then deploy uat that works fine and my config transforms for uat are applied.
For live when i deploy it seems to be picking up the uat artifact and uat configs? I guess I am doing something wrong? My yaml file looks like
#uat configuration
-
branches:
only:
- master
#version format
version: 1.0.{build}
configuration: UAT
cache:
- packages -> **\packages.config
before_build:
- nuget restore
- npm install -g grunt-cli
- cd mysite.Web.UI
- set PATH=C:\Ruby22\bin;%PATH%
- gem install compass
- npm install
- grunt prod
build:
publish_wap: true
project: mysite.sln
deploy:
provider: Environment
name: UAT Main Site
app_offline: true
skip_dirs: \\App_Data
#live configuration
-
branches:
only:
- master
#version format
version: 1.0.{build}
configuration: Live
cache:
- packages -> **\packages.config
before_build:
- nuget restore
- npm install -g grunt-cli
- cd mysite.Web.UI
- set PATH=C:\Ruby22\bin;%PATH%
- gem install compass
- npm install
- grunt prod
build:
publish_wap: true
project: mysite.sln
is it because for live i do not have deploy which I run manually?
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
Support Staff 1 Posted by Owen McDonnell on 19 Mar, 2019 06:18 PM
I see that you are using conditional build configuration but both conditions are the same.
I haven't addressed your deployment problem since this stood out to me first as a possible mistake.i.e.
2 Posted by ismail.mayat on 20 Mar, 2019 08:51 AM
Owen,
So I am going to update the uat part to
branches:
only:
- uat
so it will now use different branch.
At the project level in settings default branch has been set to master and branches to build has been set to all (nb have inherited this, first time using app veyor, have experience with teamcity and octopus).
When i run the build which is at project level am i right in assuming it creates the artifact based on master which is default branch. Then when deploy is run for the different environments will it use the yaml file settings to transform for the different environments? Still trying to get my head round how it all ties together.
Regards
Ismail
Support Staff 3 Posted by Owen McDonnell on 21 Mar, 2019 01:47 AM
I'm not exactly sure of your question but you may wan to give this a quick read.
will be used.By project level you mean when you start a build from the UI? If so, yes, default branch will be built, and the part of your config under
4 Posted by ismail.mayat on 22 Mar, 2019 11:00 AM
Owen,
Ok mystery solved. So first issue was as you rightly pointed out i was looking at wrong branch for uat. The other issue was my bitbucket was missing the webhook url from appveyor. Once i added that any commits to uat and i get auto build and deploy. Commits to master and i get build, deploy is manual as expected.
Many thanks for your help.
Regards
Ismail
ismail.mayat closed this discussion on 22 Mar, 2019 11:00 AM.