-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathatom.xml
93 lines (70 loc) · 6.22 KB
/
atom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title><![CDATA[rasmus.me]]></title>
<link href="http://rasmus.me/atom.xml" rel="self"/>
<link href="http://rasmus.me/"/>
<updated>2014-08-24T18:42:35+02:00</updated>
<id>http://rasmus.me/</id>
<author>
<name><![CDATA[Rasmus Lauridsen]]></name>
</author>
<generator uri="http://octopress.org/">Octopress</generator>
<entry>
<title type="html"><![CDATA[Web Deploy Artifacts From appveyor.yml]]></title>
<link href="http://rasmus.me/blog/2014/08/24/web-deploy-artifacts-from-appveyor-dot-yml/"/>
<updated>2014-08-24T18:33:05+02:00</updated>
<id>http://rasmus.me/blog/2014/08/24/web-deploy-artifacts-from-appveyor-dot-yml</id>
<content type="html"><![CDATA[<p>At work we have started using <a href="http://appveyor.com">Appveyor</a> for building and deploying websites.
This has led me to spend quite a bit of time with the configuration file appveyor.yml.
Today I ran into a little quirk of the undocumented type.</p>
<p>The project I am currently working on uses Web Deploy to deploy an Umbraco website to a Microsoft Azure Website.
When the project builds, a Web Deploy package is created and saved to appveyor’s artifact storage.</p>
<p>Earlier I have configured our builds in the web interface and I have been quite happy with it.
But I wanted to try the power of the <a href="http://www.appveyor.com/docs/appveyor-yml">appveyor.yml</a> file.
The yaml file allows you a greater amount of control over the build, and allows you to put the build configuration in source control with your projects.
This way you can clone your project and not have to set up a new build in appveyor from scratch.</p>
<p>It is quite easy to configure an artifact upload in yaml.</p>
<figure class='code'><figcaption><span>Upload Web Deploy Package</span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
</pre></td><td class='code'><pre><code class='yaml'><span class='line'><span class="l-Scalar-Plain">artifacts</span><span class="p-Indicator">:</span>
</span><span class='line'> <span class="c1"># pushing the website package</span>
</span><span class='line'> <span class="p-Indicator">-</span> <span class="l-Scalar-Plain">path</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">build\_PublishedWebsites\Website_Package\Website.zip</span>
</span><span class='line'> <span class="l-Scalar-Plain">name</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">WebsitePackage</span>
</span></code></pre></td></tr></table></div></figure>
<p>As you can see in the picture below, the zip file was saved with the deployment name WebsitePackage.
Everything looked like it should. Happy days!</p>
<p><img src="http://rasmus.me/images/web-deploy-zip.png" title="Artifact as zip" alt="Artifact saved as zip archive"></p>
<p>Deployment to different environments in Appveyor is so easy.
It has a Web Deploy provider that is super easy to <a href="http://www.appveyor.com/docs/deployment/web-deploy">use</a>.
But when I ran the deploy something was wrong, it looked like the zip file had just been unzipped directly into the wwwroot directory.
This meant that all the files for the website were placed in a folder some nine directory levels deep at
<code>..\wwwroot\Content\C_C\projects\"solutiondir"\"projectdir"\obj\Release\Package\PackageTmp\</code>
I wasn’t really sure what was going on, as I had had this same deploy work where I had configured it via the web interface.</p>
<p>After some searching around, I found a difference between the two setups.
When I configured the build through the web interface I had set the artifact type for the zip file to “Web Deploy Package”.</p>
<p><img src="http://rasmus.me/images/artifact-web-deploy.png" title="Artifact as Web Deploy Package" alt="Artifact set to Web Deploy Package in web interface"></p>
<p>I couldn’t find a way to do this in the yaml file. I searched through the otherwise great <a href="http://www.appveyor.com/docs">documentation</a>,
but found nothing about how to set an artifact as a web deploy package in the appveyor.yml file.</p>
<p>After a bit of trial and error and some <a href="http://www.telerik.com/fiddler">fiddling</a> around with the web interface, I found out how to do it in appveyor.yml.
You just need to set the type of the artifact to “WebDeployPackage”</p>
<figure class='code'><figcaption><span>With type</span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
</pre></td><td class='code'><pre><code class='yaml'><span class='line'><span class="l-Scalar-Plain">artifacts</span><span class="p-Indicator">:</span>
</span><span class='line'> <span class="c1"># pushing the website package</span>
</span><span class='line'> <span class="p-Indicator">-</span> <span class="l-Scalar-Plain">path</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">build\_PublishedWebsites\Website_Package\Website.zip</span>
</span><span class='line'> <span class="l-Scalar-Plain">name</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">WebsitePackage</span>
</span><span class='line'> <span class="l-Scalar-Plain">type</span><span class="p-Indicator">:</span> <span class="l-Scalar-Plain">WebDeployPackage</span>
</span></code></pre></td></tr></table></div></figure>
<p>Now the artifact type in the “Artifacts” tab shows as a Webdeploy package.
<img src="http://rasmus.me/images/web-deploy-webdeploy.png" title="[Artifact as zip [Artifact saved as zip archive]]" ></p>
<p>That made everything right. Now when I run the deploy with the package the right files are placed in the wwwroot directory, not in some deep deep subdirectory.</p>
<p>Short version:</p>
<p>If you want to have web deploy working right when deploying from appveyor, then set the type of your package to <code>type: WebDeployPackage</code>.</p>
]]></content>
</entry>
</feed>