/sdlc

Automated SDLC with Jenkins

Primary LanguageGroovyMIT LicenseMIT

Chumbok SDLC

This repo describes how to create Jenkins job automatically using Groovy DSL.

Prerequisites

  1. Install Docker and Docker Compose.

  2. Apache Maven

How to run

# How to build Jenkins Docker Image
docker-compose -f local-cicd-setup-docker-compose.yml build
# How to build Jenkins Docker Image and run
docker-compose -f local-cicd-setup-docker-compose.yml up --build
# Or just run docker compose
docker-compose -f local-cicd-setup-docker-compose.yml up

What JobBuilder Job does

  • Running this job will trigger JobBuilder.groovy.

  • JobBuilder.groovy scans project descriptor YAML file.

  • JobBuilder.groovy create pipelineJob that points to Jenkinsfile in git repository.

  • JobBuilder.groovy create multibranchPipelineJob for CI for provided git repository.

  • Once success, you should able to see jobs in Jenkins.

What AutoJobBuilder Job does

  • Running this job will trigger AutoJobBuilder.groovy.

  • AutoJobBuilder.groovy scans Github user or org using API.

  • AutoJobBuilder.groovy create pipelineJob that points to Jenkinsfile in git repository.

  • AutoJobBuilder.groovy create multibranchPipelineJob for CI for provided git repository.

  • Once success, you should able to see jobs in Jenkins.

How to use JobBuilder and AutoJobBuilder Job

Just hit the build button.