Contributing Guide
This guide explains how to contribute to both the OpenShift Agent Install Helper project and its documentation website.
Table of Contents
- Getting Started
- Repository Structure
- Setting Up Development Environment
- Documentation Website
- Making Contributions
- Pull Request Process
- Style Guides
Getting Started
Prerequisites
- Git
- Ruby 3.2 or later (for documentation website)
- Bundler
- Text editor
- GitHub account
Quick Start
# Clone the repository
git clone https://github.com/your-org/openshift-agent-install.git
cd openshift-agent-install
# Set up documentation website locally
./scripts/install-jekyll.sh
./scripts/serve-site.sh
Repository Structure
openshift-agent-install/
├── docs/ # Documentation website
│ ├── _config.yml # Jekyll configuration
│ ├── adr/ # Architecture Decision Records
│ ├── assets/ # Images and other assets
│ └── *.md # Documentation pages
├── examples/ # Example configurations
├── playbooks/ # Ansible playbooks
├── scripts/ # Utility scripts
├── e2e-tests/ # End-to-end tests
├── hack/ # Development scripts
└── site-config/ # Site configuration files
Setting Up Development Environment
For Documentation Website
- Install Ruby and Bundler:
# On RHEL/CentOS sudo dnf install ruby ruby-devel gem install bundler # On Ubuntu/Debian sudo apt-get install ruby ruby-dev gem install bundler
- Install Jekyll and dependencies:
./scripts/install-jekyll.sh
- Start local server:
./scripts/serve-site.sh
- Visit
http://localhost:4000/openshift-agent-install/
For Project Development
- Set up Python environment (if needed)
- Install Ansible
- Configure development tools
Documentation Website
Adding New Pages
- Create a new Markdown file in
docs/
:--- layout: default title: Your Page Title description: Brief description of the page --- # Your Page Title Content goes here...
- Add to navigation:
- Update relevant section in
docs/index.md
- Link from related pages
- Update relevant section in
Adding ADRs
- Copy template from existing ADR
- Number sequentially
- Add front matter:
--- layout: default title: "ADR-XXXX: Your ADR Title" description: "Architecture Decision Record for..." ---
- Update
docs/adr/index.md
Local Testing
cd docs
bundle exec jekyll serve --host 0.0.0.0 --port 4000 --baseurl /openshift-agent-install
Making Contributions
Branch Strategy
main
: Primary branchfeature/*
: New featuresfix/*
: Bug fixesdocs/*
: Documentation updates
Commit Messages
type(scope): Brief description
Detailed description of changes
Types:
feat
: New featurefix
: Bug fixdocs
: Documentationstyle
: Formattingrefactor
: Code restructuringtest
: Adding testschore
: Maintenance
Documentation Changes
- Make changes in
docs/
directory - Test locally
- Commit with
docs:
prefix - Create pull request
Code Changes
- Create feature branch
- Make changes
- Add tests
- Update documentation
- Create pull request
Pull Request Process
- Before Creating PR
- Test changes locally
- Update documentation
- Add tests if needed
- Ensure CI passes
- PR Description
## Description Brief description of changes ## Type of Change - [ ] Bug fix - [ ] New feature - [ ] Documentation update - [ ] Other (specify) ## Testing Done Describe testing performed ## Documentation - [ ] Documentation updated - [ ] No documentation needed
- Review Process
- Automated checks must pass
- At least one maintainer review
- Documentation review if needed
- After Merge
- Delete feature branch
- Update related issues
- Monitor deployment
Style Guides
Documentation Style
- Use American English
- Write in present tense
- Use active voice
- Include code examples
- Add screenshots for UI changes
Markdown Guidelines
- Use ATX headers (
#
style) - Code blocks with language
- Tables for structured data
- Links for references
Code Style
- Follow language conventions
- Document public APIs
- Include comments
- Use consistent naming
GitHub Pages
The documentation is automatically deployed to GitHub Pages when changes are merged to main
. The deployment process:
- GitHub Action builds site
- Deploys to GitHub Pages
- Available at project URL
Troubleshooting Deployments
- Check Actions tab for build logs
- Verify front matter in Markdown files
- Test locally before pushing
- Check Jekyll configuration
Getting Help
- Open an issue for questions
- Join project discussions
- Contact maintainers
- Review existing documentation