SDLC CICD and Jenkins-GitLab Integration

SDLC and CICD Architecture

The Continuous Integration Pipeline is the background we wanted to do Jenkins-GitLab Integration. We wanted to achieve a goal that:

  • as soon as dev merges a code to a branch, we can quickly run a pipeline as below to provide him a CI result:
    • pull dev’s latest code
    • build and deploy
    • run test
    • update the GitLab pipeline

Jenkins-GitLab Integration

Architecture

Jenkins-GitLab integration https://docs.gitlab.com/ee/integration/jenkins.html setup:

  • GitLab can trigger Jenkins builds
    • Two ways. 
      • Jenkins CI Integration (recommended) 
  • Webhook
  • Jenkins can update back GitLab pipeline statusHow to setup a Jenkins

Demo

Freestyle – publish build status to GitLab 

Setup a job using post build

Pipeline – updateGitlabCommitStatus

Screenshoot

Pipeline

Setup GitLab connection for the pipeline

Setup GitLab event build triggers for the pipeline

Configure a pipeline using updateGitlabCommitStatus

GitLab pipeline after integration – 1

Tutorial Video