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

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

Round The Code

1 год назад

39,816 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@PraveenKumar-hv9qu
@PraveenKumar-hv9qu - 04.01.2024 15:31

Is this works on .net framework project

Ответить
@deva_2022
@deva_2022 - 13.11.2023 05:11

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

Ответить
@balajisairamnarasimhan
@balajisairamnarasimhan - 08.11.2023 01:35

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 ?

Ответить
@Andy-si1pl
@Andy-si1pl - 21.10.2023 12:30

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.

Ответить
@CUERVO1207
@CUERVO1207 - 01.10.2023 06:52

thank you very much man!

Ответить
@sidisidahmed755
@sidisidahmed755 - 29.09.2023 08:08

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

Ответить
@jimcopeland4011
@jimcopeland4011 - 15.09.2023 19:31

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

Ответить
@adewaleadisa4346
@adewaleadisa4346 - 12.09.2023 23:59

Thanks very much. Very helpful and straight to the point

Ответить
@JohnScript
@JohnScript - 30.08.2023 04:45

So much thanks for the workflow, but unfortunately it doesn't work for me. Hey everyone, I encountered an issue with the publish task. No matter what I did, the task always showed me 'Dotnet command failed with a non-zero exit code on the following projects,' even when I provided the absolute path of the project. I've tried various approaches, but nothing seemed to work. It's possible that this problem arises because I'm using a custom pool, but I'm not certain. As a solution, I created a similar task using a PowerShell task. Here it is

- task: PowerShell@2
name: 'ProjectPublish'
displayName: 'Project Publish With PowerShell'
inputs:
targetType: 'inline'
script: |
$projectPath = Get-ChildItem -Recurse -Filter "the_name_of_your_project.csproj" | Select-Object -First 1 -ExpandProperty FullName
$outputPath = "$(Build.ArtifactStagingDirectory)"
dotnet publish $projectPath --configuration $(buildConfiguration) --output $outputPath --no-build


Basically, first I search for the project's path, so replace 'the_name_of_your_project.csproj' with the name of your project's .csproj file. Then, I set the variable for the output folder and finally perform the publish using the dotnet CLI. Remember that this script is executed in the folder of your default working directory, so there's no need to search for your Default Working Directory; you're already working there. So, I hope this helps you. Praise the sun! 🌞🌞

Ответить
@DevOpsCave
@DevOpsCave - 27.08.2023 20:36

You have a new subscriber! Thank you for your video

Ответить
@uaena182
@uaena182 - 28.04.2023 19:53

nice..thanks

Ответить
@austinwhite9225
@austinwhite9225 - 12.04.2023 23:48

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

Ответить
@caseyspaulding
@caseyspaulding - 02.01.2023 15:23

Thanks this is great

Ответить
@beingrandom4171
@beingrandom4171 - 28.12.2022 09:29

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

Ответить
@LuifaGodoy
@LuifaGodoy - 25.12.2022 20:23

So easy explained, thank you!

Ответить
@satori8626
@satori8626 - 02.12.2022 14:57

Excellent thank you

Ответить
@kubritish
@kubritish - 02.12.2022 14:50

Were you not supposed to add the build task aswell ?

Ответить
@godwinyoh3700
@godwinyoh3700 - 13.11.2022 02:03

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

Ответить
@toniCbenn56
@toniCbenn56 - 28.07.2022 19:46

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?

Ответить
@user-qz6ix7od3b
@user-qz6ix7od3b - 11.07.2022 14:09

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

Ответить
@wmf1235
@wmf1235 - 15.06.2022 04:22

cool vids thank you

Ответить