Azure DevOps pipeline: Create a .NET build pipeline (CI/CD YAML tutorial)

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 ม.ค. 2025

ความคิดเห็น • 62

  • @Andy-si1pl
    @Andy-si1pl ปีที่แล้ว +3

    Thanks. Many years ago I used Jenkins but I didn't want to install it on my Azure VM so I started writing a PowerShell script on my VM to:
    - connect to my repo
    - pull code
    - move the built files to IIS directory
    Problem is I had to build my projects locally first and include them in source so I started thinking I can install MSBuild and Node on my VM and use the PowerShell to build my dotnet and Node project.
    Then I remembered Azure DevOps and found this...
    Thanks a lot. This worked first time for me.

  • @austinwhite9225
    @austinwhite9225 ปีที่แล้ว +4

    You are incredibly helpful. My employer and I thank you!!

  • @adewaleadisa4346
    @adewaleadisa4346 ปีที่แล้ว +3

    Thanks very much. Very helpful and straight to the point

  • @balajisairamnarasimhan
    @balajisairamnarasimhan ปีที่แล้ว

    Thanks for the video. I see that you had put the trigger to none. What would be the code for trigger if we have any check in each and every time in our code ? The build pipelines will be created each and every time dynamically and executes it ?

    • @RoundTheCode
      @RoundTheCode  ปีที่แล้ว

      learn.microsoft.com/en-us/azure/devops/pipelines/process/pipeline-triggers?view=azure-devops - This has some info. You can specify which branches to trigger against.

  • @godwinyoh3700
    @godwinyoh3700 2 ปีที่แล้ว +1

    I love your presentation. Thanks for this. New subscriber here

  • @CUERVO1207
    @CUERVO1207 ปีที่แล้ว +2

    thank you very much man!

  • @user779hjg45
    @user779hjg45 ปีที่แล้ว

    You have a new subscriber! Thank you for your video

  • @opaida.mansour
    @opaida.mansour 10 หลายเดือนก่อน

    Thanks a lot
    where i can find the variables values?

    • @RoundTheCode
      @RoundTheCode  10 หลายเดือนก่อน

      They are set in the YAML file under the variables.
      There is also a place to do it in Azure DevOps which is benefical if you are inputting sensitive information that you don't want in your repo.

  • @sivas4861
    @sivas4861 5 หลายเดือนก่อน

    Doubt please , Did we use same YAML file tasks for .NET and .NET Core , Is they are same or different .

    • @RoundTheCode
      @RoundTheCode  5 หลายเดือนก่อน

      You can't use the DotNetCoreCLI@2 for .NET Framework tasks. That's specific to .NET Core. I think you can use VSBuild@1 for .NET Framework tasks.

  • @LuifaGodoy
    @LuifaGodoy 2 ปีที่แล้ว

    So easy explained, thank you!

    • @RoundTheCode
      @RoundTheCode  2 ปีที่แล้ว

      Thanks Luifa. Glad you found it useful.

  • @Poojithadasharadhi
    @Poojithadasharadhi 10 หลายเดือนก่อน

    Hi can you give me the .net sample code repo for practice CI CD
    it would be helpful to me

    • @RoundTheCode
      @RoundTheCode  10 หลายเดือนก่อน

      You can download the code example here:
      www.roundthecode.com/dotnet-code-examples/azure-devops-pipeline-example-dotnet-project-ci-cd

  • @jimcopeland4011
    @jimcopeland4011 ปีที่แล้ว

    Okay so I followed this to the letter. The only thing I changed was the vmImage is ubuntu-latest in my case. I also updated the variables to match my .sln and .csproj files, however I am not seeing any artifacts being created. When it gets to the "Publish build artifacts" step I see an error stating
    ##[warning]Directory '/home/vsts/work/1/a' is empty. Nothing will be added to build artifact 'AzureTestProject'.
    I have been banging my head against a wall trying to get this to work every day all week now. Any tips would be super appreciated. I will buy you a beer right now

    • @RoundTheCode
      @RoundTheCode  ปีที่แล้ว +1

      If you want to share your YAML file, I might be able to help.

  • @WatchThatThere
    @WatchThatThere 2 หลายเดือนก่อน

    Thank you very much for your videos. All of them are very useful. I'd like to confirm if my understanding is correct as I'm very new to this if you don't mind. Most of the time, if we don't need complicated access during the build, we can use Azure Managed agent to build our app. In this case, we only need 1 self-hosted agent here which is for deployment in the app server. Is this correct?

    • @RoundTheCode
      @RoundTheCode  2 หลายเดือนก่อน

      Yes if you can use an Azure managed agent I would use always use that. You can easily install supported .NET SDK's onto them through pipeline tasks. If you are deploying to IIS then you'll need a way of deploying your code and the best way is to use it as the agent.

  • @funLearningAtYourComfort
    @funLearningAtYourComfort 7 หลายเดือนก่อน

    Very helpful. Thank you!

    • @RoundTheCode
      @RoundTheCode  6 หลายเดือนก่อน

      Glad it was helpful!

  • @azarielmochusi702
    @azarielmochusi702 8 หลายเดือนก่อน

    The best video, that's all I can say

    • @RoundTheCode
      @RoundTheCode  7 หลายเดือนก่อน

      Thanks for the comment.

  • @PraveenKumar-hv9qu
    @PraveenKumar-hv9qu ปีที่แล้ว

    Is this works on .net framework project

    • @RoundTheCode
      @RoundTheCode  ปีที่แล้ว

      This demo only works with .NET Core as a number of tasks in the YAML file are specific to .NET Core.

  • @kubritish
    @kubritish 2 ปีที่แล้ว

    Were you not supposed to add the build task aswell ?

    • @RoundTheCode
      @RoundTheCode  2 ปีที่แล้ว +2

      Hi kubritish,
      The publish task builds the app before publishing it, so there is no need to add a separate build task.
      If the build fails, the publish task fails.
      Hope that answers your question.

    • @kubritish
      @kubritish 2 ปีที่แล้ว

      @@RoundTheCode Thank it for clarifying

  • @beingrandom4171
    @beingrandom4171 2 ปีที่แล้ว

    What's the difference between Publish vs Publish Build Artifacts task?

    • @RoundTheCode
      @RoundTheCode  2 ปีที่แล้ว

      Hi Being Random,
      Publish goes ahead and publishes the .NET application.
      Whereas, Publish Build Artifacts publishes the files to an Azure Artifacts file that can be used later on for deployment.

  • @toniCbenn56
    @toniCbenn56 2 ปีที่แล้ว

    Hi there, I've been trying to recreate and run this pipeline but am facing errors. The one error I keep getting is: Dotnet command failed with non-zero exit code on the following projects : D:\a\1\s\RoundTheCode.AzureTestProject.sln. This error pops up in the Test task. I've emulated what you've done and also referred to the updated changes on Github. Are you able to help?

    • @RoundTheCode
      @RoundTheCode  2 ปีที่แล้ว +1

      Yes, the solution filepath is incorrect. It should be this if you are using my example as it is: D:\a\1\s\RoundTheCode.AzureTestProject\RoundTheCode.AzureTestProject.csproj.
      When running the tests, check that inputs:projects is referencing the correct solution path.

    • @MujtabaQuraishi-lv6sb
      @MujtabaQuraishi-lv6sb ปีที่แล้ว

      @@RoundTheCode so how to correct it?

  • @vishnugandham3141
    @vishnugandham3141 6 หลายเดือนก่อน

    God bless you

  • @caseyspaulding
    @caseyspaulding 2 ปีที่แล้ว

    Thanks this is great

  • @hiandhra9971
    @hiandhra9971 8 หลายเดือนก่อน

    Amazing. Can you also do the same for Golang, Python, nodejs applications nobody did those by one TH-camr if you can awaiting and useful content. Thank a lot Sir

    • @RoundTheCode
      @RoundTheCode  8 หลายเดือนก่อน +1

      Glad you like the content. Unfortunately, I know very little about these technologies so it's not something I can do.

    • @hiandhra9971
      @hiandhra9971 8 หลายเดือนก่อน

      @@RoundTheCode can you show us a Yaml pipeline from scratch for building a .net app and delivery of the app Yaml pipeline. And using docker file to build the image and push to acr

  • @TejasPrakash-z4v
    @TejasPrakash-z4v 10 หลายเดือนก่อน

    Thank you😊

    • @RoundTheCode
      @RoundTheCode  10 หลายเดือนก่อน

      You're welcome 😊

  • @satori8626
    @satori8626 2 ปีที่แล้ว

    Excellent thank you

  • @uaena182
    @uaena182 ปีที่แล้ว +1

    nice..thanks

  • @sidisidahmed755
    @sidisidahmed755 ปีที่แล้ว +1

    my problem with pipelines is the stages and tasks , there is no stable rules , everyone reference to projects like they want , put them in variables or references to everything that contains .csproj for example , i will say that the problem is more with configurations standards than understanding what are pipelines used for , i hope some of you will get what i’m saying , btw thank you your courses are incredible

    • @RoundTheCode
      @RoundTheCode  ปีที่แล้ว

      Yes I think you have to set standards about how apps and pipelines are configured as there is often more than one way of doing things.

    • @sidisidahmed755
      @sidisidahmed755 ปีที่แล้ว

      @@RoundTheCode thank you for the hint , as a junior i surely need to be more flexible and try more and more

  • @wmf1235
    @wmf1235 2 ปีที่แล้ว +1

    cool vids thank you

  • @Ris-v4w
    @Ris-v4w 2 ปีที่แล้ว +4

    i feel your face in full screen very intrusive, please stop doing that, but thanks for the rest ! :)

    • @RoundTheCode
      @RoundTheCode  2 ปีที่แล้ว +1

      Thanks for your comment. It has been noted.

  • @deva_2022
    @deva_2022 ปีที่แล้ว

    Hi sir i need your LinkedIn id . I need your help please provide me i will ping you. Just some doubts to clarify

    • @RoundTheCode
      @RoundTheCode  ปีที่แล้ว

      Go to www.roundthecode.com/linkedin which will redirect you to my LinkedIn page.