Skip to content

Latest commit

 

History

History
100 lines (81 loc) · 3.92 KB

File metadata and controls

100 lines (81 loc) · 3.92 KB

PR Summary: Debian-based Docker and CI/CD Workflows

IMPORTANT: Branch Note The changes have been implemented on the release/ghcr-debian-cross branch locally. Due to workspace automation constraints, the identical changes have also been pushed to origin/copilot/update-dockerfile-to-debian-slim.

To create the PR from the correct branch name (release/ghcr-debian-cross), you can:

  1. Manually push the local release/ghcr-debian-cross branch: git push -u origin release/ghcr-debian-cross
  2. Then create a PR from release/ghcr-debian-cross to main

Alternatively, you can rename the existing copilot/update-dockerfile-to-debian-slim branch to release/ghcr-debian-cross on GitHub.

This branch contains comprehensive updates to the Docker configuration and CI/CD workflows for the rust-cargo-docs-rag-mcp project.

Changes Made

1. Dockerfile - Debian Migration

  • Changed: Migrated from Alpine to Debian slim (bullseye)
  • Why: Better compatibility with Rust dependencies and OpenSSL
  • Details: Multi-stage build preserved, uses rust:1.91.1-slim-bullseye for builder and debian:bullseye-slim for runtime

2. docker/entrypoint.sh - Enhanced Wrapper

  • Changed: Improved entrypoint script with case statement
  • Features:
    • Support for http and stdio modes
    • Debug mode flag handling
    • Pass-through support for custom arguments
    • Better error messages for unknown modes

3. .github/workflows/ci.yml - Build & Test Workflow

  • New: CI workflow for continuous integration
  • Triggers: On push to main and pull requests to main
  • Steps:
    • Checkout code
    • Cache cargo dependencies
    • Install Rust 1.91.1 toolchain
    • Build release binary
    • Run all tests

4. .github/workflows/release-and-publish.yml - Release Workflow

  • New: Comprehensive release automation
  • Triggers: On push of tags matching v* or manual dispatch
  • Capabilities:
    • Multi-architecture Docker builds (amd64, arm64)
    • Push to GitHub Container Registry (GHCR)
    • Create GitHub releases
    • Cross-compile binaries for x86_64 and aarch64 Linux
    • Upload binaries as release assets

5. scripts/set-version.sh - Portability Improvement

  • Changed: Rewritten from Python to pure shell
  • Benefits:
    • No Python dependency required
    • Falls back to sed if perl is not available
    • More portable across different environments
    • Idempotent and safe

6. README.md - Comprehensive Documentation

  • Changed: Complete rewrite of README
  • New sections:
    • Release/versioning workflow with Cocogitto
    • Docker installation and usage (GHCR)
    • Environment variables documentation
    • pkgx and Cargo installation methods
    • All available MCP tools with examples
    • Testing tools directly without server
    • MCP protocol integration examples

Validation Performed

✅ YAML syntax validated for all workflows ✅ Shell script syntax validated for entrypoint.sh and set-version.sh ✅ Dockerfile validated with hadolint (minor warnings about best practices) ✅ CodeQL security scan completed with no issues ✅ Build system validated (cargo build succeeds) ✅ Test suite runs (some pre-existing failures unrelated to these changes)

Files Modified

A  .github/workflows/ci.yml
A  .github/workflows/release-and-publish.yml
M  Dockerfile
M  README.md
M  docker/entrypoint.sh
M  scripts/set-version.sh

Next Steps

  1. Review and approve this PR
  2. Merge to main
  3. Tag a release (e.g., v0.4.0) to trigger the release workflow
  4. Verify Docker images are published to GHCR
  5. Verify binaries are attached to the GitHub release

Notes

  • The production environment referenced in the release workflow may need to be configured in GitHub repository settings
  • Ensure GitHub Actions has permission to publish packages (Settings → Actions → General → Workflow permissions → Read and write permissions)
  • The release workflow requires the GITHUB_TOKEN which is automatically provided by GitHub Actions