tag:help.appveyor.com,2012-11-13:/discussions/suggestions/830-script-msbuild-deployment-providersAppVeyor: Discussion 2018-08-25T02:00:31Ztag:help.appveyor.com,2012-11-13:Comment/380216302015-09-25T17:13:30Z2015-09-25T17:13:30ZScript / MSBuild deployment Providers<div><p>Could you please elaborate on your idea, maybe give some
pseudo-appveyor.yml example of how it could look like? Thanks!</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/380216302015-09-25T23:56:33Z2015-09-27T23:22:38ZScript / MSBuild deployment Providers<div><p>Sure. This is sort of how i think the appveyor.yml may look. I
am showing both a "Script" provider, and an "MSBuild" provider,
along with an existing Github provider.</p>
<p>When the EnvVariable CI_DEPLOY_SCRIPT = True, the power shell
(or cmd) script would execute, same for the MSBuild provider, but
that one, i was thinking you could even pass additional MSBuild
properties to it ( that part is more of a 'nice to have', as you
could accomplish that part with environment variables).</p>
<p>For example, with MSBuild, I have existing msbuild scripts that
create a release on codeplex, and upload the artifacts to the
created release.</p>
<p>During deployment phase, I want to be able to use the github
provider, and execute a powershell/cmd script that can be dependent
upon the value of an environment variable.<br>
During deployment phase, I want to be able to use the github
provider, and execute an msbuild Target(s), which then logs back to
the MSBuild appveyor log provider.</p>
<pre>
<code>deploy:
- provider: GitHub
tag: $(APPVEYOR_PROJECT_NAME)-v$(APPVEYOR_BUILD_VERSION)
release: $(APPVEYOR_PROJECT_NAME)-v$(APPVEYOR_BUILD_VERSION)
description: $(APPVEYOR_REPO_COMMIT_MESSAGE_EXTENDED)
auth_token:
secure: XXXXXXX
artifact: ReleaseZips
on:
branch: master
CI_DEPLOY_GITHUB: True
- provider: Script
ps: >-
$env:APPVEYOR_BUILD_FOLDER\deploy\somePowerShell.ps1
on:
branch: master
CI_DEPLOY_SCRIPT: True
- provider: MSBuild
path: $(APPVEYOR_BUILD_FOLDER)\someMsbuild.msbuild
variables:
- MY_VAR1: Value
- MY_VAR2:
secure: XXXXXXXXX
on:
branch: master
CI_DEPLOY_MSBUILD: True</code>
</pre></div>Ryantag:help.appveyor.com,2012-11-13:Comment/380216302015-09-28T01:04:39Z2015-09-28T01:04:39ZScript / MSBuild deployment Providers<div><p>OK, I see. Thanks for clarification. However, you should be
aware that such kinds of deployment providers would be possible to
run on build worker VMs, not from "Environments" section where
deployments run on shared servers.</p></div>Feodor Fitsner