Skip to content

vmtechuser/DevOps-Example

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jenkins → GitHub Actions CI/CD Migration

With Automated Kubernetes Deployment

Migration project: This repo is forked from a Jenkins-based CI/CD example and extended to demonstrate a real-world pipeline modernization — migrating from Jenkins to GitHub Actions with automated deployment to a Kubernetes cluster.


What This Project Demonstrates

This is a hands-on migration of a Spring Boot Java application's CI/CD pipeline from Jenkins to GitHub Actions, with container deployment to Kubernetes. It models the kind of legacy CI/CD modernization work common in enterprise DevOps transformations.

Before (Jenkins): Manual pipeline configuration, Jenkinsfile-driven builds, Jenkins server dependency

After (GitHub Actions): Event-driven workflows, containerized builds, automated deployment to Kubernetes via kubectl


Pipeline Architecture

Developer pushes code to GitHub
          ↓
  GitHub Actions workflow triggers
          ↓
  Maven build + unit tests
          ↓
  Docker image build
          ↓
  Push image to container registry (ECR / Docker Hub)
          ↓
  Deploy to Kubernetes cluster
  (configure-k8s-registry.sh + kubectl apply)
          ↓
  Verify deployment rollout

Key Files

File Purpose
.github/workflows/ GitHub Actions workflows (the migration target)
projects/githubActions/.github/workflows/ Standalone GitHub Actions examples
Jenkinsfile Original Jenkins pipeline (kept for reference/comparison)
Dockerfile Container image definition for the Spring Boot app
devops-k8s-pipeline Kubernetes deployment pipeline configuration
configure-k8s-registry.sh Configures Kubernetes cluster to pull from private registry
configure-containerd-registry.sh Containerd runtime registry configuration
setup-k8s-registry-access.sh Sets up registry credentials as K8s secrets
buildspec.yml AWS CodeBuild spec (multi-cloud reference)
azure-pipelines.yml Azure Pipelines equivalent (multi-cloud reference)

Migration Highlights

What changed moving from Jenkins to GitHub Actions

Trigger model

  • Jenkins: Polling or webhook, requires server uptime
  • GitHub Actions: Native event-driven (on: push, on: pull_request), no server required

Secrets management

  • Jenkins: Credentials plugin, server-side secrets
  • GitHub Actions: Repository/org-level secrets injected at runtime via ${{ secrets.NAME }}

Kubernetes deployment

  • Configured containerd runtime to authenticate against private registry
  • Created Kubernetes image pull secrets for registry access
  • Deployment via kubectl apply from within the Actions runner

Multi-cloud portability

  • buildspec.yml — AWS CodeBuild equivalent for ECS/ECR deployments
  • azure-pipelines.yml — Azure DevOps equivalent
  • Demonstrates pipeline logic that is tool-agnostic at its core

Why Jenkins → GitHub Actions?

In enterprise environments, Jenkins has been the dominant CI/CD tool for over a decade. However:

  • Jenkins requires infrastructure to run and maintain (the server itself becomes a reliability dependency)
  • GitHub Actions removes that overhead for teams already using GitHub as their SCM
  • Actions workflows live in the repo — versioned, reviewable, portable

This migration pattern is increasingly common in DevOps modernization programs.


Running Locally

Prerequisites

  • Java 11+
  • Maven
  • Docker
  • kubectl configured to a cluster

Build the application

mvn clean install

Build and run the container

docker build -t devops-example .
docker run -p 8080:8080 devops-example

Configure Kubernetes registry access

./setup-k8s-registry-access.sh
./configure-k8s-registry.sh

Related Work

  • AWS EKS Lab (in progress): Greenfield EKS cluster build using Terraform, with GitHub Actions deployment pipeline — see aws-eks-devsecops-lab

Tech Stack

GitHub Actions Jenkins Docker Kubernetes Spring Boot Maven AWS ECR AWS ECS Azure Pipelines Shell scripting Groovy

About

This is a sample Spring Boot Application, used to explain the Jenkins pipeline, in creating a full CI/CD flow using docker too.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Shell 60.7%
  • Groovy 38.0%
  • Other 1.3%