/p:DeployOnBuild=True /p:DeployTarget=MsDeployPublish /p:MSDeployPublishMethod=RemoteAgent /p:CreatePackageOnPublish=True /p:DeployIisAppPath="Sites/Stage" /p:MsDeployServiceUrl=10.XXX.XXX.XXX /p:username=DOMAIN\MyUserName /p:password=MyPassword
But I didn't want to store my password in
build's configuration. So I looked into TFS variables for this. After small investigation I modified a bit MS Build string:
/p:DeployOnBuild=True /p:DeployTarget=MsDeployPublish /p:MSDeployPublishMethod=RemoteAgent /p:CreatePackageOnPublish=True /p:DeployIisAppPath="$(SiteName)" /p:MsDeployServiceUrl=10.XXX.XXX.XXX /p:username=DOMAIN\$(User) /p:password=$(Password)
And added SiteName, User and Password variables:
Pay attention, that I set checkboxes at "Allow at Queue Time" section - it shows parameter in the dialog window during queue and set secret for Password variable. But you can't clear this field and turn off secret - in this case a developer who starts a build has to enter own credential.
So in such simple way, I added the possibility to deploy website without adding new add-ons to TFS.
No comments:
Post a Comment