Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions .github/workflows/dockerimage.yml

This file was deleted.

27 changes: 27 additions & 0 deletions .github/workflows/master-build-all-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Docker Image CI

on:
push:
branches:
- master

jobs:
build-all:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.13'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r dev-requirements.txt

- name: Build all Redis images
run: invoke build --version all --cpu 2
33 changes: 33 additions & 0 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Test Build

on:
pull_request:
branches:
- '**'
push:
branches-ignore:
- 'master'

jobs:
test-build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.13'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r dev-requirements.txt

- name: Pull latest Redis image
run: invoke pull --version latest

- name: Build Redis 7.2.0 image
run: invoke build --version 7.2.0 --cpu 1
51 changes: 51 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Cache directory
.cache/

# Python
__pycache__/
*.pyc
*.pyo
*.pyd
.Python
env/
venv/
.venv/
pip-log.txt
pip-delete-this-directory.txt
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.log
.git
.mypy_cache
.pytest_cache
.hypothesis

# Virtual environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# IDE
.vscode/
.idea/
*.swp
*.swo
*~

# OS
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
## 2025-10-04

* Updated Python version to 3.13 across all workflows and development environment
* Implemented comprehensive caching system using cachetools with file-based persistence for GitHub API calls (30-minute TTL)
* Modularized codebase by separating concerns into dedicated modules: cache.py for caching functionality and versions.py for version management
* Updated Python requirements: invoke>=2.2.0, requests>=2.31.0, cachetools>=5.3.0
* Created GitHub Actions workflow (test-build.yml) for automated testing and building on pull requests and non-master branches
* Refactored multiprocessing pool management to use context managers for proper resource cleanup
* Enhanced Makefile with Invoke task targets, clear-cache command, and CPU variable defaults
* Restructured README.md with separate Installation/Usage sections and updated documentation
* Fixed import issues by replacing relative imports with absolute imports for CI compatibility
* Updated dockerimage.yml workflow to build all Redis images on master branch pushes using parallel processing

## 2024-06-25

* Added 7.2.x releases and published docker images
Expand Down
56 changes: 47 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,26 +1,64 @@
help:
@echo "Please use 'make <target>' where <target> is one of"
@echo " build builds docker-compose containers"
@echo " up starts docker-compose containers"
@echo " down stops the running docker-compose containers"
@echo ""
@echo "Docker Compose commands:"
@echo " build builds docker compose containers"
@echo " up starts docker compose containers"
@echo " down stops the running docker compose containers"
@echo " rebuild rebuilds the image from scratch without using any cached layers"
@echo " bash starts bash inside a running container."
@echo " cli run redis-cli inside the container on the server with port 7000"
@echo ""
@echo "Invoke tasks:"
@echo " pull pull Redis Docker images (use VERSION and CPU variables)"
@echo " build-images build Redis Docker images (use VERSION and CPU variables)"
@echo " push push Redis Docker images (use VERSION and CPU variables)"
@echo " list list all available Redis versions"
@echo " list-releases list Redis releases from GitHub"
@echo ""
@echo "Cache management tasks:"
@echo " clear-cache clear the GitHub API cache"

# Default values
CPU ?= 2
VERSION ?= 7.2

build:
docker-compose build
docker compose build

up:
docker-compose up
docker compose up

down:
docker-compose stop
docker compose stop

rebuild:
docker-compose build --no-cache
docker compose build --no-cache

bash:
docker-compose exec redis-cluster /bin/bash
docker compose exec redis-cluster /bin/bash

cli:
docker-compose exec redis-cluster /redis/src/redis-cli -p 7000
docker compose exec redis-cluster /redis/src/redis-cli -p 7000

# Invoke tasks
pull:
invoke pull --version $(VERSION) --cpu $(CPU)

build-images:
invoke build --version $(VERSION) --cpu $(CPU)

push:
invoke push --version $(VERSION) --cpu $(CPU)

list:
invoke list

list-releases:
invoke list-releases

# Cache management
clear-cache:
rm -rf .cache/

.PHONY: clear-cache
Loading