Introduction
Here, we will learn the basics of executing a YML file as we commit code.
For the basics, we are executing/building our Dotnet Core application using a YML file in the GitLab console Environment.
Similarly, we can create a docker image, deploy the application, all themes that we will cover in another post.
For now, we will look at how to configure a GITLAB CI/CD pipeline. The steps are as follows:
- Create an Account in GitLab.
- Create an Empty Application in GitLab with a readme.md file.
- Clone this Repository using https in Visual studio (Editor of your choice) with credentials.
- Create a web application.
- Create .gitlab-ci.yml file for this project.
- Push/Commit/Check-in Everything.
- CI/CD pipeline will automatically Executes(due to existing Shared runner in use)
You can also create custom Runner for project-specific usage. For more, read here: ( https://docs.gitlab.com/runner/ )
This article is mainly for tech guys who are absolute beginners at running GITLAB CI/CD pipeline.
You can get full documentation here: https://docs.gitlab.com/ee/ci/introduction/
Create Account in GitLab
Step 1
Sign up here: https://gitlab.com/users/sign_up

Step 2
After signing in, you can create New Project, as shown below;
2.a. 

2.b.

2.c. After you create an empty project, it will finally look like this:
Step 3 - Clone this Repository
3.a Copy the Https Git Url

3.b Connect in Visual Studio like this; Enter GITURL and location of your local folder.
Step 4
Create any Web application here.
Step 5
Create a YML file which should be in the parent folder of your project:
The Folder Structure for your YML file should look like this:

At Git : 

Step 6 - Push the Code
Step 7 - Check For Pipeline, it can be done like this
7.a. Click > CI/CD > Pipeline

7.b. Run the pipeline here.

You can also check what is running inside the pipeline. It is basically the same as we have written in a YML file.
Click here : 

The execution result in the GIT console will look like this:

** For customization or the rest of the runner, you can visit here....


ِAtaa actPosted Jun 4, 2021, 3:19 PM
That it? Seriously? That's all of it? Aren't you gonna explain what CI/CD is? What's in the yml file? What are the stages and jobs? What the result means? not anything?? What kind of half-assed tutorial is this?
Jeremie FournierPosted Jul 22, 2020, 9:06 AM
Hi. First of all, thanks for your tutorial. It's pretty clear! I still have a question. I tried to apply this in my project, but it appears that my build failed because of "dotnet: command not found" while it trying to execute "dotnet restore" command. I have the same issue if I'm going on "dotnet build" command. Please do you have a solution or an idea to help me fix this problem? Regards.