Has anyone managed so set up a working deploy pipeline using Visual Studio Team Services RELEASE tasks? All the info I can find seem to be based on the Nuget publishing package which takes its parameters directly from the source. I am trying to get this working in the proper release workflow with multiple environments, dev to QA to prod pipeline etc.
The tooling does not seem to be in place for that scenario - or at least, I cannot figure out any combination of parameter where the powershell publish task in VSTS actually populates the app_data folder and sets up the schedule.
Frankly I am completely stumped.
You can use "Azure Web App Deployment" task to deploy your WebJobs and use CRON expression to set up the schedule.
A similar questions for your reference: How to deploy a webjob through CI in VSO with vNext
Related
I have a Visual Studio solution which has various class libraries and several ASP.NET website projects. The website projects reference the class library projects, so for ease of working they need to be in the same solution.
The whole solution is version controlled through Visual Studio Team Services (now Azure DevOps).
When the solution is committed to VSTS, the solution is automatically built by VSTS.
I also want to use continuous integration and deploy the website projects in the solution to various web servers via FTP (FTP is the only option for this, MSDeploy etc is not available). The releases will be triggered by the build on commit.
The problem is that I need to publish the actual website files via FTP during a release triggered by the build, but the build artifact only contains .zip files.
For example, if the solution has a website project called 'MyWebsite' the build artifact has a zip called Mywebsite.zip, but no files are accessible. As such, I can deploy a zip file to the web server, but not the actual website files.
How can I deploy these files?
Furthermore, I don't want to deploy all of the files in the website project. I want to deploy a release version (similar to what is published using Visual Studio 2017's Publish tool), which the zip file seems to contain.
VSTS/Azure Dev Ops has Tasks built in to Extract Files and FTP Upload. The release pipeline also has a variables which you can access via release tasks and powershell. $(System.DefaultWorkingDirectory) is where artifacts(built code) are downloaded to. An Agent Job with two tasks should be able to accomplish what you are looking for.
Tasks
Details
Azure Dev Ops Release Variables
I'm trying to setup CI via TFS 2015, I've got a solution that has got 2 main Web application that currently we deploy manually editing the config files and so on (which sometimes leads to errors)
I've read about build/release process and in the past I've used Jenkins as build server. But till today I've got a question and that's related to when apply the transformation of XML config files.
In my current VTFS2015 setup I've created a build process and I build the project with the following line
msbuild /p:Configuration=Test /p:PublishProfile=Test /p:DeployOnBuild=true xxx\xxx.csproj
This creates me in the folder obj\Test\Package\PackageTmp the package
Is this ok? or should this be done in the release management tab? Consider in my farm I've
Test (from DEV trunk)
Staging (from Dev trunk as well)
Production (from production trunk on 3 machines)
My goal is to have them automatically delivered on the machines, but I don't know the right moment to apply the transformation (during the build I can use the publish feature, during the RM I can use a ps1 script)
Thanks in advance
Well, I think this thread will helps: What TFS 2017 build task applies web.config transforms during TFS builds?
To apply the transformations you can use the extension: Apply transformations in vNext build process.
Usually it should be a package and be used in a deploy task such as
Deploy: WinRM - IIS Web App Deployment or Azure App Service
Deployment to achieved the deployment.
1) Can transforms be engaged in both Builds and Releases?
Yes, you could also do this in a build pipeline with the useage of build deploy task. You need to add the task after the publish build
artifacts task.
2) Does TFS 2017 require a lot of special handling to engage a
transform file?
update
The BuildConfiguration variable is different in TFS 2017, it's inside
the MSBuild task! Transforms are now applied according
to the MSBuild task Configuration setting.
Edit the .proj file is a method to do the transform. If you don't need to change the transform, it will auto do it during the build.You
could also use some 3-rd party task/extension for extra transform such
as: XDT Transform
Usually we separate the build and release for the deployment, cause
it's easy to configure multiple environments and easy to debug issue.
You definitely could do this only in build but with a bloated process.
You could refer this tutorial: Build and Deploy Azure Web Apps using
Team Foundation Server/Services vNext Builds.
For a separate build and release solution, you could take a look at
this blog: Using web.config transforms and Release Manager – TFS
2017/Team Services edition
I am looking to automate Build and Deployment in Visual Studio T.F.S and going through this link for the same.
https://marketplace.visualstudio.com/items?itemName=ms-vsts.ibm-websphere
It clearly says to install IBM Websphere Extension but i am not sure from where can i get it done?
If you are using the the old Xaml build system (TFS 2013 and earlier version), you can follow the steps mentioned in below link to build and deploy the project:
Automated Web Deployment and Team Build Using TFS 2013
If you are using vNext build (TFS 2015 and later version), you can use the CI/CD. Please see Continuous integration, test, and deployment tutorial and CI/CD Hello world for details.
You do not need websphere in order to automate builds, builds are created by a build server and placed in an output ( drop folder location ).
Deployment can be handed by creating post build scripts, there are a number of solutions for handling larger deployments but start with the basic build deployment workflow and scale from there.
See the following QuickStart to get an idea of build/deployment process.
https://learn.microsoft.com/en-us/vsts/build-release/actions/ci-cd-part-1#create-a-release-definition
Been working some with SharePoint 2010 for a litle while and it feels like my deployment method is way to slow and way to complicated, so my question is basically..
Is there anyway for me to deploy a package to a remote sharepoint server directly from Visual studio?..
For instance.. could I some how create a connection between my visual studio project and the sharepoint server I want to deploy to and then simply press some kind of "Deploy-button" that then deploys the whole project(or even better just my changes) against the remote sharepoint-server?
Thanks in advance!
This won't be easy. Firstly there is the Deploy option which you have for every SharePoint project. This deploys the Solution (WSP) to the URL you specified under Site URL for the project. However this won't help you in your case because it only deploys to a local SharePoint Server.
There simply is no automated way to deploy to a remote server from within Visual Studio. What you are talking about actually has aspects of Continuous Integration -> Continuously wanting to deploy on each check-in.
The perfect tool for continuous integration is the Team Foundation Server. There you will have the possibility to create a deployment script (via a TFS workflow) which automatically increases the version number of your assemblies as well as deploys them to a remote SharePoint server. This usually is done via PowerShell remoting.
PowerShell is the keyword here as in the end you could create your own PowerShell deploy scripts and just call them in the Visual Studio Post-Build instead of using a full fledged TFS.
My team uses Team City to do continuous builds and deployment of our Web Application Projects. In order to do a deployment build, we use Web Deployment Projects, which are not available in Visual Studio 2012. We aren't really using any of the advanced features of WDPs like .config transformations, but the main reason we use them is because when they build, they put only the necessary files for deployment into the build folder - in essence, removing all the .cs files and leaving only what's needed for "xcopy deployment". We then rsync the result to our test/prod environments.
So, my question is this: now that WDPs are no longer supported in Visual Studio 2012, how do I do an automated deployment build that pares down to only the files needed for deployment in VS2012?
Web Deployment Projects have been superseded by Publishing Profiles in VS2012.
They can do everything WDPs can do, with the added advantage of not needing to install additional software or create a separate .WDP project file.
Doug Rathbone has done a great blog post on migrating to Publishing Profiles from WDP:
http://www.diaryofaninja.com/blog/2012/08/26/visual-studio-2012-web-deployment-projects-are-dead-ndash-long-live-publishing-profiles
You should look into Octopus, it gives you all kind of deployment options. http://octopusdeploy.com/
Since .net 4.0 there is package and publish support in Web Application Projects out of the box. All you need is call msbuild /t:Package - it will do all the stuff.
I recommend to read this tutorial, there is everything you need. http://www.asp.net/web-forms/tutorials/deployment/deploying-web-applications-in-enterprise-scenarios/deploying-web-applications-in-enterprise-scenarios
We use Jenkins for our CI environment combined with SVN. In VS 2012 we check in code (using Ankh) to SVN and we configure Jenkins to poll SVN every 15 minutes:
Jenkins CI
Here's a post I wrote about setting up a CI server with IIS7 and Web Deploy 2.0:
Setup CI server with IIS7 and Web Deploy 2.0