- Designed trunk-based development workflow with branch protection - Added workflow validation job to prevent main branch breaks - Integrated act (GitHub Actions runner) for local Gitea workflow testing - Created unified CI/CD script interface (scripts/cicd.sh) - Added YAML lint configuration with practical limits (400 chars) - Organized all CI/CD scripts under scripts/cicd/ directory - Confirmed Gitea/GitHub Actions compatibility via local testing - Updated ADR 0017 with implementation details and test results - Enhanced documentation with local development workflow See ADR-0017 for complete trunk-based development workflow documentation. See ADR-0016 for CI/CD pipeline design.
8.1 KiB
8.1 KiB
CI/CD Status Badges
This document provides badge examples for different CI/CD platforms and code quality services.
Gitea (Primary Platform)
[](https://gitea.arcodange.fr/arcodange/DanceLessonsCoach)
[](https://gitea.arcodange.fr/arcodange/DanceLessonsCoach/-/pipelines)
Configuration Notes:
- Organization:
arcodange - Repository:
DanceLessonsCoach - Internal URL (for CI/CD scripts):
https://gitea.arcodange.lab/ - External URL (for public badges):
https://gitea.arcodange.fr/ - SSH URL:
ssh://git@192.168.1.202:2222/arcodange/DanceLessonsCoach.git - Badge API: Uses external domain with full org/repo path
- CI/CD Configuration: Uses internal domain for faster network access
GitHub Mirror
[](https://github.com/yourorg/DanceLessonsCoach/actions)
[](https://github.com/yourorg/DanceLessonsCoach/issues)
[](https://github.com/yourorg/DanceLessonsCoach/stargazers)
[](https://github.com/yourorg/DanceLessonsCoach/blob/main/LICENSE)
Replace yourorg with your actual GitHub organization/user name.
GitLab Mirror
[](https://gitlab.com/yourorg/DanceLessonsCoach/-/pipelines)
[](https://gitlab.com/yourorg/DanceLessonsCoach/-/commits/main)
Replace yourorg with your actual GitLab organization/user name.
Code Quality Badges
Go Report Card
[](https://goreportcard.com/report/github.com/yourorg/DanceLessonsCoach)
Code Coverage (Codecov)
[](https://codecov.io/gh/yourorg/DanceLessonsCoach)
Code Climate
[](https://codeclimate.com/github/yourorg/DanceLessonsCoach)
[](https://codeclimate.com/github/yourorg/DanceLessonsCoach)
Version Badges
[](https://github.com/yourorg/DanceLessonsCoach/releases/latest)
[](https://github.com/yourorg/DanceLessonsCoach/releases/latest)
[](https://github.com/yourorg/DanceLessonsCoach/blob/main/go.mod)
Combined Badge Example
Here's how to combine multiple badges in your README:
# DanceLessonsCoach
[](https://ci.your-gitea-instance.com)
[](https://github.com/yourorg/DanceLessonsCoach/actions)
[](https://gitlab.com/yourorg/DanceLessonsCoach/-/pipelines)
[](https://goreportcard.com/report/github.com/yourorg/DanceLessonsCoach)
[](https://codecov.io/gh/yourorg/DanceLessonsCoach)
[](https://github.com/yourorg/DanceLessonsCoach/releases/latest)
[](https://github.com/yourorg/DanceLessonsCoach/blob/main/go.mod)
[](https://github.com/yourorg/DanceLessonsCoach/blob/main/LICENSE)
Setup Instructions
For Gitea (Arcodange Configuration)
# 1. Configure CI/CD runners to use INTERNAL URL
export GITEA_URL="https://gitea.arcodange.lab/"
export GITEA_ORG="arcodange"
export GITEA_REPO="DanceLessonsCoach"
# 2. Enable GitHub Actions compatibility in repo settings
# - Go to: https://gitea.arcodange.lab/arcodange/DanceLessonsCoach/settings/actions
# - Enable GitHub Actions
# - Configure runner to use internal network (192.168.1.202)
# 3. Workflow files are in .gitea/workflows/ (not .github/workflows/)
# - Main workflow: .gitea/workflows/ci-cd.yaml
# - Follows Arcodange conventions from webapp workflow
# 4. Use EXTERNAL URL for public badges
# - Badge API: https://gitea.arcodange.fr/api/badges/arcodange/DanceLessonsCoach/status
# - Public access: https://gitea.arcodange.fr/arcodange/DanceLessonsCoach
# - SSH access: ssh://git@192.168.1.202:2222/arcodange/DanceLessonsCoach.git
For CI/CD Configuration Files
# .github/workflows/main.yml
# Arcodange-specific environment variables
env:
GITEA_INTERNAL: "https://gitea.arcodange.lab/"
GITEA_EXTERNAL: "https://gitea.arcodange.fr/"
GITEA_ORG: "arcodange"
GITEA_REPO: "DanceLessonsCoach"
GITEA_SSH: "ssh://git@192.168.1.202:2222/arcodange/DanceLessonsCoach.git"
For Badge Usage
# Always use EXTERNAL URL with full org/repo path for badges in README
[](https://gitea.arcodange.fr/arcodange/DanceLessonsCoach)
[](https://gitea.arcodange.fr/arcodange/DanceLessonsCoach/-/pipelines)
For GitHub
- Enable GitHub Actions on your mirror repository
- Badges will automatically work with the provided URLs
- Configure branch protection rules as needed
For GitLab
- Create a
.gitlab-ci.ymlfile (can convert from GitHub Actions) - Enable pipeline badges in GitLab CI/CD settings
- Use the provided badge URLs
For External Services
- Go Report Card: Just visit https://goreportcard.com/report/github.com/yourorg/DanceLessonsCoach
- Codecov: Sign up at codecov.io and integrate with your repository
- Code Climate: Sign up and add your repository
Badge Customization
You can customize badge appearance using shield.io parameters:
[](https://example.com)
Style options: flat, flat-square, plastic, for-the-badge, social
Color options: Any hex color or named color (blue, green, red, etc.)
Logo options: Add ?logo=go, ?logo=github, etc.
Troubleshooting
Badges not updating
- Check if CI/CD pipelines are running successfully
- Verify badge URLs are correct
- Ensure your repository is public (for external services)
- Check for caching issues (add cache buster if needed)
Broken badge links
- Verify the platform URLs are correct
- Check repository visibility settings
- Ensure CI/CD is properly configured
- Test badge URLs in browser first
References
- Shields.io Badge Documentation
- GitHub Actions Badges
- GitLab CI/CD Badges
- Gitea Actions Documentation
- Go Report Card
- Codecov Documentation
Note: Replace all placeholder URLs (yourorg, your-gitea-instance.com) with your actual repository and instance information.