Add deployment file to VS 2017 without deploying - azure

I just installed VS2017 and I want to deploy specific .js files without deploying the whole project. When I try to upload a new deployment file, VS force me to publish the project. Is it possible to just add a deployment file without deploying? So I can use that deployment file to deploy singles .js files or html files.
EDIT
Lets say I want to deploy a project to a virtual directory on Azure. For example to domain.com/newapp. Using a deployment file, I would like to first edit the settings, how am I supposed to do that, if VS2017 deploys the project immediately after I pick the deployment file.

Related

Azure DevOps (VSTS) - how to copy a file from the agent VM and into my repo

I'm very confused about how one of the build task currently works.
I have been using Grunt locally in VS-Code to minify a JS file. All seems to be working well. In Azure DevOps, as a Build Task, I am using the same package.json the minification takes place but on the agent VM:
D:\a\1\s\Build\Hello.js
Looking in my repo, this file does not exist. I am assuming that I need to copy the file and upload to my own repo. Does anyone know how I do this?
A build usually creates a build ** artifact** that gets copied to a drop location. You will use the build artifacts inside your release definitions to deploy the binaries / minified or optimized code to an environment.
You probably don't want/need to upload any file back to your repo.
See: What is Azure pipelines

Publish Zip Package from VSTS to Octopus Deploy

I'm trying to deploy an artifact from VSTS to an Azure App Service, using Deploy an Azure Web App step template in Octopus Deploy. The VSTS zip package will have a structure like the following:
\Content\C_C\a\1\s\Api{ProjectName\obj\Release\Package\PackageTmp
When I publish the zip file using MsDeploy.exe. It automatically only copy the folders & files inside the PackageTmp folder into the wwwroot folder. However, when I use the Octopus deploy, It copies all of the folder from Content\. Is there any way to make the Octopus deploy work like using MsDeploy.exe? I'd like to use the zip as is, so adding a Copy Files step or changing the PackageLocation in the VSTS build is not really an option.
Any help/suggestion is really appreciated.
Thank you.
To achieve the layout of the files as you describe, you will have to modify your build step. In the MSBuild arguments section on the build step, ensure you have the following parameters defined:
/p:WebPublishMethod=FileSystem /p:PackageLocation="$(build.artifactstagingdirectory)\\"
These two parameters will create the package in the directory specified by the PackageLocation parameter, and it should be in the format you expect.
In the step where you push the package to Octopus specify this directory as the Package Source.
There isn’t such setting to do it.
You can publish the web app with File System mode , then package the files through Package Application task.

Mean application on azure webapp

i've an application Mean that will deployed on Azure in a continuous delivery.
We have define on VSTS a build script that build typescript to JS file, clean up unuseful files, a gulp task that zip files and finally copy zip files on drop folder.
After on release level we will have a script for IT environment, staging environment.
We have an Azure Web App Deployment task, it takes the zip files and decompress the files rightly.
But if i let the node-modules folder it takes more that 2 hours ...
i search a solution to launch an 'npm instal' after this task.
I know that's possible to go to Kudu and launch the npm install.
I've tested solution with a deploy.sh (see on the net) but task not launch automatically like i see.
I've try to launch a power shell script but it's failed ...
I've the feeling that's not possible except manual intervention via kudu or other .
There is a way to do this, in the Azure Portal go to your Web App then select "Deployment Options". In there you will see ways to load your app automatically from github, Visual Studio Team Services, OneDrive, and more.
It's all automatic, from the copying of the code to the npm install. Works great for us for development, test, and production environments using VSTS and we have a node/express/angular app.
Here are the docs for setting up automatic deployment:
https://learn.microsoft.com/en-us/azure/app-service-web/web-sites-deploy

Azure deploy missing XML doc files from deployment target

I have a solution. 2 projects within the solution produce XML documentation, that I need to copy to the bin folder web root when I deploy to azure.
Locally, I notice that when I build my solution, those 2 XML files get copied with the DLL into my web/bin folder. When I run my un-modified deploy.cmd file locally, I also notice that kudosync picks those up and hapilly puts them into my artifacts/wwwroot/bin folder.
But - when I deploy to azure by pushing to github, the local deployment temp folder on azure doesn't contain the XML files, and thus they don't get picked up. I added some post-build "DIR" commands to the deploy.cmd file to see what is going on, and the XML files just aren't there in the %DEPLOYMENT_TEMP%\bin\ folder.
Anyone know what's going on here?
Aha - it's because when you build from MSBUILD, it doesn't generate the XML docs for the related projects. I was getting them locally because I'd at some point built from VS, which generated them.

TFS: Automated publish a folder to Azure website

I am trying to create automated build to publish a folder with files onto Azure web-site. And I cannot accomplish this.
I am NOT publishing a solution (.sln), but rather a folder with files. I am using VS2013 and Visual Studio Online.
I have experience with TFS web publishing, so I published solutions many times.
So, what I did so far:
Created an MSBuild build.xml file that just copies files from the folder to the output.
Created a build definition based on AzureContinuousDeployment.11.xaml
Specified build.xml in my build definition, Process tab, in "Solution to build" parameter:
If I build my project, it is correctly built, files are copied to the output, etc (I can verify it by opening drop location, all files are there).
Then, I:
Created a web-site in Azure, linked it to my TFS subscription.
Downloaded a publish profile (.PublishSettings from a web-site).
Created a Web publish profile (.pubxml) in Visual Studio based on .PublishSettings file).
Specified Web Deploy Publish Profile and Deployment Settings Name:
But now I am getting an error during build:
Exception Message: Please specify a Visual Studio Solution (.sln) to build. (type BuildFromSolutionException)
So it asks me for a Visual Studio solution, but earlier it worked perfectly with MSBuild file (after step 3).
I tried to rename my .xml to .sln (probably it is not what I should have done), and build now says "There was no Windows Azure project (.ccproj) detected in the solution. Continuous delivery to an Azure Cloud Service requires an Azure project. (type CCProjNotFoundException)"
If I don't specify "Deployment Settings Name", build completes without errors, but again no publishing to Azure.
So, the question is, how to publish a custom MSBuild build, without a solution, onto Azure? Is TFS continuous Azure publishing for Solutions only? I expect it to be agile, like I published folders from Local Git to Web-site without any hassle.
What should I do?
There are a few confused ideas in your question. Fits, there is no relationship between and automated build and Git. You are using Team Foundation Build to run the workflow of deployment. It is the workflow that is not working for you. In effect the build and deployment script. In fact the script you are using works with both Git and TFVC so that is not the issue.
That specific script is designed specifically for building an azure project that is then continuously delivers to Azure and you likley can't use it as you are. You can however create another script and use that. I would suggest you try instead to use the Default build script and use a powershell script within the build to collect the files and then push them to Azure.
If you want to go a little more advanced you could create a copy of the default and make one that does not require MSBuild at all.

Resources