Templating 8.2 - #506
Conversation
- 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
Release automation fixes from downstream branches
Get rid of regexp and use structured json from each image
This is how it's expected to be called
Flexible slack messaging and some release process modifications
Make REDIS_DOWNLOAD_SHA conditionally required
Installing clang that way hasn't been accepted by docker team as the apt source is nightly
This PR is intended to fix issues raised by the Docker team: docker-library/official-images#20699 (comment) Templating for Dockerfiles To enable custom builds, I introduced Dockerfile templating based on Jinja2. Since we already have a Python-based release-automation tool, this was implemented as a new render-dockerfile command. Major changes: Redis versions are now declared in the .redis.version.json file, which is used as context for the templates Added Dockerfile.j2 templates for each distribution custom_build is no longer used as a Dockerfile ARG, but only as a Jinja2 template variable that enables certain sections in the Dockerfile Introduced an action that validates all Dockerfiles are in sync with their corresponding templates (with custom_build=false) Simplified the "apply docker version" action to use templating for updating Redis versions during releases Added ./bin/render-all-dockerfiles.sh script to help render all templates in various places clang-21 issue Reverted clang-21 source and installation, as there is no reliable way to install the latest version on Trixie.
🛡️ Jit Security Scan Results🚨 Summary• Multiple shell injection vulnerabilities detected in GitHub Actions workflows 🔍 FindingsHIGH - 4 findings
1. Shell Injection in GitHub Actions Workflow
Remediation: - run: |
- get_module_version() {
- local module="$1"
- grep MODULE_VERSIO
+ env:
+ MODULE_NAME: ${{ inputs.module_name }}
+ run: |
+ get_module_version() {
+ local module="$MODULE_NAME"
+ grep MODULE_VERSIO2. Shell Injection in Build and Tag Action
Remediation: - run: |
- mkdir -p /tmp/build-logs
- echo "Build failed for ${{ inputs.distributio
+ env:
+ DISTRIBUTION: ${{ inputs.distribution }}
+ PLATFORM: ${{ inputs.platform }}
+ run: |
+ mkdir -p /tmp/build-logs
+ echo "Build failed for $DISTRIBUTION on $PLATFORM"3. Shell Injection in Release Publish Workflow
Remediation: - run: |
- # Create release_info.json with all fields, then filter out empty ones
+ env:
+ GITHUB_REF: ${{ github.ref }}
+ GITHUB_SHA: ${{ github.sha }}
+ run: |
+ # Create release_info.json with all fields, then filter out empty ones
+ # Use $GITHUB_REF and $GITHUB_SHA instead of direct github context4. Shell Injection in Build and Tag Action (Format Registry Tag)
Remediation: - run: |
- if [[ "${{ inputs.run_type }}" == "release" ]]; then
- tag_prefix="${{
+ env:
+ RUN_TYPE: ${{ inputs.run_type }}
+ RELEASE_TAG: ${{ inputs.release_tag }}
+ run: |
+ if [[ "$RUN_TYPE" == "release" ]]; then
+ tag_prefix="$RELEASE_TAG"
|
This includes all workflow changes from unstable, fixes and templating from #503 for release/8.2