DEVOPS & SOFTWARE TESTING GUIDE
CI/CD for Beginners: Jenkins, GitHub Actions & Docker Explained
CI/CD is one of the most important concepts for modern software development,
DevOps and SDET engineers. In this beginner-friendly guide, you will learn
what CI/CD means, how automated pipelines work, and how
Jenkins, GitHub Actions and Docker fit into the software
delivery process.
Whether you are a beginner, QA engineer, automation tester, SDET or aspiring
DevOps engineer, this guide will help you understand CI/CD with practical
examples.
What Is CI/CD?
CI/CD stands for Continuous Integration and Continuous
Delivery/Continuous Deployment.
It is a software development practice that automates important stages of the
application lifecycle, including building software, running tests, packaging
applications and delivering changes to environments.
Instead of developers and testers manually performing every step after a code
change, CI/CD pipelines can automatically execute predefined steps whenever
new code is pushed or a change is merged.
CI/CD is a way of automatically building, testing and delivering software
whenever developers make changes to the codebase.
CI/CD Explained in Simple Terms
Imagine a developer changes one line of application code and pushes it to
GitHub.
Without CI/CD, someone may need to manually download the code, compile it,
run tests, package the application and deploy it.
With CI/CD, the process can be automated:
Writes Code
Push
Tests
This automation helps teams deliver changes more consistently and provides
faster feedback when something fails.
CI vs CD: What Is the Difference?
| Concept | Meaning | Main Purpose |
|---|---|---|
| Continuous Integration | Frequently integrating code changes into a shared repository. | Build and test changes automatically. |
| Continuous Delivery | Keeping software ready to be released. | Automate delivery while retaining a release decision. |
| Continuous Deployment | Automatically deploying validated changes. | Release changes automatically to the target environment. |
related but are not exactly the same. Delivery generally keeps a validated
release ready, while Deployment can automatically release it.
Why Is CI/CD Important?
⚡ Faster Feedback
Automated builds and tests can quickly identify problems after code changes.
🧪 Automated Testing
Automated test suites can be executed as part of the pipeline.
🔁 Repeatable Process
Teams can follow a consistent process for building and delivering software.
🚀 Faster Releases
Automation can reduce the manual effort involved in software delivery.
🔍 Early Bug Detection
Automated tests can identify defects before changes reach later environments.
📈 Better Scalability
Automated pipelines can support teams as projects and release frequency grow.
Typical CI/CD Pipeline
A CI/CD pipeline can contain several stages. The exact stages depend on the
project, programming language, testing strategy and deployment architecture.
Example Pipeline Stages
- Developer pushes code to Git.
- CI/CD tool detects the change.
- Dependencies are installed.
- Application is compiled or built.
- Unit tests are executed.
- API and UI automation tests may run.
- A Docker image may be created.
- The image or application package is published.
- The application is deployed to an environment.
- Post-deployment validation can be executed.
What Is Jenkins?
Jenkins is an automation server commonly used to create and
execute CI/CD pipelines.
Jenkins can integrate with source-control systems, build tools, testing
frameworks, container platforms and deployment systems.
A developer pushes Java code to GitHub. Jenkins detects the change, checks
out the source code, runs Maven, executes automated tests and publishes
the test results.
How Jenkins CI/CD Works
Basic Jenkins Pipeline Example
Jenkins pipelines can be defined using a Jenkinsfile. A simplified example
looks like this:
pipeline {
agent any
stages {
stage('Build') {
steps {
sh 'mvn clean package'
}
}
stage('Test') {
steps {
sh 'mvn test'
}
}
stage('Deploy') {
steps {
echo 'Deploying application...'
}
}
}
}
The example contains separate stages for building, testing and deployment.
Real projects usually contain additional configuration for credentials,
environments, reports, notifications and deployment infrastructure.
Important Jenkins Concepts
| Concept | Explanation |
|---|---|
| Pipeline | Defines the automated software delivery process. |
| Jenkinsfile | File used to define pipeline configuration as code. |
| Job | A configured task or automation process in Jenkins. |
| Agent | Machine or execution environment where pipeline steps run. |
| Stage | A logical section of a pipeline such as Build or Test. |
| Step | An individual action executed within a stage. |
What Is GitHub Actions?
GitHub Actions is a GitHub-native automation platform that
allows developers to automate workflows directly within GitHub repositories.
It can be used for CI/CD, automated testing, code quality checks, package
publishing and deployment workflows.
How GitHub Actions Works
GitHub Actions workflows are commonly stored as YAML files inside:
.github/workflows/
A simple workflow can run whenever code is pushed to a repository.
name: Java CI
on:
push:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Build and Test
run: mvn clean test
In this example, a push to the main branch triggers the workflow. GitHub
checks out the source code, sets up Java and executes the Maven test command.
Important GitHub Actions Concepts
| Concept | Meaning |
|---|---|
| Workflow | Automated process defined in a YAML file. |
| Event | Condition that triggers a workflow, such as push or pull request. |
| Job | Collection of steps executed on a runner. |
| Step | Individual command or action within a job. |
| Runner | Execution environment used to run a job. |
| Action | Reusable unit of automation used inside workflows. |
Jenkins vs GitHub Actions
| Feature | Jenkins | GitHub Actions |
|---|---|---|
| Type | Automation server | GitHub-native automation platform |
| Configuration | Jenkinsfile and UI configuration | YAML workflow files |
| GitHub Integration | Supported through integrations | Native |
| Plugins / Actions | Large plugin ecosystem | Reusable Actions ecosystem |
| Infrastructure | Usually requires Jenkins infrastructure or managed setup | Uses GitHub-hosted or self-hosted runners |
| Best Fit | Flexible enterprise automation | Projects hosted on GitHub |
What Is Docker?
Docker is a platform used to package applications and their
dependencies into portable containers.
Containers help applications run consistently across different environments
by packaging the application together with the components it needs.
Instead of asking every developer or tester to manually install the same
dependencies, an application can be packaged into a Docker image and run
inside a container.
Docker Image vs Docker Container
| Term | Simple Explanation |
|---|---|
| Docker Image | A packaged, immutable template used to create containers. |
| Docker Container | A running instance created from an image. |
| Dockerfile | Text file containing instructions for building an image. |
| Docker Registry | Repository used to store and distribute container images. |
Basic Docker Example
A simple Dockerfile for a Java application could look like this:
FROM eclipse-temurin:17-jdk
WORKDIR /app
COPY target/app.jar app.jar
EXPOSE 8080
CMD ["java", "-jar", "app.jar"]
After building the application, a Docker image can be created using:
docker build -t my-java-app .
The container can then be started using:
docker run -p 8080:8080 my-java-app
Why Docker Is Used in CI/CD
- Creates consistent application environments.
- Packages application dependencies.
- Makes application artifacts portable.
- Can be integrated into CI/CD pipelines.
- Helps standardize build and deployment environments.
- Can simplify application deployment workflows.
Jenkins or GitHub Actions can automate the pipeline, while Docker can package
the application into a portable container image.
How Jenkins, GitHub Actions and Docker Work Together
These technologies solve different parts of the software delivery process.
They are not necessarily direct replacements for one another.
Jenkins
Automates CI/CD pipelines and connects different tools used during
software delivery.
GitHub Actions
Automates workflows directly inside GitHub repositories.
Docker
Packages applications and dependencies into portable container images.
Real-World CI/CD Example
Consider a Java web application being developed by a software team.
A developer pushes code to GitHub. The CI/CD pipeline can then perform the
following operations:
Example Process
- Developer pushes code to GitHub.
- Jenkins or GitHub Actions starts the workflow.
- Dependencies are installed.
- The application is compiled using Maven.
- Unit tests are executed.
- API and UI automation tests can be executed.
- Test reports are generated.
- A Docker image is created.
- The image can be published to a container registry.
- The application can be deployed to the required environment.
CI/CD for QA and SDET Engineers
CI/CD is particularly important for QA engineers and SDETs because automated
tests can become an integral part of the delivery pipeline.
Example SDET Pipeline
Developer Push
↓
GitHub
↓
Jenkins / GitHub Actions
↓
Build Application
↓
Run Unit Tests
↓
Run API Tests
↓
Run Selenium / Playwright Tests
↓
Generate Test Reports
↓
Build Docker Image
↓
Deploy
↓
Smoke Test
What SDETs Should Automate
- API test execution
- UI automation tests
- Smoke tests
- Regression tests
- Test report generation
- Test environment validation
- Docker-based test environments
- Post-deployment validation
Benefits of CI/CD for Testing
| Without CI/CD | With CI/CD |
|---|---|
| Manual test execution | Automated test execution |
| Delayed feedback | Faster feedback |
| Manual build process | Automated builds |
| Manual deployment | Automated deployment options |
| Environment inconsistencies | More consistent environments |
| Testing performed late | Testing integrated into the pipeline |
CI/CD Tools You Should Know
Git
Version control system used to track source-code changes.
GitHub
Platform for hosting repositories and collaborating on source code.
Jenkins
Automation server used to build CI/CD pipelines.
GitHub Actions
GitHub-native automation for CI/CD and other workflows.
Docker
Container platform for packaging and running applications.
Artifact / Image Registry
Stores build artifacts or container images for later use.
CI/CD Learning Roadmap for Beginners
If you are starting CI/CD from scratch, follow this learning sequence:
| Step | Topic | What to Learn |
|---|---|---|
| 1 | Git | Clone, branch, commit, push, pull, merge and pull requests. |
| 2 | Build Tools | Maven or npm and dependency management. |
| 3 | CI/CD Basics | CI, Continuous Delivery and Continuous Deployment. |
| 4 | Jenkins | Jobs, pipelines, Jenkinsfile, agents and stages. |
| 5 | GitHub Actions | Workflows, events, jobs, steps, actions and runners. |
| 6 | Docker | Images, containers, Dockerfiles and basic commands. |
| 7 | Testing | Integrate API, UI and regression automation into pipelines. |
| 8 | Advanced DevOps | Cloud, Kubernetes, infrastructure and deployment strategies. |
Best CI/CD Project for Beginners
A practical project is one of the best ways to understand CI/CD.
complete CI/CD pipeline that builds the project, runs automated tests,
creates a Docker image and prepares it for deployment.
Suggested Project Structure
my-cicd-project/
│
├── src/
│ ├── main/
│ └── test/
│
├── pom.xml
├── Dockerfile
├── Jenkinsfile
│
└── .github/
└── workflows/
└── ci.yml
What You Should Implement
- Create a Java application.
- Push the project to GitHub.
- Add unit tests.
- Add API or UI automation tests.
- Create a Jenkinsfile.
- Create a GitHub Actions workflow.
- Create a Dockerfile.
- Build the Docker image.
- Run the application inside a container.
- Generate test reports through the pipeline.
Common CI/CD Mistakes Beginners Should Avoid
- Putting passwords or API keys directly inside pipeline files.
- Running every test without separating fast and slow test suites.
- Ignoring failed pipeline builds.
- Not storing pipeline configuration as code.
- Creating Docker images without understanding the Dockerfile.
- Using production credentials in development pipelines.
- Ignoring test reports and logs.
- Building complicated pipelines before understanding the basics.
Never commit passwords, private keys, tokens or other secrets into Git
repositories or pipeline configuration files.
Frequently Asked Questions
1. What is CI/CD?
CI/CD is a software development practice that automates activities such as
integrating code, building applications, running tests and delivering
software.
2. What does CI stand for?
CI stands for Continuous Integration. It involves
frequently integrating code changes and automatically validating them
through builds and tests.
3. What does CD stand for?
CD can refer to Continuous Delivery or
Continuous Deployment, depending on the context.
4. Is Jenkins a CI/CD tool?
Yes. Jenkins is an automation server commonly used to create and execute
CI/CD pipelines.
5. What is GitHub Actions?
GitHub Actions is a GitHub-native automation platform used to create
workflows for CI/CD, testing and other software-development tasks.
6. Is Docker a CI/CD tool?
Docker is primarily a container platform rather than a CI/CD orchestration
tool. It can be integrated into CI/CD pipelines to build and run containers.
7. What is the difference between Jenkins and Docker?
Jenkins is used to automate workflows and pipelines, while Docker is used
to package and run applications in containers.
8. Which is better: Jenkins or GitHub Actions?
Neither is universally better. Jenkins provides extensive flexibility and
is widely used for enterprise automation, while GitHub Actions is especially
convenient for projects already hosted on GitHub.
9. Should QA engineers learn CI/CD?
Yes. CI/CD knowledge is valuable for modern QA and SDET roles because
automated tests are commonly integrated into software delivery pipelines.
10. Can I learn CI/CD without DevOps experience?
Yes. Beginners can start with Git, basic Linux commands, a build tool,
Jenkins or GitHub Actions, and Docker before moving into advanced DevOps
technologies.
Final Thoughts
CI/CD is a fundamental concept for modern software development, DevOps,
automation testing and SDET careers. The goal is to reduce repetitive manual
work and provide faster, more consistent feedback throughout the software
delivery lifecycle.
Beginners should first understand the fundamentals of
Git, CI/CD pipelines and automated testing. Once those
concepts are clear, learning Jenkins, GitHub Actions and Docker becomes much
easier.
For QA and SDET engineers, a particularly valuable combination is
Git + CI/CD + Selenium/Playwright + API Testing + Docker.
Building one practical end-to-end project can help turn theoretical knowledge
into demonstrable experience.
Start Your CI/CD Journey
Learn one technology at a time, build a practical pipeline and gradually
integrate automated testing and Docker into your workflow.
Disclaimer
This article is intended for educational and informational purposes only.
Commands, configuration examples and CI/CD workflows may need to be modified
according to your programming language, operating system, infrastructure,
project architecture and tool versions. Always refer to the official
documentation of the tools you use when configuring production systems.