Skip to content

Conversation

@guillermotestkube
Copy link
Contributor

This PR

Implements an automated pipeline to detect, test, and update third-party service images (MinIO, MongoDB, PostgreSQL, kubectl) used by Testkube.

Changes

Unified workflow (thirdparty-updates.yaml):

  • Automatically checks Docker Hub for new versions every Sunday
  • Runs regression tests sequentially in Kind clusters
  • Creates PRs only for services that pass all tests
  • Graceful handling when no updates are available

GAR push workflow (push-to-gar.yaml):

  • Triggers when a PR is merged to main
  • Detects service from PR labels
  • Builds and pushes images to Google Artifact Registry

New generic version checker (scripts/check-version.sh):

  • Supports all 4 services with service-specific logic
  • Compares local version with Docker Hub latest
  • Updates Dockerfile and Chart.yaml when --update-files flag is passed

Service configuration files (service.yaml for each service):

  • Centralized configuration for source image, version pattern, dockerfile name
  • New kubectl service folder:
  • Added kubectl/ with helm chart, dockerfile, and service config

Consolidated Tiltfile (minio/oss.tiltfile):

  • Single file that auto-detects CI vs local environment
  • Optimized resource requests for GitHub Actions (2 CPU limit)

New test workflows:

  • test/oss-smoke-test.yaml - Runs k6 smoke test via Testkube API
  • test/minio-artifact-test.yaml - Tests artifact upload to MinIO

Documentation (minio/README.md):

  • Complete guide for the automated pipeline
  • Local and CI testing instructions
  • Configuration and secrets documentation

Checklist
[x] tested locally
[ ] added new dependencies
[x] updated the docs
[x] added a test

- Add unified script check-and-update-minio.sh that:
  - Queries Docker Hub for latest MinIO version
  - Compares with current version in repo
  - Updates Dockerfile, Chart.yaml, and values.yaml if new version available

- Add GitHub Actions workflow that:
  - Runs weekly (every Sunday at 00:00 UTC)
  - Checks for new MinIO versions from Docker Hub
  - Creates automated PR when new version is detected
  - Includes proper labels and description

This automates the MinIO lifecycle management as per requirements.
- Add workflow_dispatch input for dry-run mode
- Allow manual execution with option to only check without creating PR
- Improve output messages to distinguish dry-run from PR creation
- Add OpenAI GPT-4 integration for automatic PR descriptions
- Simplify check-and-update-minio.sh (355→205 lines, 42% reduction)
- Add generate-pr-description.sh for AI-generated PR descriptions
- Add test-pr-generation.sh for local testing
- Update workflow to use AI-generated PR bodies
- Fetch release notes from GitHub API
- Query Docker Hub for version information
- Include fallback if OpenAI fails
- Add ai-generated label to automated PRs
- All code and comments in English
- Remove color codes and verbose logging
- No linter errors

Features:
- Automatic weekly checks for MinIO updates (Sundays 00:00 UTC)
- Professional PR descriptions generated by GPT-4
- Executive summary, security updates, features, bug fixes
- Structured markdown with tables and references
- Compatible with existing check-and-update-minio.sh output

Configuration:
- Requires OPENAI_API_KEY secret in GitHub
- Cost: ~$0.01-0.03 per PR, ~$0.04-0.15 monthly
The test-pr-generation.sh script is only for local testing and is not needed for production workflow.
This commit brings the complete solution from test-action-kind repo:

## New Workflows
- thirdparty-updates.yaml: Unified pipeline for all services
  - Checks MinIO, MongoDB, PostgreSQL, kubectl for updates
  - Runs regression tests sequentially (1 Kind cluster at a time)
  - Creates PRs only for services that pass tests
  - Graceful handling of 'no update' scenarios
- push-to-gar.yaml: Push to Google Artifact Registry on PR merge
  - Detects service from PR labels
  - Builds and tags images
  - Pushes to GAR with version and 'latest' tags

## New Scripts
- scripts/check-version.sh: Generic version checker
  - Supports MinIO, MongoDB, PostgreSQL, kubectl
  - Reads from Dockerfile (MinIO) or Chart.yaml (others)
  - Compares with Docker Hub latest versions
  - Updates files when --update-files flag is passed

## Service Configuration (service.yaml for each)
- minio/service.yaml
- mongodb/service.yaml
- postgresql/service.yaml
- kubectl/service.yaml (new folder)

## CI Testing Files
- minio/ci.tiltfile: Tilt config for Kind + Testkube
- minio/minio.values.yaml: Helm values for CI
- test/oss-smoke-test.yaml: k6 smoke test workflow
- test/minio-artifact-test.yaml: Artifact upload test

## Removed
- .github/workflows/check-minio-updates.yaml (replaced by unified workflow)
- Merged ci.tiltfile functionality into oss.tiltfile
- Auto-detects CI vs local environment (CI/GITHUB_ACTIONS env vars)
- In CI: skips docker_build (pre-built), ignores pod_readiness
- In Local: builds image with Tilt, uses default readiness
- Updated workflow reference from ci.tiltfile to oss.tiltfile
- Deleted redundant ci.tiltfile
Includes:
- File structure overview
- Automated update pipeline explanation
- Local and CI testing instructions
- Configuration file examples
- Required secrets documentation
- Manual build instructions
- Helm chart usage guide
- Links to related files and resources
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.

2 participants