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)
This article is mainly for tech guys who are absolute beginners at running GITLAB CI/CD pipeline.
Create Account in GitLab
Step 1
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:
I will attach this YML file below for reference.(.gitlab-ci.zip)
The Folder Structure for your YML file should look like this:
At Local :
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....