Web deploy from multiple computers
Asked Answered
L

1

6

I work on a website on multiple computers, my work and my home pc. The source is maintained under a git repository. I use Web Deploy to publish the website to IIS on the public server. Everything works OK, I can publish from both computers and it works.

The issue is that when I deploy from one PC, then go to the other, get the latest changes from git, make more changes, then deploy again, it re-deploys the entire website instead of only the files that have changed - as is what happens if I were to take out the "then go to the other, get the latest changes from git" steps from the first sentence of this paragraph.

What can I do, what files can I include in my git repository (I exclude all packages, bin and obj directories), or what extra configuration can I perform, to resolve this?

Ludmilla answered 18/10, 2012 at 14:18 Comment(9)
Sounds like the git archive bit and/or date on the files is being reset when you make more changes. Check those settings, and ensure you're using the latest version of git. Also, are you going through a proxy? If so, what type? Git uses ssl and some proxies strip out certs.Melioration
It would appear this is the problem. However simply making Git keep the file modification times in check (which from what I've seen isn't possible without the use of external libraries) won't really suffice since there could be a difference in time on PC A and PC B even if it is just a few seconds it could be enough to throw it all out of whack. Ideally what I'd want is some sort of external file that Web Deploy uses to keep track of what's been deployed and when. I thought there used to be such a file, but alas it is appears to be no more.Ludmilla
Has the sync ever done a multi-host diff successfully? Ensure you're not behind a proxy, then I suggest doing simple sync from each host, but without changes, to make sure it doesn't sync whole repository. Also suggest setting up small test repo and see if you can replicate the problem. This sync bug goes against very nature of version control. Disturbing..Melioration
If above notes don't help, what version of MS Web Deploy are you using? v3 released in April 2012 has fixes iis.net/learn/publish/using-web-deploy/….Melioration
@Melioration Good guess, but I've been running v3 for a while and also have this problem, had it prior to v3 as well. Running VS 11 + IIS 7.5 Anxiously hoping for a solution to this problem!Tumblebug
did you try the Nov 7 notes (above)? What were the results?Melioration
I got sidetracked and never got around to trying Lizz's suggestions, if someone else has and has some feedback I'd love to hear it. Since posting this I'm still using web deploy and just biting the bullet when I have to deploy from another PC. Hopefully it's fixed in a newer version.Ludmilla
Speak of the devil... asp.net/vnext/overview/fall-2012-update/…Ludmilla
As a follow up, I've now started migrating my sites to Windows Azure and have opted for the git deployment method which I've somewhat fallen in love with.Ludmilla
F
1

Add a repo on your public server, push to that, then deploy from there. The push will be minimal, git can be startlingly good with deltas.

Fauces answered 31/12, 2012 at 6:8 Comment(2)
While this is certainly a good solution, you're essentially saying "use another deployment method". There are certainly other project deployment methods, but the question is about WebDeploy, which I find to be extremely convienient in a majority of scenarios. It's also not always possible to just remote into the server, Web Deploy can be set up for non-administrators who don't have the type of access it would require to implement your suggestion.Tumblebug
I might be missing something but it looks like a simple observation to me: you say Web Deploy can't identify redundant traffic from different systems, so I think there's no solution but accepting the redundant traffic or doing your deploys from a single system. The main server seems like an obvious place to do that.Fauces

© 2022 - 2024 — McMap. All rights reserved.