Загрузка...

GitLab CI/CD Tutorial for Beginners (2026) – GitLab Runner + Container Registry

GITLAB:

HI Today we are going to see GITLAB with springboot application going to deploy in
ECS with registry ECR.
Pl check the below things to continue:

Git is a distributed version control system,
while GitLab is a DevOps platform that hosts Git repositories and provides CI/CD,
collaboration, and deployment features.

GitLab is preferred because it provides
Git + CI/CD + Security + Deployment in ONE platform,
reducing complexity, cost, and maintenance.

All-in-One DevOps Platform
GitLab = Git + Jenkins + Sonar + Nexus + Vault (basic)
GitLab provides:
Role-based access control (RBAC)
Protected branches
Mandatory merge approvals
Full audit logs
Built-in security scans
👉 Jenkins alone cannot do this cleanly.

Prerequisites:
Java (JDK 17/21), Maven, IDE (STS / IntelliJ / VS Code), Git (command line or IDE plugin)
👉 Git is required locally
👉 GitLab is NOT required locally

Let we start.

create spring boot application using sts

Login Gitlab

Create or import project, I created it.

Do simple CICD with in ternal docker of gitlab and later we will add ecr and ecs into this.

gitlab-ci.yml and Dockerfile -- not down its created

Create PAT- Personal Access Token
username:your username
PAT- Personal Access Token
[cloned that project]

GitLab Repo
→ GitLab CI builds Docker image
→ Image stored in GitLab Container Registry
→ You pull image locally
→ Run container
→ Access localhost:8080
First we will try to run in local gitlab registry and access localhost:8080 from there

GitLab → Your Project → Packages & Registries → Container Registry

Open Project folder
cd prabhakaransaai-project
git init
git branch -M main
git add .
git commit -m "Initial commit with Docker and CI"
git remote add origin https://gitlab.com/prabhakaransaai/prabhakaransaai-project.git

git push -u origin main

Goto Build-Pipelines -- Verify your account

Dummy commit and pipeline automatically starts with the help of gitlb-ci.yml

Pipeline success and passed - means deploy job within internal gitlab

needs to build docker image and deploy it in container registry then
we can check http://localhost:8080/

I changed and added docker build and push command in yml

We ran our application in the gitlab registry but its like docker hub
only we can store the images and run internally.

In order to access our application outside needcs to deploy to ecs/eks.
So we need to add deploy YML changes to ECS, Already ECS created so I am using the
one. Add all secrets for that.

Goto project gitlab -- settings- CICD - variables

AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_DEFAULT_REGION -- ap-south-2
Access Key ID: AKIA**********
Secret Access Key: *****************
ECS_CLUSTER -- springbootdemocluster
ECS_SERVICE -- springbootdemotaskdef-service-w4j6f88j
TASK_FAMILY -- springbootdemotaskdef
CONTAINER_NAME -- springbootdemo
CONTAINER_PORT -- 8080
IAM:
ecs:RegisterTaskDefinition
ecs:UpdateService
ecs:DescribeServices
ecs:DescribeTaskDefinition
iam:PassRole
elasticloadbalancing:DescribeTargetGroups
YML: Changes
Pipeline is running let we check....
Checklist:ECS
ECS → Clusters → springbootdemocluster → Tasks

Cluster name- gitlab-demo-cluster
Task definition family - gitlab-demo-task

Container name - gitlab-springboot-app
load balancer: gitlab-lb-new
Target group name - gitlab-target-group
service - gitlab-demo-service

In this video stop upto the internal pipelines with gitlab
in the next video we will see the ecs deployment with alb

Thanks for watching....

Видео GitLab CI/CD Tutorial for Beginners (2026) – GitLab Runner + Container Registry канала Global Tamil Mirror
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять