Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple To-Do List Application

A simple command-line to-do list application with CI/CD pipeline using Jenkins.

Features

  • Add new tasks with unique IDs
  • List all tasks
  • Update task title and completion status
  • Delete tasks by ID
  • Clear all tasks
  • Comprehensive unit tests with pytest
  • Docker containerization
  • Jenkins CI/CD pipeline

Docker Hub

The Docker image is available on Docker Hub:

Pull and Run from Docker Hub

# Pull the image
docker pull sunhithreddy/imt2023113:jenkins

# Run the container
docker run -d -p 5000:5000 sunhithreddy/imt2023113:jenkins

Local Setup

Prerequisites

  • Python 3.10+
  • Docker (optional)
  • Jenkins (for CI/CD)

Installation

  1. Clone the repository:
git clone https://github.com/codetuscan/SE_lab_ci_cd.git
cd SE_lab_ci_cd
  1. Create a virtual environment:
python -m venv venv
venv\Scripts\activate  # Windows
source venv/bin/activate  # Linux/Mac
  1. Install dependencies:
pip install -r requirements.txt

Usage

Run Tests

pytest -v

Docker

Build the Image

docker build -t todo-app .

Run the Container

docker run -d -p 5000:5000 todo-app

Jenkins Pipeline

The Jenkinsfile includes the following stages:

  1. Checkout - Clones the repository from GitHub
  2. Create Virtual Environment - Sets up Python virtual environment
  3. Install Dependencies - Installs required packages from requirements.txt
  4. Run Tests - Executes pytest test suite
  5. Build Docker Image - Creates Docker image
  6. Push Docker Image - Pushes to Docker Hub
  7. Deploy Container - Runs the application in a Docker container

Jenkins Pipeline Results

Pipeline Overview

Pipeline Overview

Successful Build

Build Success

Project Structure

SE_lab_ci_cd/
├── app.py               # Main application with task management functions
├── test_app.py          # Unit tests for the application
├── requirements.txt     # Python dependencies (pytest, flask)
├── Dockerfile          # Docker configuration
├── Jenkinsfile         # Jenkins pipeline configuration
├── overview.png        # Jenkins pipeline overview screenshot
├── success.png         # Successful build screenshot
└── README.md           # This file

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages