Skip to content

Conversation

@dariaguy
Copy link

Added support for custom and unstable builds

  • Created create-image-labels action to add labels to image
  • Added inputs for custom build and modules version
  • Renamed pre-merge workflow to build-n-test
  • Created pull-request workflow
  • Added build args to Dockerfile to support custom and unstable builds
  • Removed cache in docker build for unstable, custom and PR

adamiBs and others added 7 commits June 5, 2025 10:11
- Remove SHA verification because we are using changing code
- Change modules' version to `master`
- Change job's name
- Enable dispatch run
- Disable push step
- Adding a step of analyzing build failures
- Capture logs and upload for only failed builds
- Make sure checkout is only for 'unstable' branch
- Make the workflow callable
)

This commit consolidates multiple improvements to the Redis Docker library:

**Major Infrastructure Changes:**
- Restructure repository by moving legacy templating scripts to dedicated directory
- Add new simplified Dockerfile structure for Alpine and Debian variants
- Introduce comprehensive entrypoint testing framework with shunit2

**Docker Image Improvements:**
- Bump Alpine base image from 3.21 to 3.22
- Add support for Rust compilation with clang-static, llvm-dev, ncurses-dev packages
- Set RUST_DYN_CRT=1 environment variable for dynamic runtime linking
- Fix file permissions for Redis configuration files
- Preserve apk package management tools in final image
- Use setpriv instead of gosu for privilege dropping in entrypoint
- Improve entrypoint script robustness and remove eval usage

**CI/CD Enhancements:**
- Add GitHub Actions workflow for pre-merge testing
- Implement ARM64 support in build and test actions
- Configure fail-fast: false for better parallel testing
- Fix PR workflow to test merge commits instead of head commits
- Add callable workflow options for flexibility

**Testing & Quality:**
- Introduce comprehensive entrypoint testing suite
- Add container initialization wait logic
- Implement version-specific test cases for unstable builds
- Add .dockerignore for optimized build context

**Version Management:**
- Cherry-pick Redis 8.2 M01 improvements while maintaining unstable branch builds
- Ensure compatibility with Redis 8.0+ features
- Maintain backward compatibility with existing configurations
…llvm/llvm-dev on alpine; add llvm llvm-dev libclang-dev on debian; export LLVM_CONFIG_PATH/LIBCLANG_PATH) (#470)
…conditional in Alpine (#471)

* alpine,debian: avoid test modules race on non-module arches by -j1; alpine: call pip only when BUILD_WITH_MODULES=yes (use python3 -m pip)

* alpine: pip installs under modules use --break-system-packages (PEP 668); no change to job parallelism
…ment

Add release automation to unstable branch
Copy link

@jit-ci jit-ci bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Jit has detected 1 important finding in this PR that you should review.
The finding is detailed below as a comment.
It’s highly recommended that you fix this security issue before merge.

Repository Risks:

  • Database Integration: Connects to a database, often involving sensitive data that must be securely managed.
  • Internally Accessible: Accessible only within the internal network, reducing exposure to external threats but still requiring proper controls.
  • High Severity Findings: Indicates that the resource has high severity security findings that need attention.

Repository Context:

graph LR
    GitHub$Repository_U23_redis/docker_U2D_library_U2D_redis["GitHub Repository<br/>redis/docker-library-redis"]:::GitHub$Repository
    Team_U23_client_U2D_developers["Team<br/>client-developers"]:::Team
    Team_U23_core_U2D_team["Team<br/>core-team"]:::Team
    Team_U23_redis_U2D_packaging_U2D_admins["Team<br/>redis-packaging-admins"]:::Team
    DBIntegration_U23_redis["DBIntegration<br/>redis"]:::DBIntegration
    Docker$Image_U23_redis["Docker Image<br/>redis"]:::Docker$Image
    Team_U23_client_U2D_developers -- "Owns" --> GitHub$Repository_U23_redis/docker_U2D_library_U2D_redis
    Team_U23_core_U2D_team -- "Owns" --> GitHub$Repository_U23_redis/docker_U2D_library_U2D_redis
    Team_U23_redis_U2D_packaging_U2D_admins -- "Owns" --> GitHub$Repository_U23_redis/docker_U2D_library_U2D_redis
    GitHub$Repository_U23_redis/docker_U2D_library_U2D_redis -- "Is accessible to" --> DBIntegration_U23_redis
    GitHub$Repository_U23_redis/docker_U2D_library_U2D_redis -- "Builds" --> Docker$Image_U23_redis
Loading

ARG REDISBLOOM_VERSION
ARG REDISTIMESERIES_VERSION
ARG CUSTOM_BUILD=false
RUN set -eux; \
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Security control: Docker Scan

'Apk Add' Is Missing '--No-Cache'

You should use 'apk add' with '--no-cache' to clean package cached data and reduce image size.

Severity: HIGH

Learn more about this issue


Jit Bot commands and options (e.g., ignore issue)

You can trigger Jit actions by commenting on this PR review:

  • #jit_ignore_fp Ignore and mark this specific single instance of finding as “False Positive”
  • #jit_ignore_accept Ignore and mark this specific single instance of finding as “Accept Risk”
  • #jit_ignore_type_in_file Ignore any finding of type "'apk add' is missing '--no-cache'" in alpine/Dockerfile; future occurrences will also be ignored.
  • #jit_undo_ignore Undo ignore command

- Added build args in dockerfile for moduels and redis version
- Added custom_build input to use in dockerfile and build-and-tag-locally
- Created test workflow to run unsable build
- Support custom, unstable, nightly and release
- Added changes to release_build_and_test
- pull-request.yml workflow for PR for unstable and release branches
- renamed custom_build to custom_ref_type
- renamed pre-merge to build-n-test
- removed nightly test workflow
Copy link

@jit-ci jit-ci bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ The following Jit checks failed to run:

  • docker-scan

#jit_bypass_commit in this PR to bypass, Jit Admin privileges required.

More info in the Jit platform.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants