Check out the Source code and the build release pipeline links here Source Code - rahulpnath.visualstudio.com/RUclips%20Samples/_git/WindowsService) Build Pipeline - rahulpnath.visualstudio.com/RUclips%20Samples/_build?definitionId=14&_a=summary Release Pipeline - rahulpnath.visualstudio.com/RUclips%20Samples/_release?_a=releases&view=mine&definitionId=3 Thanks for watching - Don't forget to like and subscribe!
You deserve a lot more credit and a lot more views!!! Your videos are very clear and informative. I've been through many documentation, none as clear as your videos. Please keep up the great job!!
You saved my day! I have to configure a build pipeline for the first time in Azure DevOps. Before I'm using on premise TFS. So there I used the "Windows Machine File Copy" specifying a FQDN with credentials in our network. In Azure DevOp this won't run anymore. So I installed deployment agents. But here the same as before, it will not work. My mistake was to think to complicated. With the deployment agents it is easy as it can be, simply specify directories as if we are working on the local maschine (and not \\servername\share\...). With your fantastic Heartbeat-Video I now understand what to do (and I searched and tried a lot before). And an additional benefit, I've never heard from Topshelf before. This tool makes it very easy to install my artifacts as services. Awesome and very helpful. Congratulations, you made a good job.
Thank you Klaus for the comment. Made my day! Do check out the other videos in the series if you run into issues with Azure DevOps pipelines - ruclips.net/p/PL59L9XrzUa-m7AFDgjWuwm6exyCklc03U
Happy that it helped Amrit. Do check out my other videos in this series which covers different deployment scenarios. ruclips.net/p/PL59L9XrzUa-m7AFDgjWuwm6exyCklc03U
Really awesome. Rahul I have a question, why is it needed to use deployment group instead of normal agent? The normal agent even have the option to connect to a virtual machine
This was more of an example to show how to use deployment groups - yes if all you need tis to use the normal agent you could do that too. Hope that helps
Thanks Rahul, for sharing such precise and valuable informative video; really helped a lot for day-to-day DevOps implementation/troubleshooting. Cheers!
Thank you, Kieran. Sure do use it if it does the job. Intend was more to break it down into pieces and show from scratch how to build up one. Helps understanding I believe.
hello Rahul, If we deploy an Infra example an App Service Plan in the Release pipeline before deploying the code. My question is every time a new version of the code gets pushed will the infra also gets re-created everytime. How does that work out in real life examples. thank you
Hi Chaisen, When using infrastructure as code, mostly I tend to stick with the flow where the infrastructure is deployed if it does not already exists. So if it's already created then it skips that resource. I cover some of this in my ARM template video here ruclips.net/video/3IRwtbGlshk/видео.html Let know if that answers your question.
Thanks for sharing this Rahul , I am doing something similar and everything works except variable substitution. I am trying to override serilog path of appsettings.json but its not working. In the initialize job I could see [SERILOG_WRITETO_ARGS_PATH] --> [F:\\Services\\Logs\\ICEFTPWorkerService.txt] In File Transform I could see 2020-12-07T03:29:29.1095014Z Applying JSON variable substitution for E:\Apps\ICEFTPWorker\appsettings.json but its not getting applied to actual file , any thoughts?
Hard to tell without actually seeing it in action. Couple of things to check - Is the variable replacement happening at the right step. Is it the transformed file that is getting deployed - Is the name matching correctly and the scopes for variable specified correctly.
Could you please help me to understand how to do a patching automation with azure devops ? For instance, I have a windows / webapplication already hosted in a machine. Now I just need some selected files in the publishing artifact. Is that possible ?
I haven't done this myself Ajish, so unfortunately can't help. These days most of the apps I build are PAAS where the cloud provider manages all this. (Web Apps, Functions etc)
Hi Rahul ,your video was so gud ! Can i use the same approach to Deploy the windows service in the Onprem applicaton server ? In that case Is it mandatory to create the Deployement Group ? That is the usecase for Deployment group here
Thank you good videos for devops learners. Can you Please guide me.....how to copy the Build artifacts from Private Agent (custom agent) to target another windows server ? Thank you
Thank you and happy that you are finding the videos useful. Are you looking to move the artifacts from on server to another? Does using the FTP Task work for you? docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/ftp-upload?view=azure-devops
@@RahulNath Thank you for your response.. Rahul here am using the azure default agents when triggering the code build and my artifacts are copying with in azure pipeline location (D:/a/1/a), how can i route the artifacts to another target windows server. Thank you.
@@subbareddykola1643 The FTP task should still here I guess to copy the artifacts over to a remote server. Did you give that a try? Are you facing any issues?
Sounds like good information. Unfortunately, I couldn't see some of the things you clicked on due to the video of you in the lower right hand screen covering part of the web site.
Sorry about that Collier - Let know if you have any specific questions and happy to answer. I have fixed this problem in my newer videos. Thank you for the feedback
Hey @@RahulNath tested it on VMs with only private IPs and it worked straightaway, just to had to have the ssh ports opened in the VMs, thats about it.. cheers!
@@RahulNath I wanted to build my C# code (Currently we are using CI/CD jenkins job). but here i wanted to use Azure devops. and finally i wanted to move my code to the VMs like (DEV, QA and Prod) environments.
@@balajid5461 depending on type of app and how’s its deployed the pipeline changes . I have a lot of common scenarios in the series. Most of them are .NET apps (web,exe etc)
Here is the build pipeline that I used for this video - rahulpnath.visualstudio.com/RUclips%20Samples/_build?definitionId=14&_a=summary (It is there as a pinned comment on this video as well) Which paths are you referring to in the vsbuild task?
@@RahulNath That works. Ive used azure build before briefly, but not with yaml. I have a solution with 3 projects. 1 web app 1 windows service 3 shared class libraries. The question I was asking about paths, are the various $build paths, which I suppose are predefined variables, correct? Im trying to make sense of the docs Basically, I need to publish my windows service and web app, which both use the same shared libraries. Have the on-prem agent already setup for the deployment group. Questions: When I run a build with that yaml file, how are multiple projects handled? Each have their own /bin /obj folders So this part of the VSBuild@1 task: msbuildArgs: '/p:OutputPath="$(Build.BinariesDirectory)\$(Build.BuildId)"' Im not sure I understand why this was required. If this wasn't included, where would the next task (ArchiveFiles@2) use as its starting path? Thanks
@@RahulNath Also, when the build runs, I have a zip file in the drop folder and opening it, I see a folder "_PublishedWebsites" and then all the files for my service, but seems like there are many more than just the service files. Seems like I would want two sub folders under the drop location? One each for the web app and one for the windows service?
I have specified the OutputPath so that by default the msbuild artifacts are placed into that directory. In that example I have used the build task on the solution file. You can also specify project files to that as the parameter. So in your case if you want to create multiple deployable packages with the same build, you can use that task or the msbuild task on each of the projects (web app and windows service) and specify appropriate Output paths (e.g '$(Build.BinariesDirectory)\$(Build.BuildId)\WebApp"). So you will have two such tasks to do it. Alternatively, you can also build the solution once and copy over the appropriate binary directories into respective folders like above, using the copy task. Let know if that helps.
Here is the source code and pipeline details. Source Code - rahulpnath.visualstudio.com/RUclips%20Samples/_git/WindowsService) Build Pipeline - rahulpnath.visualstudio.com/RUclips%20Samples/_build?definitionId=14&_a=summary Release Pipeline - rahulpnath.visualstudio.com/RUclips%20Samples/_release?_a=releases&view=mine&definitionId=3 If you are new to DevOps and looking to push code into the repository, check out my Introduction to Azure DevOps video here ruclips.net/video/prqW7DVVxLM/видео.html Let know if you have any additional questions.
What are the multiple config files? More context please - When packaging you can remove the unnecessary files using a custom script or Delete File Task
@Rahul Nath i have created a ASP.NET pipeline build (CI) and also created a continuous delivery release pipeline (CD) "IIS Web App deploy" and it works without any error. but the CI pipeline build (Artifacts zip )is created along with the appsettings, connectionstrings and web.config files and i do not want these source config files overwrite in the destination folder of the IIS website during the continuous deployment I would like know is there any task to exclude these config files and any folder in the CI pipeline itself or in the CD pipeline "IIS Web App deploy"deployment" task. can you help me out
yes you can run the agent on any VM and get to work with DevOps. I used Azure VM since that was easy to provision. Let know if you have additional questions.
@@RahulNath I am not deploying to a VM. I am deploying to a non-azure FTP site. I can publish the files and copy them manually but I want the pipeline to do that as I want to integrate some Unit testing as well. Is that possible ?
You could use the FTP Task - docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/ftp-upload?view=azure-devops&WT.mc_id=AZ-MVP-5003875 Let know if you have additional questions.
@@RahulNath Well, I'm still digging, like wading through treacle. I've got the ftp task working, my problem now is to get the pipeline to build and publish and then get the ftp task to use the content of the publish directory.
It should be very similar to the pipeline set up in this video. In the release pipeline you will need to use the FTP task. What kind of application are you trying to deploy? I have a variety of cases covered in the DevOps playlist ruclips.net/p/PL59L9XrzUa-m7AFDgjWuwm6exyCklc03U Let know if you need any additional help
Did you get a chance to check the source code? rahulpnath.visualstudio.com/RUclips%20Samples/_git/WindowsService Also, checkout TopShelf which is a great way to create windows service - You can run it as a console app while developing and deploy it as a windows service -topshelf-project.com/ Let know if that helps or if you have any specific questions.
Hey Rahul, Nice video.. but i keep getting this error on archive files "[error]Error: ENOENT: no such file or directory, stat 'D:\a\1\b\2235' ". Any idea ?
Thank you and happy you liked it. It looks like you have got a wrong path in there. Can you confirm if you have used the correct path? Double check with the one in the video or the pipeline that I have shared. Let know if that helps
@@RahulNath I checked it and i am pasting below as well. The issue seems to be the build not building/creating the folder with Build.BuildId and when Archive tries it - it throws an error No directory exists. Also, This is a topshelf proj which i am trying to install as a windows service, but the sln has other projs (Api, Business, models etc ). how can we change to build the sln but only copy/Archive the contents of services.csproj\bin\Release . task: VSBuild@1 inputs: solution: '$(solution)' msbuildArgs: '/p:OutputPath="$(Build.BinariesDirectory)\$(Build.BuildId)\\" /t:restore' platform: '$(buildPlatform)' configuration: '$(buildConfiguration)' - task: ArchiveFiles@2 inputs: rootFolderOrFile: '$(Build.BinariesDirectory)\$(Build.BuildId)' includeRootFolder: false archiveType: 'zip' archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip' replaceExistingArchive: true - task: PublishBuildArtifacts@1 inputs: PathtoPublish: '$(Build.ArtifactStagingDirectory)' ArtifactName: 'drop' publishLocation: 'Container'
Why is there an extra slash in msbuildArgs ($(Build.BuildId)\\). Don't think that will be a problem though. Did you check the full log files to see where the msbuild is outputting the build items? Like the link here in my pipeline. rahulpnath.visualstudio.com/RUclips%20Samples/_build/results?buildId=162&view=logs&j=12f1170f-54f2-53f3-20dd-22fc7dff55f9&t=86dd5fa6-f51e-57a1-6dd4-575fd75fc7ef&l=25 If you can set up a public build I can take a look.
@@RahulNath Thanks for your help it seems i missed build from msbuild args- msbuildArgs: like this =='/p:OutputPath="$(Build.BinariesDirectory)\$(Build.BuildId)\\" /t:restore,build' --You doing great job inspiring Dev's
##[error]Error: Failed cp: cp: copyFileSync: could not write to dest file (code=EACCES):/var/www/angular/Jenkinsfile ---------------> when I was trying to copy to the linux vm in the deployment group
@@RahulNath But how to give the existing user to perform these tasks as a root user without changing the permissions prior copying the files to that particular folder? Any suggessions??
@@RahulNath Haha it took me half a day to realize that I need to resolve the issue by changing the user access of the folder. Sadly there aren't much solutions available when I browsed from the error perspective...
The plural sight has 2 courses to cover the same thing, he did it for free in one video without the fuss 🥺, they are having a lot of theory explained first nowadays with less practical videos like this
Check out the Source code and the build release pipeline links here
Source Code - rahulpnath.visualstudio.com/RUclips%20Samples/_git/WindowsService)
Build Pipeline - rahulpnath.visualstudio.com/RUclips%20Samples/_build?definitionId=14&_a=summary
Release Pipeline - rahulpnath.visualstudio.com/RUclips%20Samples/_release?_a=releases&view=mine&definitionId=3
Thanks for watching - Don't forget to like and subscribe!
You deserve a lot more credit and a lot more views!!! Your videos are very clear and informative. I've been through many documentation, none as clear as your videos. Please keep up the great job!!
Thanks for watching and the nice comment! Glad you like it!
Do let know in case there are any specific videos you are looking for!
Very well done! You covered more material in 13 minutes than many would do in an hour. Very clear cut and to the point. Bravo!
Very happy to hear that and Glad it was helpful Eric!
I was missing the Archive Files step, which had me looking for answers for days! Thank you for this simple yet explanatory video.
Great to hear!
You saved my day! I have to configure a build pipeline for the first time in Azure DevOps. Before I'm using on premise TFS. So there I used the "Windows Machine File Copy" specifying a FQDN with credentials in our network. In Azure DevOp this won't run anymore. So I installed deployment agents. But here the same as before, it will not work. My mistake was to think to complicated. With the deployment agents it is easy as it can be, simply specify directories as if we are working on the local maschine (and not \\servername\share\...).
With your fantastic Heartbeat-Video I now understand what to do (and I searched and tried a lot before). And an additional benefit, I've never heard from Topshelf before. This tool makes it very easy to install my artifacts as services. Awesome and very helpful. Congratulations, you made a good job.
Thank you Klaus for the comment. Made my day!
Do check out the other videos in the series if you run into issues with Azure DevOps pipelines - ruclips.net/p/PL59L9XrzUa-m7AFDgjWuwm6exyCklc03U
Finally someone created simple and very important video! Well done!
Thank you and glad you found it useful!
I'm new to azure devops, this tutorial is the only one I found which is amazingly helpful of deploying a worker service project! Already subscribed!
Great to hear! Thank you Ed.
AMAZNIG VIDEO!!! One of the best, most helpful and to the point on RUclips!!
Glad you think so Chris!
Great video, good job. Yours is a very underrated channel.
Thank you Mobeen. Happy you like it!
This is very useful short and simple... Thanks!!
Happy that it helped Amrit. Do check out my other videos in this series which covers different deployment scenarios. ruclips.net/p/PL59L9XrzUa-m7AFDgjWuwm6exyCklc03U
Very helpful, gave me exactly what I was missing
Happy to hear that!
Really awesome. Rahul I have a question, why is it needed to use deployment group instead of normal agent? The normal agent even have the option to connect to a virtual machine
This was more of an example to show how to use deployment groups - yes if all you need tis to use the normal agent you could do that too. Hope that helps
Hey Rahul, Your videos really good, I appreciate your effort
Thank you so much Srinivasulu for letting me know 😀
Thanks Rahul, for sharing such precise and valuable informative video; really helped a lot for day-to-day DevOps implementation/troubleshooting. Cheers!
Glad to hear that Nishank!
Thanks Rahul this was a great help!!
Awesome. 😀
Rahul i like your approach however why not build a pipeline then choose a windows template ?
Thank you, Kieran. Sure do use it if it does the job. Intend was more to break it down into pieces and show from scratch how to build up one. Helps understanding I believe.
Rahul you are awesome guy to explain in very details.
Thank you 😀
Nice demo 👌🏻
Glad you liked it
Thanks Rahul for this video
Thank you Mandeep !
hello Rahul, If we deploy an Infra example an App Service Plan in the Release pipeline before deploying the code. My question is every time a new version of the code gets pushed will the infra also gets re-created everytime. How does that work out in real life examples. thank you
Hi Chaisen, When using infrastructure as code, mostly I tend to stick with the flow where the infrastructure is deployed if it does not already exists. So if it's already created then it skips that resource. I cover some of this in my ARM template video here ruclips.net/video/3IRwtbGlshk/видео.html
Let know if that answers your question.
Very clear info. thanks a lot
You are welcome Ramesh!
Video is really good, straight forward and very easy to understand. Great Job!!!
Thank you and happy it helped 😀
Thanks for sharing this Rahul , I am doing something similar and everything works except variable substitution.
I am trying to override serilog path of appsettings.json but its not working.
In the initialize job I could see
[SERILOG_WRITETO_ARGS_PATH] --> [F:\\Services\\Logs\\ICEFTPWorkerService.txt]
In File Transform
I could see
2020-12-07T03:29:29.1095014Z Applying JSON variable substitution for E:\Apps\ICEFTPWorker\appsettings.json
but its not getting applied to actual file , any thoughts?
Hard to tell without actually seeing it in action. Couple of things to check
- Is the variable replacement happening at the right step. Is it the transformed file that is getting deployed
- Is the name matching correctly and the scopes for variable specified correctly.
Hi Rahul, could you please help me blue green deployment with same virtual machine
Thanks, this was very helpful!
Glad it was helpful Attila!
really helpful, two thumbs up from me! :D
Glad to hear! Thank you
Could you please help me to understand how to do a patching automation with azure devops ? For instance, I have a windows / webapplication already hosted in a machine. Now I just need some selected files in the publishing artifact. Is that possible ?
I haven't done this myself Ajish, so unfortunately can't help. These days most of the apps I build are PAAS where the cloud provider manages all this. (Web Apps, Functions etc)
You are doing great Job
Glad you are liking the videos!
Hi Rahul ,your video was so gud ! Can i use the same approach to Deploy the windows service in the Onprem applicaton server ? In that case Is it mandatory to create the Deployement Group ? That is the usecase for Deployment group here
The demo deploys it on my development laptop, so you should be able to do it onprem machine. What issues are you facing?
@@RahulNath issue now got resolved , Thanks
@@mekarthikktk75 Great to hear that!
Simply wonderful!
Many thanks Khorshed!
Nice Explanation, Thanks :)
You're welcome! Arun
That IF NOT EXIST script is giving error in my deployment target...
Thank you good videos for devops learners. Can you Please guide me.....how to copy the Build artifacts from Private Agent (custom agent) to target another windows server ? Thank you
Thank you and happy that you are finding the videos useful.
Are you looking to move the artifacts from on server to another? Does using the FTP Task work for you? docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/ftp-upload?view=azure-devops
@@RahulNath Thank you for your response.. Rahul
here am using the azure default agents when triggering the code build and my artifacts are copying with in azure pipeline location (D:/a/1/a), how can i route the artifacts to another target windows server. Thank you.
@@subbareddykola1643 The FTP task should still here I guess to copy the artifacts over to a remote server. Did you give that a try? Are you facing any issues?
Can we automate azcopy using windows service?
You should be able to run it on a schedule yes.
@@RahulNath Thanks, can you suggest me any forum or knowledge base link for this?
@@prasiddhi15 lots of different ways to run scheduler - if you want to run on .net check out scheduler libraries like Quartz
Sounds like good information. Unfortunately, I couldn't see some of the things you clicked on due to the video of you in the lower right hand screen covering part of the web site.
Sorry about that Collier - Let know if you have any specific questions and happy to answer. I have fixed this problem in my newer videos. Thank you for the feedback
@@RahulNath Do you have a video like this for .net 5 apps?
@@colliermallory418 Nothing yet. Are you facing any particular issues with it? I believe high level it should still be the same?
Awesome...This is really helpful
Glad to hear that Balaji!
TQ
Welcome
Wonderfull Explaination !!! :)
Thank you! 😃
thank you so much
You're welcome Steve!
@rahul Nath thanks for the useful video, does it also work for VMs without public IP?
It should - in this example I installed it in my development laptop. Are you facing any issues?
@@RahulNath yes, I thought so too.. some network connectivity issues at the moment, yet to test out.. will keep you posted.. thanks..
@@MaheshVelusamy Great let me know how it goes Mahesh!
Hey @@RahulNath tested it on VMs with only private IPs and it worked straightaway, just to had to have the ssh ports opened in the VMs, thats about it.. cheers!
@@MaheshVelusamy Great to hear that Mahesh!
Hello brother, do you have anything related to implementing CI/CD using Azure devops.
Yes a full series - ruclips.net/p/PL59L9XrzUa-m7AFDgjWuwm6exyCklc03U
What are you particularly after ?
@@RahulNath I wanted to build my C# code (Currently we are using CI/CD jenkins job). but here i wanted to use Azure devops. and finally i wanted to move my code to the VMs like (DEV, QA and Prod) environments.
@@balajid5461 depending on type of app and how’s its deployed the pipeline changes . I have a lot of common scenarios in the series. Most of them are .NET apps (web,exe etc)
@@RahulNath yeah, mine also .NET application.
@Rahul Nath, Is this (ruclips.net/p/PL59L9XrzUa-m7AFDgjWuwm6exyCklc03U) to follow reach my target?
Hey i need some help after running the power shell script it got stuck not moving forward for azure pipeline image
Very hard to assist without more details Hussain. What is it stuck on, what is the error?
Hey thanks for replying to me now issue has been fixed after restarting the system
@@shaikhussain_ece Awesome glad it sorted out itself!
Where can I see the yaml file and how did you know to use those paths in the vsbuild task?
Here is the build pipeline that I used for this video - rahulpnath.visualstudio.com/RUclips%20Samples/_build?definitionId=14&_a=summary
(It is there as a pinned comment on this video as well)
Which paths are you referring to in the vsbuild task?
@@RahulNath That works. Ive used azure build before briefly, but not with yaml.
I have a solution with 3 projects.
1 web app
1 windows service
3 shared class libraries.
The question I was asking about paths, are the various $build paths, which I suppose are predefined variables, correct?
Im trying to make sense of the docs
Basically, I need to publish my windows service and web app, which both use the same shared libraries.
Have the on-prem agent already setup for the deployment group.
Questions:
When I run a build with that yaml file, how are multiple projects handled? Each have their own /bin /obj folders
So this part of the VSBuild@1 task:
msbuildArgs: '/p:OutputPath="$(Build.BinariesDirectory)\$(Build.BuildId)"'
Im not sure I understand why this was required. If this wasn't included, where would the next task (ArchiveFiles@2) use as its starting path? Thanks
@@RahulNath Also, when the build runs, I have a zip file in the drop folder and opening it, I see a folder "_PublishedWebsites" and then all the files for my service, but seems like there are many more than just the service files. Seems like I would want two sub folders under the drop location? One each for the web app and one for the windows service?
I have specified the OutputPath so that by default the msbuild artifacts are placed into that directory. In that example I have used the build task on the solution file. You can also specify project files to that as the parameter. So in your case if you want to create multiple deployable packages with the same build, you can use that task or the msbuild task on each of the projects (web app and windows service) and specify appropriate Output paths (e.g '$(Build.BinariesDirectory)\$(Build.BuildId)\WebApp"). So you will have two such tasks to do it. Alternatively, you can also build the solution once and copy over the appropriate binary directories into respective folders like above, using the copy task.
Let know if that helps.
I am getting error after I paste the script in PowerShell inside VM. Please help me.
Hard to tell without seeing the error.
Thank you
You're welcome 🙂
@@RahulNath can you plz make a video on web application deploy pipeline . I did try. But getting some issues.can you please help me.
@@parinitajha9416 I already have in my devops series ruclips.net/p/PL59L9XrzUa-m7AFDgjWuwm6exyCklc03U
@@parinitajha9416 here is one for SPA ruclips.net/video/SYhufaLn51w/видео.html. There are a few others including the YAML release pipeline
How can we push the windows service code into the DevOps repository, Can you share the link
Here is the source code and pipeline details.
Source Code - rahulpnath.visualstudio.com/RUclips%20Samples/_git/WindowsService)
Build Pipeline - rahulpnath.visualstudio.com/RUclips%20Samples/_build?definitionId=14&_a=summary
Release Pipeline - rahulpnath.visualstudio.com/RUclips%20Samples/_release?_a=releases&view=mine&definitionId=3
If you are new to DevOps and looking to push code into the repository, check out my Introduction to Azure DevOps video here ruclips.net/video/prqW7DVVxLM/видео.html
Let know if you have any additional questions.
@@RahulNath Thanks Rahul
Hi Rahul, how to exclude multiple config files in IIS Web app deploy release?
What are the multiple config files? More context please - When packaging you can remove the unnecessary files using a custom script or Delete File Task
@@RahulNath web.config, connectionStrings.config and appsettings.config files, Can you please explain me how to do that?
Venkatesan Elumalai Please provide more details, what you are trying to achieve and what the exact problem you are facing.
@Rahul Nath i have created a ASP.NET pipeline build (CI) and also created a continuous delivery release pipeline (CD) "IIS Web App deploy" and it works without any error.
but the CI pipeline build (Artifacts zip )is created along with the appsettings, connectionstrings and web.config files and i do not want these source config files overwrite in the destination folder of the IIS website during the continuous deployment
I would like know is there any task to exclude these config files and any folder in the CI pipeline itself or in the CD pipeline "IIS Web App deploy"deployment" task. can you help me out
i am new to Azure devops
Nice one, but how to I deploy to a non-azure ftp site? is this even possible?
yes you can run the agent on any VM and get to work with DevOps. I used Azure VM since that was easy to provision. Let know if you have additional questions.
@@RahulNath I am not deploying to a VM. I am deploying to a non-azure FTP site. I can publish the files and copy them manually but I want the pipeline to do that as I want to integrate some Unit testing as well. Is that possible ?
You could use the FTP Task - docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/ftp-upload?view=azure-devops&WT.mc_id=AZ-MVP-5003875
Let know if you have additional questions.
@@RahulNath Well, I'm still digging, like wading through treacle. I've got the ftp task working, my problem now is to get the pipeline to build and publish and then get the ftp task to use the content of the publish directory.
It should be very similar to the pipeline set up in this video. In the release pipeline you will need to use the FTP task. What kind of application are you trying to deploy? I have a variety of cases covered in the DevOps playlist ruclips.net/p/PL59L9XrzUa-m7AFDgjWuwm6exyCklc03U
Let know if you need any additional help
How to create a windows service and assign a task to it
Did you get a chance to check the source code? rahulpnath.visualstudio.com/RUclips%20Samples/_git/WindowsService
Also, checkout TopShelf which is a great way to create windows service - You can run it as a console app while developing and deploy it as a windows service -topshelf-project.com/
Let know if that helps or if you have any specific questions.
Yessssssssss!!!
Hope it was helpful 😀
Hey Rahul, Nice video.. but i keep getting this error on archive files "[error]Error: ENOENT: no such file or directory, stat 'D:\a\1\b\2235'
". Any idea ?
Thank you and happy you liked it. It looks like you have got a wrong path in there. Can you confirm if you have used the correct path? Double check with the one in the video or the pipeline that I have shared. Let know if that helps
@@RahulNath I checked it and i am pasting below as well. The issue seems to be the build not building/creating the folder with Build.BuildId and when Archive tries it - it throws an error No directory exists. Also, This is a topshelf proj which i am trying to install as a windows service, but the sln has other projs (Api, Business, models etc ). how can we change to build the sln but only copy/Archive the contents of services.csproj\bin\Release .
task: VSBuild@1
inputs:
solution: '$(solution)'
msbuildArgs: '/p:OutputPath="$(Build.BinariesDirectory)\$(Build.BuildId)\\" /t:restore'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: '$(Build.BinariesDirectory)\$(Build.BuildId)'
includeRootFolder: false
archiveType: 'zip'
archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip'
replaceExistingArchive: true
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop'
publishLocation: 'Container'
Why is there an extra slash in msbuildArgs ($(Build.BuildId)\\). Don't think that will be a problem though.
Did you check the full log files to see where the msbuild is outputting the build items? Like the link here in my pipeline.
rahulpnath.visualstudio.com/RUclips%20Samples/_build/results?buildId=162&view=logs&j=12f1170f-54f2-53f3-20dd-22fc7dff55f9&t=86dd5fa6-f51e-57a1-6dd4-575fd75fc7ef&l=25
If you can set up a public build I can take a look.
@@RahulNath Thanks for your help it seems i missed build from msbuild args- msbuildArgs: like this =='/p:OutputPath="$(Build.BinariesDirectory)\$(Build.BuildId)\\" /t:restore,build' --You doing great job inspiring Dev's
@@padmavathitummala8690 Awesome - Glad you were able to sort it out!
##[error]Error: Failed cp: cp: copyFileSync: could not write to dest file (code=EACCES):/var/www/angular/Jenkinsfile ---------------> when I was trying to copy to the linux vm in the deployment group
Not sure . Have you checked if you have appropriate permissions etc to write the file.
@@RahulNath Yeah the folder that I tried to access is of root permissions and I changed them to the user permissions. Then everything worked well....
@@kalyankalapala8940 Glad you sorted it out.
@@RahulNath But how to give the existing user to perform these tasks as a root user without changing the permissions prior copying the files to that particular folder? Any suggessions??
@@RahulNath Haha it took me half a day to realize that I need to resolve the issue by changing the user access of the folder. Sadly there aren't much solutions available when I browsed from the error perspective...
The plural sight has 2 courses to cover the same thing, he did it for free in one video without the fuss 🥺, they are having a lot of theory explained first nowadays with less practical videos like this
Thank you Prem, glad it helped.