This article provides an overview and learnings about why migration from own hosted CI/CD to SaaS CI/CD, is a way to go!
Software Engineers from Generation X, Millennials generation must have at least once in their life worked with Jenkins (Back in time was Hudson). Java Stack CI/CD evolved around Jenkins. Most of us atleast once used Jenkins. And Artifactory later Nexus perfectly complements each other.
Jenkins is mostly used for CI/CD, and in some cases as a Batch processor. To satisfy this requirement self hosted Jenkins instances running over AWS or self hosted pods on Kubernetes(K8S), mainly in MASTER -> SLAVE (agents) configuration is a correct choice.
Nexus instance can also be self hosted over AWS or with K8S.
Some of many problems with this setup and some solutions to fix some of them.
Jenkinsfile
without much of documentation is kind of hard.Last but not the least, Jenkins will fail when its needed the most. As most of the teams would rely on Jenkins for CI/CD these problems can grow exponentially and the maintenance causing DevOps precious time.
To make everyone's life easier moving to GitHub Actions and GitHub Packages could be a solution!
The advantage of migrating to GitHub Action is to use YAML instead of different way of defining the Job with Jenkins. Those YAML files are maintained under .github
folder under the respective project that gives the ownership of the flows to the Project/Module owner. Below are some sample workflows that can be defined.
Build Develop/Main
- For manually building develop
or main
.Build PR
- When ever a PR is raised for a merge on develop
or main
then this workflow is executed. This is runs whenever there is commit on the branch.Publish
- After successful build of develop
or main
, built jar is pushed to GitHub Packages.Release Manual
- Manually releasing & tagging a fixed version.Auto Deploy API to DEV
- After successful built of develop
or main
, changes are deployed to DEVELOPMENT environment.Deploy API to ENV
- Manual Deployment of fixed version of API to different environments.Migration to GitHub Actions and Packages could save lot of frustration with Jenkins-Nexus combo. This will give you a chance to try out latest tools rather than being with old and outdated technologies. The process is may not be ideal for everyone, but it solves most of the issues with Jenkins.
As I said earlier, Stable CI/CD is not a Myth!