Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0383e9fabf | ||
|
|
3ec32dd942 | ||
|
|
daa7201398 | ||
|
|
46556a1633 | ||
|
|
3c2087a0e2 | ||
|
|
732a2a86b0 |
No files matched your search
@@ -0,0 +1,51 @@
|
||||
---
|
||||
name: Bug Report
|
||||
about: Create a report to help us improve QQQ Orb
|
||||
title: '[BUG] '
|
||||
labels: ['bug', 'needs-triage']
|
||||
assignees: ''
|
||||
---
|
||||
|
||||
## 🐛 Bug Description
|
||||
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
## 🔄 Steps to Reproduce
|
||||
|
||||
Steps to reproduce the behavior:
|
||||
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
## ✅ Expected Behavior
|
||||
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
## ❌ Actual Behavior
|
||||
|
||||
A clear and concise description of what actually happened.
|
||||
|
||||
## 📸 Screenshots
|
||||
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
## 🖥️ Environment
|
||||
|
||||
- **QQQ Orb Version**: [e.g. 2.1.0]
|
||||
- **CircleCI Version**: [e.g. 2.1]
|
||||
- **Operating System**: [e.g. macOS, Ubuntu, Windows]
|
||||
- **Project Type**: [e.g. Maven, Node.js, Hybrid]
|
||||
|
||||
## 📋 Additional Context
|
||||
|
||||
Add any other context about the problem here.
|
||||
|
||||
## 🔗 Related Issues
|
||||
|
||||
Link any related issues or discussions.
|
||||
|
||||
---
|
||||
|
||||
**Note**: This repository is a component of the QQQ framework. For general QQQ issues, please use the [main QQQ repository](https://github.com/Kingsrook/qqq/issues).
|
||||
@@ -0,0 +1,11 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: QQQ Framework Support
|
||||
url: https://github.com/Kingsrook/qqq/issues
|
||||
about: For general QQQ framework issues, please use the main QQQ repository
|
||||
- name: QQQ Community Discussions
|
||||
url: https://github.com/Kingsrook/qqq/discussions
|
||||
about: Join community discussions and ask questions
|
||||
- name: QQQ Documentation
|
||||
url: https://github.com/Kingsrook/qqq/wiki
|
||||
about: Check the QQQ Wiki for comprehensive documentation
|
||||
@@ -0,0 +1,55 @@
|
||||
---
|
||||
name: Feature Request
|
||||
about: Suggest an idea for QQQ Orb
|
||||
title: '[FEATURE] '
|
||||
labels: ['enhancement', 'needs-triage']
|
||||
assignees: ''
|
||||
---
|
||||
|
||||
## 🚀 Feature Description
|
||||
|
||||
A clear and concise description of the feature you'd like to see implemented.
|
||||
|
||||
## 💡 Motivation
|
||||
|
||||
Why is this feature needed? What problem does it solve?
|
||||
|
||||
## 📋 Detailed Description
|
||||
|
||||
A detailed description of the feature, including:
|
||||
|
||||
- **What**: What should the feature do?
|
||||
- **Why**: Why is this feature important?
|
||||
- **How**: How should it work?
|
||||
- **When**: When would this be used?
|
||||
|
||||
## 🎯 Use Cases
|
||||
|
||||
Describe specific use cases for this feature:
|
||||
|
||||
1. **Use Case 1**: Description
|
||||
2. **Use Case 2**: Description
|
||||
3. **Use Case 3**: Description
|
||||
|
||||
## 🔧 Implementation Ideas
|
||||
|
||||
If you have ideas about how this could be implemented, please share them here.
|
||||
|
||||
## 📊 Priority
|
||||
|
||||
- [ ] Low - Nice to have
|
||||
- [ ] Medium - Would be helpful
|
||||
- [ ] High - Important for workflow
|
||||
- [ ] Critical - Blocking current work
|
||||
|
||||
## 🔗 Related Issues
|
||||
|
||||
Link any related issues or discussions.
|
||||
|
||||
## 📝 Additional Context
|
||||
|
||||
Add any other context, mockups, or examples about the feature request here.
|
||||
|
||||
---
|
||||
|
||||
**Note**: This repository is a component of the QQQ framework. For general QQQ features, please use the [main QQQ repository](https://github.com/Kingsrook/qqq/issues).
|
||||
@@ -0,0 +1,66 @@
|
||||
## 📋 Description
|
||||
|
||||
Brief description of the changes in this PR.
|
||||
|
||||
## 🔗 Related Issue
|
||||
|
||||
Closes #(issue number)
|
||||
|
||||
## 🧪 Testing
|
||||
|
||||
- [ ] I have tested these changes locally
|
||||
- [ ] I have run `make test` and all tests pass
|
||||
- [ ] I have run `make lint` and all linting checks pass
|
||||
- [ ] I have validated the orb configuration with `make validate`
|
||||
|
||||
## 📝 Type of Change
|
||||
|
||||
- [ ] Bug fix (non-breaking change which fixes an issue)
|
||||
- [ ] New feature (non-breaking change which adds functionality)
|
||||
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
||||
- [ ] Documentation update
|
||||
- [ ] Refactoring (no functional changes)
|
||||
- [ ] Performance improvement
|
||||
- [ ] Other (please describe):
|
||||
|
||||
## 🔍 Changes Made
|
||||
|
||||
- [ ] Updated orb configuration
|
||||
- [ ] Added new commands or jobs
|
||||
- [ ] Updated shell scripts
|
||||
- [ ] Updated documentation
|
||||
- [ ] Updated examples
|
||||
- [ ] Other (please describe):
|
||||
|
||||
## 📸 Screenshots
|
||||
|
||||
If applicable, add screenshots to help explain your changes.
|
||||
|
||||
## 🖥️ Environment
|
||||
|
||||
- **QQQ Orb Version**: [e.g. 2.1.0]
|
||||
- **CircleCI Version**: [e.g. 2.1]
|
||||
- **Operating System**: [e.g. macOS, Ubuntu, Windows]
|
||||
|
||||
## 📋 Checklist
|
||||
|
||||
- [ ] My code follows the project's style guidelines
|
||||
- [ ] I have performed a self-review of my own code
|
||||
- [ ] I have commented my code, particularly in hard-to-understand areas
|
||||
- [ ] I have made corresponding changes to the documentation
|
||||
- [ ] My changes generate no new warnings
|
||||
- [ ] I have added tests that prove my fix is effective or that my feature works
|
||||
- [ ] New and existing unit tests pass locally with my changes
|
||||
- [ ] Any dependent changes have been merged and published
|
||||
|
||||
## 🚀 Deployment Notes
|
||||
|
||||
Any special deployment considerations or notes.
|
||||
|
||||
## 📝 Additional Notes
|
||||
|
||||
Any additional information that reviewers should know.
|
||||
|
||||
---
|
||||
|
||||
**Note**: This repository is a component of the QQQ framework. For general QQQ changes, please use the [main QQQ repository](https://github.com/Kingsrook/qqq).
|
||||
@@ -0,0 +1,56 @@
|
||||
# Changelog
|
||||
|
||||
All notable changes to QQQ Orb will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Added
|
||||
- Comprehensive README with detailed usage examples
|
||||
- CONTRIBUTING.md with development guidelines
|
||||
- SECURITY.md with security policy and reporting procedures
|
||||
- CHANGELOG.md for tracking changes
|
||||
|
||||
### Changed
|
||||
- Updated README to follow QQQ framework standards
|
||||
- Enhanced documentation structure and organization
|
||||
|
||||
## [2.1] - 2024-01-XX
|
||||
|
||||
### Added
|
||||
- Multi-platform support for Maven and Node.js projects
|
||||
- GitFlow integration with automated version management
|
||||
- Comprehensive testing framework with coverage reporting
|
||||
- Automated publishing to Maven Central and npm registries
|
||||
- Shell script automation and utilities
|
||||
- Documentation generation and publishing
|
||||
|
||||
### Changed
|
||||
- Improved orb structure and organization
|
||||
- Enhanced error handling and validation
|
||||
- Updated dependencies and security patches
|
||||
|
||||
### Fixed
|
||||
- Various bug fixes and stability improvements
|
||||
|
||||
## [2.0] - 2023-XX-XX
|
||||
|
||||
### Added
|
||||
- Initial CircleCI orb implementation
|
||||
- Basic Maven project support
|
||||
- Core CI/CD workflows
|
||||
|
||||
### Changed
|
||||
- Migrated from custom CI/CD to CircleCI orbs
|
||||
|
||||
## [1.x] - 2022-XX-XX
|
||||
|
||||
### Added
|
||||
- Legacy CI/CD implementation
|
||||
- Basic automation scripts
|
||||
|
||||
---
|
||||
|
||||
**Note**: For detailed release information and breaking changes, see the [QQQ Wiki](https://github.com/Kingsrook/qqq/wiki).
|
||||
@@ -0,0 +1,86 @@
|
||||
# Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.
|
||||
|
||||
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to a positive environment for our community include:
|
||||
|
||||
- **Being respectful and inclusive** of differing viewpoints and experiences
|
||||
- **Accepting constructive criticism** gracefully
|
||||
- **Focusing on what is best** for the community
|
||||
- **Showing empathy** towards other community members
|
||||
- **Being collaborative** and helping others learn and grow
|
||||
- **Using welcoming and inclusive language** in all interactions
|
||||
|
||||
Examples of unacceptable behavior include:
|
||||
|
||||
- **Harassment** in any form, including sexual harassment
|
||||
- **Trolling, insulting, or derogatory comments** and personal or political attacks
|
||||
- **Public or private harassment** of any kind
|
||||
- **Publishing others' private information** without explicit permission
|
||||
- **Conduct that could reasonably be considered inappropriate** in a professional setting
|
||||
- **Dismissing or attacking inclusion-oriented requests** or concerns
|
||||
|
||||
## Enforcement Responsibilities
|
||||
|
||||
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
|
||||
|
||||
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned with this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at **conduct@kingsrook.com**. All complaints will be reviewed and investigated promptly and fairly.
|
||||
|
||||
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
|
||||
|
||||
## Enforcement Guidelines
|
||||
|
||||
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
|
||||
|
||||
### 1. Correction
|
||||
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
|
||||
|
||||
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
|
||||
|
||||
### 2. Warning
|
||||
**Community Impact**: A violation through a single incident or series of actions.
|
||||
|
||||
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
|
||||
|
||||
### 3. Temporary Ban
|
||||
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
|
||||
|
||||
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
|
||||
|
||||
### 4. Permanent Ban
|
||||
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
|
||||
|
||||
**Consequence**: A permanent ban from any sort of public interaction within the community.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html](https://www.contributor-covenant.org/version/2/1/code_of_conduct.html).
|
||||
|
||||
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
|
||||
|
||||
For answers to common questions about this code of conduct, see the FAQ at [https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq). Translations are available at [https://www.contributor-covenant.org/translations](https://www.contributor-covenant.org/translations).
|
||||
|
||||
## Contact Information
|
||||
|
||||
- **Code of Conduct Issues**: conduct@kingsrook.com
|
||||
- **General Contact**: contact@kingsrook.com
|
||||
- **Company**: Kingsrook, LLC
|
||||
- **Website**: https://qrun.io
|
||||
|
||||
---
|
||||
|
||||
**Thank you for helping create a welcoming and inclusive community!** 🌟
|
||||
+307
@@ -0,0 +1,307 @@
|
||||
# Code Style Guide
|
||||
|
||||
This document outlines the coding standards and style guidelines for QQQ Orb development.
|
||||
|
||||
## 🎯 Overview
|
||||
|
||||
QQQ Orb follows consistent coding standards to ensure maintainability, readability, and reliability across all components.
|
||||
|
||||
## 📁 File Organization
|
||||
|
||||
### Directory Structure
|
||||
|
||||
```
|
||||
src/
|
||||
├── @orb.yml # Main orb definition
|
||||
├── commands/ # Reusable commands
|
||||
├── jobs/ # Complete workflow jobs
|
||||
├── scripts/ # Shell scripts
|
||||
├── executors/ # Execution environments
|
||||
└── examples/ # Usage examples
|
||||
```
|
||||
|
||||
### Naming Conventions
|
||||
|
||||
- **Files**: Use lowercase with underscores (`mvn_build.yml`)
|
||||
- **Directories**: Use lowercase with underscores (`commands/`)
|
||||
- **Variables**: Use uppercase with underscores (`MAVEN_USERNAME`)
|
||||
- **Functions**: Use lowercase with underscores (`calculate_version`)
|
||||
|
||||
## 🔧 YAML Configuration
|
||||
|
||||
### General Guidelines
|
||||
|
||||
- **Indentation**: Use 2 spaces (no tabs)
|
||||
- **Line Length**: Maximum 120 characters
|
||||
- **Quotes**: Use single quotes for strings when possible
|
||||
- **Comments**: Use `#` for comments, explain complex logic
|
||||
|
||||
### Orb Definition Structure
|
||||
|
||||
```yaml
|
||||
# @orb.yml
|
||||
version: 2.1
|
||||
|
||||
description: >
|
||||
Brief description of the orb's purpose.
|
||||
|
||||
display:
|
||||
home_url: "https://www.qrun.io"
|
||||
source_url: "https://github.com/Kingsrook/qqq-orb"
|
||||
|
||||
orbs:
|
||||
dependency-orb: circleci/dependency@1.0.0
|
||||
```
|
||||
|
||||
### Command Structure
|
||||
|
||||
```yaml
|
||||
# commands/example_command.yml
|
||||
description: "Brief description of what this command does"
|
||||
|
||||
parameters:
|
||||
param1:
|
||||
type: string
|
||||
default: "default_value"
|
||||
description: "Parameter description"
|
||||
|
||||
steps:
|
||||
- run:
|
||||
name: "Step Name"
|
||||
command: |
|
||||
echo "Command content"
|
||||
# Additional commands
|
||||
```
|
||||
|
||||
### Job Structure
|
||||
|
||||
```yaml
|
||||
# jobs/example_job.yml
|
||||
description: "Brief description of what this job does"
|
||||
|
||||
executor: default
|
||||
|
||||
parameters:
|
||||
param1:
|
||||
type: string
|
||||
default: "default_value"
|
||||
description: "Parameter description"
|
||||
|
||||
steps:
|
||||
- checkout
|
||||
- qqq-orb/example-command:
|
||||
param1: << parameters.param1 >>
|
||||
```
|
||||
|
||||
## 🐚 Shell Scripts
|
||||
|
||||
### General Guidelines
|
||||
|
||||
- **Shebang**: Always use `#!/bin/bash`
|
||||
- **Error Handling**: Use `set -euo pipefail`
|
||||
- **Variables**: Use `readonly` for constants
|
||||
- **Functions**: Use descriptive names and document parameters
|
||||
|
||||
### Script Template
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
# Script description
|
||||
# Usage: script_name [options] [arguments]
|
||||
|
||||
readonly SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
readonly SCRIPT_NAME="$(basename "$0")"
|
||||
|
||||
# Function documentation
|
||||
# Parameters: $1 - description, $2 - description
|
||||
function example_function() {
|
||||
local param1="$1"
|
||||
local param2="$2"
|
||||
|
||||
# Function implementation
|
||||
echo "Processing: $param1, $param2"
|
||||
}
|
||||
|
||||
# Main execution
|
||||
main() {
|
||||
# Main logic here
|
||||
example_function "value1" "value2"
|
||||
}
|
||||
|
||||
# Run main function if script is executed directly
|
||||
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
|
||||
main "$@"
|
||||
fi
|
||||
```
|
||||
|
||||
### Error Handling
|
||||
|
||||
```bash
|
||||
# Check if command exists
|
||||
if ! command -v mvn &> /dev/null; then
|
||||
echo "Error: Maven is not installed" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if file exists
|
||||
if [[ ! -f "pom.xml" ]]; then
|
||||
echo "Error: pom.xml not found" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Handle command failures
|
||||
if ! mvn clean compile; then
|
||||
echo "Error: Maven compilation failed" >&2
|
||||
exit 1
|
||||
fi
|
||||
```
|
||||
|
||||
## 📝 Documentation
|
||||
|
||||
### README Structure
|
||||
|
||||
- **Title**: Clear, descriptive title
|
||||
- **Badges**: Status badges for version, license, etc.
|
||||
- **Overview**: Brief description of purpose
|
||||
- **Quick Start**: Getting started instructions
|
||||
- **Usage**: Detailed usage examples
|
||||
- **Development**: Development setup and guidelines
|
||||
- **Contributing**: Contribution guidelines
|
||||
- **License**: License information
|
||||
|
||||
### Inline Documentation
|
||||
|
||||
```yaml
|
||||
# commands/mvn_build.yml
|
||||
description: >
|
||||
Builds a Maven project with specified goals.
|
||||
Supports multi-module projects and custom settings.
|
||||
|
||||
parameters:
|
||||
goals:
|
||||
type: string
|
||||
default: "clean compile"
|
||||
description: >
|
||||
Maven goals to execute.
|
||||
Common values: clean, compile, test, package, install
|
||||
```
|
||||
|
||||
### Shell Script Documentation
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
# Script: calculate_version.sh
|
||||
# Description: Calculates semantic version based on GitFlow branch
|
||||
# Usage: calculate_version.sh [branch_name]
|
||||
# Parameters:
|
||||
# branch_name - Git branch name (optional, defaults to current branch)
|
||||
# Returns: Semantic version string
|
||||
```
|
||||
|
||||
## 🧪 Testing Standards
|
||||
|
||||
### Test Structure
|
||||
|
||||
- **Unit Tests**: Test individual functions and commands
|
||||
- **Integration Tests**: Test complete workflows
|
||||
- **Validation Tests**: Test orb configuration and packing
|
||||
|
||||
### Test Naming
|
||||
|
||||
- **Test Files**: `test_<component>.yml`
|
||||
- **Test Functions**: `test_<function_name>`
|
||||
- **Test Descriptions**: Clear, descriptive test names
|
||||
|
||||
### Coverage Requirements
|
||||
|
||||
- **Commands**: All parameters and error conditions
|
||||
- **Jobs**: All workflow paths and error handling
|
||||
- **Scripts**: All functions and error conditions
|
||||
|
||||
## 🔍 Code Review Standards
|
||||
|
||||
### Review Checklist
|
||||
|
||||
- [ ] **Functionality**: Code works as intended
|
||||
- [ ] **Style**: Follows project style guidelines
|
||||
- [ ] **Documentation**: Adequate documentation and comments
|
||||
- [ ] **Testing**: Appropriate test coverage
|
||||
- [ ] **Security**: No security vulnerabilities
|
||||
- [ ] **Performance**: Efficient implementation
|
||||
- [ ] **Maintainability**: Code is maintainable and readable
|
||||
|
||||
### Review Process
|
||||
|
||||
1. **Self Review**: Author reviews their own code first
|
||||
2. **Peer Review**: At least one peer review required
|
||||
3. **Testing**: All tests must pass
|
||||
4. **Documentation**: Documentation updated as needed
|
||||
5. **Approval**: Required approvals before merge
|
||||
|
||||
## 🛠️ Development Tools
|
||||
|
||||
### Required Tools
|
||||
|
||||
- **CircleCI CLI**: For orb development and validation
|
||||
- **ShellCheck**: For shell script linting
|
||||
- **yamllint**: For YAML linting
|
||||
- **Git**: For version control
|
||||
|
||||
### IDE Configuration
|
||||
|
||||
#### VS Code
|
||||
|
||||
```json
|
||||
{
|
||||
"editor.tabSize": 2,
|
||||
"editor.insertSpaces": true,
|
||||
"editor.rulers": [120],
|
||||
"files.trimTrailingWhitespace": true,
|
||||
"files.insertFinalNewline": true,
|
||||
"yaml.schemas": {
|
||||
"https://json.schemastore.org/circle-ci-config.json": ".circleci/config.yml"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### IntelliJ IDEA
|
||||
|
||||
- **Code Style**: Use project code style settings
|
||||
- **File Templates**: Use project file templates
|
||||
- **Inspections**: Enable all relevant inspections
|
||||
|
||||
## 📋 Best Practices
|
||||
|
||||
### General Principles
|
||||
|
||||
- **DRY**: Don't Repeat Yourself
|
||||
- **KISS**: Keep It Simple, Stupid
|
||||
- **YAGNI**: You Aren't Gonna Need It
|
||||
- **SOLID**: Follow SOLID principles where applicable
|
||||
|
||||
### Security Considerations
|
||||
|
||||
- **Secrets**: Never commit secrets or credentials
|
||||
- **Input Validation**: Validate all inputs
|
||||
- **Error Handling**: Don't expose sensitive information in errors
|
||||
- **Dependencies**: Keep dependencies up to date
|
||||
|
||||
### Performance Considerations
|
||||
|
||||
- **Efficiency**: Use efficient algorithms and data structures
|
||||
- **Caching**: Cache expensive operations when appropriate
|
||||
- **Parallelization**: Use parallel execution where beneficial
|
||||
- **Resource Usage**: Minimize resource consumption
|
||||
|
||||
## 🔗 Resources
|
||||
|
||||
- **CircleCI Orb Development**: https://circleci.com/docs/2.0/orb-author-intro/
|
||||
- **Shell Script Best Practices**: https://google.github.io/styleguide/shellguide.html
|
||||
- **YAML Best Practices**: https://yaml.org/spec/1.2/spec.html
|
||||
- **GitFlow Workflow**: https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow
|
||||
|
||||
---
|
||||
|
||||
**Remember**: Consistent code style improves maintainability and reduces bugs. When in doubt, follow existing patterns in the codebase.
|
||||
+136
@@ -0,0 +1,136 @@
|
||||
# Contributing to QQQ Orb
|
||||
|
||||
First off, thanks for taking the time to contribute! ❤️
|
||||
|
||||
QQQ Orb is **open source** and welcomes contributions from the community. This document provides a quick overview - for detailed guides, see our [Complete Documentation Wiki](https://github.com/Kingsrook/qqq/wiki).
|
||||
|
||||
## 🚀 Quick Start
|
||||
|
||||
**New to QQQ?** Start with our [Developer Onboarding Guide](https://github.com/Kingsrook/qqq/wiki/Developer-Onboarding) to get your environment set up.
|
||||
|
||||
## 📚 Documentation & Guides
|
||||
|
||||
All detailed information is in our [Wiki](https://github.com/Kingsrook/qqq/wiki):
|
||||
|
||||
- **[🏠 Home](https://github.com/Kingsrook/qqq/wiki/Home)** - Project overview
|
||||
- **[🔧 Development](https://github.com/Kingsrook/qqq/wiki/Developer-Onboarding)** - Complete setup guide
|
||||
- **[📝 Contribution Process](https://github.com/Kingsrook/qqq/wiki/Contribution-Guidelines)** - Detailed contribution workflow
|
||||
- **[🔍 Code Standards](https://github.com/Kingsrook/qqq/wiki/Code-Review-Standards)** - Coding standards and review process
|
||||
- **[🧪 Testing](https://github.com/Kingsrook/qqq/wiki/Testing)** - Testing strategy and requirements
|
||||
- **[🏗️ Architecture](https://github.com/Kingsrook/qqq/wiki/High-Level-Architecture)** - System design and principles
|
||||
|
||||
## 🤝 How to Contribute
|
||||
|
||||
### **1. Report Issues**
|
||||
Found a bug or have a feature request? [Create an issue](https://github.com/Kingsrook/qqq/issues).
|
||||
|
||||
### **2. Code Contributions**
|
||||
Want to contribute code? Follow our [Contribution Guidelines](https://github.com/Kingsrook/qqq/wiki/Contribution-Guidelines).
|
||||
|
||||
**Key Requirements:**
|
||||
- CircleCI CLI and orb development tools
|
||||
- Follow QQQ's [Code Review Standards](https://github.com/Kingsrook/qqq/wiki/Code-Review-Standards)
|
||||
- Meet testing coverage requirements
|
||||
- Use conventional commit messages
|
||||
- Validate orb configuration with `make lint`
|
||||
|
||||
### **3. Documentation**
|
||||
Improve our docs by updating the [Wiki](https://github.com/Kingsrook/qqq/wiki) or suggesting improvements via issues.
|
||||
|
||||
## 🔧 Development Setup
|
||||
|
||||
**Prerequisites:**
|
||||
- **macOS** (QQQ dev tools are macOS-optimized)
|
||||
- **CircleCI CLI** for orb development
|
||||
- **ShellCheck** and **yamllint** for linting
|
||||
- **Git** with SSH access
|
||||
|
||||
**Quick Setup:**
|
||||
```bash
|
||||
# Install CircleCI CLI
|
||||
curl -fLSs https://raw.githubusercontent.com/CircleCI-Public/circleci-cli/main/install.sh | sudo bash
|
||||
|
||||
# Install linting tools (macOS)
|
||||
brew install shellcheck yamllint
|
||||
|
||||
# Clone the repository
|
||||
git clone git@github.com:Kingsrook/qqq.git
|
||||
cd qqq/qqq-orb
|
||||
|
||||
# Run development workflow
|
||||
make dev
|
||||
```
|
||||
|
||||
For complete setup instructions, see [Developer Onboarding](https://github.com/Kingsrook/qqq/wiki/Developer-Onboarding).
|
||||
|
||||
## 📋 Contribution Checklist
|
||||
|
||||
Before submitting your contribution:
|
||||
|
||||
- [ ] **Environment**: Development environment properly set up
|
||||
- [ ] **Code Style**: Follows QQQ's [Code Review Standards](https://github.com/Kingsrook/qqq/wiki/Code-Review-Standards)
|
||||
- [ ] **Testing**: All tests pass with `make test`
|
||||
- [ ] **Linting**: All linting checks pass with `make lint`
|
||||
- [ ] **Documentation**: Updated relevant wiki pages
|
||||
- [ ] **Commit Messages**: Follow conventional commit format
|
||||
- [ ] **Orb Validation**: Orb packs and validates successfully
|
||||
|
||||
## 🧪 Testing
|
||||
|
||||
### Running Tests
|
||||
|
||||
```bash
|
||||
# Run all tests
|
||||
make test
|
||||
|
||||
# Run linting checks
|
||||
make lint
|
||||
|
||||
# Validate orb configuration
|
||||
make validate
|
||||
|
||||
# Development workflow
|
||||
make dev
|
||||
```
|
||||
|
||||
### Test Coverage
|
||||
|
||||
The orb includes comprehensive testing:
|
||||
- **YAML Validation**: CircleCI orb configuration validation
|
||||
- **Shell Script Testing**: ShellCheck for shell script validation
|
||||
- **Orb Packing**: Tests orb packing and resolution
|
||||
- **Integration Testing**: End-to-end workflow testing
|
||||
|
||||
## 📦 Publishing
|
||||
|
||||
### Development Publishing
|
||||
|
||||
```bash
|
||||
# Publish snapshot for testing
|
||||
make publish-snapshot
|
||||
```
|
||||
|
||||
### Production Publishing
|
||||
|
||||
```bash
|
||||
# Publish production release
|
||||
make publish-release
|
||||
```
|
||||
|
||||
## 🆘 Getting Help
|
||||
|
||||
- **📖 [Wiki](https://github.com/Kingsrook/qqq/wiki)**: Start here for comprehensive guides
|
||||
- **🐛 [Issues](https://github.com/Kingsrook/qqq/issues)**: Search existing issues or create new ones
|
||||
- **💬 [Discussions](https://github.com/Kingsrook/qqq/discussions)**: Ask questions and get help
|
||||
|
||||
## 📄 Legal Notice
|
||||
|
||||
When contributing to this project, you must agree that you have authored 100% of the content, that you have the necessary rights to the content, and that the content you contribute may be provided under the project license.
|
||||
|
||||
## 🏢 About Kingsrook
|
||||
|
||||
QQQ Orb is built by **[Kingsrook](https://qrun.io)** - making engineers more productive through intelligent automation and developer tools.
|
||||
|
||||
---
|
||||
|
||||
**Ready to contribute?** [Start with our Developer Onboarding Guide](https://github.com/Kingsrook/qqq/wiki/Developer-Onboarding)!
|
||||
@@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2023 <organization>
|
||||
Copyright (c) 2021-2024 Kingsrook, LLC
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -1,8 +1,51 @@
|
||||
# QQQ Orb
|
||||
|
||||
CircleCI orb for Maven projects using GitFlow. Provides automated building, testing, version management, and Maven Central publishing.
|
||||
[](https://circleci.com/developer/orbs/orb/kingsrook/qqq-orb)
|
||||
[](https://circleci.com/developer/orbs/orb/kingsrook/qqq-orb)
|
||||
[](LICENSE)
|
||||
|
||||
## Quick Start
|
||||
> **CircleCI Orb for QQQ Framework Projects**
|
||||
|
||||
CircleCI orb for Maven and Node.js projects using GitFlow. Provides automated building, testing, version management, and publishing to Maven Central and npm registries.
|
||||
|
||||
## 🚀 Overview
|
||||
|
||||
QQQ Orb is a **CircleCI orb** that provides standardized CI/CD workflows for projects in the QQQ ecosystem. It handles the complete development lifecycle from building and testing to publishing releases.
|
||||
|
||||
### What This Repository Contains
|
||||
|
||||
- **CircleCI Orb**: Reusable CI/CD workflows and commands
|
||||
- **GitFlow Integration**: Automated branching and version management
|
||||
- **Multi-Platform Support**: Maven (Java) and npm (Node.js) project support
|
||||
- **Publishing Automation**: Automated publishing to Maven Central and npm
|
||||
- **Testing Framework**: Comprehensive testing with coverage reporting
|
||||
|
||||
### What This Repository Does NOT Contain
|
||||
|
||||
- **QQQ Framework**: The actual low-code engine and backend
|
||||
- **Application Code**: Business logic or application-specific code
|
||||
- **Runtime Dependencies**: Libraries or frameworks used by applications
|
||||
|
||||
## 🏗️ Architecture
|
||||
|
||||
### Technology Stack
|
||||
|
||||
- **CircleCI Orbs**: Reusable configuration components
|
||||
- **GitFlow**: Branching strategy for release management
|
||||
- **Maven**: Java project build and dependency management
|
||||
- **npm**: Node.js package management
|
||||
- **Shell Scripts**: Automation and utility scripts
|
||||
- **YAML**: Configuration and workflow definitions
|
||||
|
||||
### Core Capabilities
|
||||
|
||||
- **Automated Building**: Maven and npm project compilation
|
||||
- **Testing**: Unit tests, integration tests, and coverage reporting
|
||||
- **Version Management**: Automated semantic versioning based on GitFlow
|
||||
- **Publishing**: Maven Central and npm registry publishing
|
||||
- **Documentation**: Automated documentation generation and publishing
|
||||
|
||||
## 🚀 Quick Start
|
||||
|
||||
### Using the Orb
|
||||
|
||||
@@ -54,60 +97,59 @@ workflows:
|
||||
### Required Context
|
||||
|
||||
Set up `qqq-maven-registry-credentials` context in CircleCI:
|
||||
- `MAVEN_USERNAME`, `MAVEN_PASSWORD`: Sonatype credentials
|
||||
- `GPG_PRIVATE_KEY_B64`, `GPG_KEYNAME`, `GPG_PASSPHRASE`: GPG signing
|
||||
- `GITHUB_TOKEN`: GitHub releases
|
||||
- `RDBMS_PASSWORD`: Database testing
|
||||
|
||||
| Variable | Description | Required For |
|
||||
|----------|-------------|--------------|
|
||||
| `MAVEN_USERNAME` | Sonatype username | Maven publishing |
|
||||
| `MAVEN_PASSWORD` | Sonatype password | Maven publishing |
|
||||
| `GPG_PRIVATE_KEY_B64` | Base64 encoded GPG private key | Maven signing |
|
||||
| `GPG_KEYNAME` | GPG key identifier | Maven signing |
|
||||
| `GPG_PASSPHRASE` | GPG passphrase | Maven signing |
|
||||
| `GITHUB_TOKEN` | GitHub API token | GitHub releases |
|
||||
| `RDBMS_PASSWORD` | Database password | Integration testing |
|
||||
|
||||
### Project Requirements
|
||||
|
||||
- `pom.xml` with `<revision>` property
|
||||
- `/tmp/circleci/mvn-settings.xml` (auto-generated if missing)
|
||||
- `docs/index.adoc` (optional, for documentation)
|
||||
- **Maven Projects**: `pom.xml` with `<revision>` property
|
||||
- **Node.js Projects**: `package.json` with version field
|
||||
- **Settings**: `/tmp/circleci/mvn-settings.xml` (auto-generated if missing)
|
||||
- **Documentation**: `docs/index.adoc` (optional, for documentation)
|
||||
|
||||
## Development
|
||||
## 📁 Repository Structure
|
||||
|
||||
### Prerequisites
|
||||
```bash
|
||||
# Install CircleCI CLI
|
||||
curl -fLSs https://raw.githubusercontent.com/CircleCI-Public/circleci-cli/main/install.sh | sudo bash
|
||||
|
||||
# Install linting tools
|
||||
brew install shellcheck yamllint # macOS
|
||||
```
|
||||
src/
|
||||
├── @orb.yml # Main orb definition
|
||||
├── commands/ # Reusable commands
|
||||
│ ├── mvn_build.yml # Maven build command
|
||||
│ ├── mvn_verify.yml # Maven test and verify
|
||||
│ ├── mvn_jar_deploy.yml # Maven deployment
|
||||
│ ├── node_build_package.yml # Node.js build and package
|
||||
│ ├── node_publish.yml # npm publishing
|
||||
│ └── ... # Additional commands
|
||||
├── jobs/ # Complete workflow jobs
|
||||
│ ├── mvn_publish.yml # Maven publishing workflow
|
||||
│ ├── mvn_test_only.yml # Maven testing workflow
|
||||
│ ├── node_publish.yml # npm publishing workflow
|
||||
│ └── node_test_only.yml # npm testing workflow
|
||||
├── scripts/ # Shell scripts
|
||||
│ ├── calculate_version.sh # Version calculation
|
||||
│ ├── mvn_build_compile.sh # Maven compilation
|
||||
│ ├── node_npm_auth.sh # npm authentication
|
||||
│ └── ... # Additional scripts
|
||||
├── executors/ # Execution environments
|
||||
│ └── default.yml # Default executor configuration
|
||||
└── examples/ # Usage examples
|
||||
└── build.yml # Example configuration
|
||||
```
|
||||
|
||||
### Commands
|
||||
```bash
|
||||
make pack # Pack orb (resolves <<include()>>)
|
||||
make validate # Validate packed orb
|
||||
make lint # Run all linting checks
|
||||
make dev # Pack + validate
|
||||
make clean # Clean build artifacts
|
||||
```
|
||||
## 🎯 Available Jobs
|
||||
|
||||
### Publishing
|
||||
```bash
|
||||
make publish-dev # Publish as kingsrook/qqq-orb@dev:alpha
|
||||
make publish # Publish as kingsrook/qqq-orb@X.Y.Z
|
||||
```
|
||||
|
||||
## Version Management
|
||||
|
||||
Automated version calculation based on branch:
|
||||
- `develop`: Minor bump (1.5.0-SNAPSHOT → 1.6.0-SNAPSHOT)
|
||||
- `release/1.5`: RC versions (1.5.0-RC.1, 1.5.0-RC.2, ...)
|
||||
- `main`: Stable release (1.5.0-RC.3 → 1.5.0) **requires v* tag**
|
||||
- `hotfix/1.5.1`: Patch bump (1.5.0 → 1.5.1)
|
||||
|
||||
**Main branch requires release tags**: `git tag -a v1.5.0 -m "Release 1.5.0" && git push origin v1.5.0`
|
||||
|
||||
## Available Jobs
|
||||
|
||||
| Job | Branch | Output |
|
||||
|-----|--------|--------|
|
||||
| `build` | Any | Compiled artifacts |
|
||||
| `test` | Any | Test results + JaCoCo |
|
||||
| `publish` | Any | Unified publishing based on branch_type parameter |
|
||||
| Job | Branch | Output | Description |
|
||||
|-----|--------|--------|-------------|
|
||||
| `build` | Any | Compiled artifacts | Build project without testing |
|
||||
| `test` | Any | Test results + JaCoCo | Run tests with coverage |
|
||||
| `publish` | Any | Published artifacts | Unified publishing based on branch_type |
|
||||
|
||||
### Publish Job Parameters
|
||||
|
||||
@@ -115,27 +157,82 @@ Automated version calculation based on branch:
|
||||
|-----------|------|---------|-------------|
|
||||
| `branch_type` | string | "snapshot" | Branch type: snapshot, release_candidate, release, hotfix |
|
||||
|
||||
## Repository Structure
|
||||
## 🔧 Development
|
||||
|
||||
```
|
||||
src/
|
||||
├── @orb.yml # Orb definition
|
||||
├── commands/ # Reusable commands
|
||||
├── jobs/ # Complete workflow jobs
|
||||
├── scripts/ # Shell scripts (<<include()>>)
|
||||
└── examples/ # Usage examples
|
||||
### Prerequisites
|
||||
|
||||
```bash
|
||||
# Install CircleCI CLI
|
||||
curl -fLSs https://raw.githubusercontent.com/CircleCI-Public/circleci-cli/main/install.sh | sudo bash
|
||||
|
||||
# Install linting tools (macOS)
|
||||
brew install shellcheck yamllint
|
||||
|
||||
# Install linting tools (Ubuntu/Debian)
|
||||
sudo apt-get install shellcheck yamllint
|
||||
```
|
||||
|
||||
## Project Links
|
||||
### Development Commands
|
||||
|
||||
- **Main Project**: [QQQ Framework](https://github.com/Kingsrook/qqq)
|
||||
- **Issues & Planning**: [QQQ Issues](https://github.com/Kingsrook/qqq/issues)
|
||||
- **Documentation**: [QQQ Docs](https://github.com/Kingsrook/qqq/tree/main/docs)
|
||||
- **CircleCI Registry**: [kingsrook/qqq-orb](https://circleci.com/developer/orbs/orb/kingsrook/qqq-orb)
|
||||
```bash
|
||||
make pack # Pack orb (resolves <<include()>>)
|
||||
make validate # Validate packed orb
|
||||
make lint # Run all linting checks
|
||||
make dev # Pack + validate
|
||||
make clean # Clean build artifacts
|
||||
```
|
||||
|
||||
## Usage Examples
|
||||
### Publishing Commands
|
||||
|
||||
```bash
|
||||
make publish-snapshot # Publish as kingsrook/qqq-orb@dev:snapshot
|
||||
make publish-release # Publish as kingsrook/qqq-orb@X.Y.Z
|
||||
```
|
||||
|
||||
## 📋 Version Management
|
||||
|
||||
Automated version calculation based on GitFlow branches:
|
||||
|
||||
| Branch Pattern | Version Change | Example |
|
||||
|----------------|----------------|---------|
|
||||
| `develop` | Minor bump | `1.5.0-SNAPSHOT` → `1.6.0-SNAPSHOT` |
|
||||
| `release/1.5` | RC versions | `1.5.0-RC.1`, `1.5.0-RC.2`, ... |
|
||||
| `main` | Stable release | `1.5.0-RC.3` → `1.5.0` **requires v* tag** |
|
||||
| `hotfix/1.5.1` | Patch bump | `1.5.0` → `1.5.1` |
|
||||
|
||||
**Main branch requires release tags**:
|
||||
```bash
|
||||
git tag -a v1.5.0 -m "Release 1.5.0"
|
||||
git push origin v1.5.0
|
||||
```
|
||||
|
||||
## 🧪 Testing
|
||||
|
||||
### Running Tests
|
||||
|
||||
```bash
|
||||
# Run all tests
|
||||
make test
|
||||
|
||||
# Run linting checks
|
||||
make lint
|
||||
|
||||
# Validate orb configuration
|
||||
make validate
|
||||
```
|
||||
|
||||
### Test Coverage
|
||||
|
||||
The orb includes comprehensive testing:
|
||||
- **YAML Validation**: CircleCI orb configuration validation
|
||||
- **Shell Script Testing**: ShellCheck for shell script validation
|
||||
- **Orb Packing**: Tests orb packing and resolution
|
||||
- **Integration Testing**: End-to-end workflow testing
|
||||
|
||||
## 📦 Usage Examples
|
||||
|
||||
### Maven Project (Backend Only)
|
||||
|
||||
**Backend only (default)**:
|
||||
```yaml
|
||||
jobs:
|
||||
- qqq-orb/publish:
|
||||
@@ -143,7 +240,8 @@ jobs:
|
||||
branch_type: snapshot
|
||||
```
|
||||
|
||||
**Release with GitHub release**:
|
||||
### Node.js Project (Frontend Only)
|
||||
|
||||
```yaml
|
||||
jobs:
|
||||
- qqq-orb/publish:
|
||||
@@ -151,6 +249,91 @@ jobs:
|
||||
branch_type: release
|
||||
```
|
||||
|
||||
## License
|
||||
### Hybrid Project (Maven + Node.js)
|
||||
|
||||
MIT License - see [LICENSE](LICENSE)
|
||||
```yaml
|
||||
jobs:
|
||||
- qqq-orb/publish:
|
||||
context: qqq-maven-registry-credentials
|
||||
branch_type: release_candidate
|
||||
```
|
||||
|
||||
## 🤝 Contributing
|
||||
|
||||
**Important**: This repository is a component of the QQQ framework. All contributions, issues, and discussions should go through the main QQQ repository.
|
||||
|
||||
### Development Workflow
|
||||
|
||||
1. **Fork the main QQQ repository**: https://github.com/Kingsrook/qqq
|
||||
2. **Create a feature branch**: `git checkout -b feature/amazing-feature`
|
||||
3. **Make your changes** (including orb changes if applicable)
|
||||
4. **Run tests**: `make test`
|
||||
5. **Commit your changes**: `git commit -m 'Add amazing feature'`
|
||||
6. **Push to the branch**: `git push origin feature/amazing-feature`
|
||||
7. **Open a Pull Request** to the main QQQ repository
|
||||
|
||||
### Code Standards
|
||||
|
||||
- **YAML**: Follow CircleCI orb best practices
|
||||
- **Shell Scripts**: Use ShellCheck for validation
|
||||
- **Documentation**: Update README and inline documentation
|
||||
- **Testing**: Comprehensive test coverage
|
||||
|
||||
## 📄 License
|
||||
|
||||
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
||||
|
||||
```
|
||||
QQQ Orb
|
||||
Copyright (C) 2021-2024 Kingsrook, LLC
|
||||
651 N Broad St Ste 205 # 6917 | Middletown DE 19709 | United States
|
||||
contact@kingsrook.com | https://github.com/Kingsrook/
|
||||
```
|
||||
|
||||
## 🆘 Support & Community
|
||||
|
||||
### ⚠️ Important: Use Main QQQ Repository
|
||||
|
||||
**All support, issues, discussions, and community interactions should go through the main QQQ repository:**
|
||||
|
||||
- **Main Repository**: https://github.com/Kingsrook/qqq
|
||||
- **Issues**: https://github.com/Kingsrook/qqq/issues
|
||||
- **Discussions**: https://github.com/Kingsrook/qqq/discussions
|
||||
- **Wiki**: https://github.com/Kingsrook/qqq/wiki
|
||||
|
||||
### Why This Repository Exists
|
||||
|
||||
This repository is maintained separately from the main QQQ repository to:
|
||||
- **Enable independent orb development** and versioning
|
||||
- **Allow orb-specific CI/CD** and deployment pipelines
|
||||
- **Provide clear separation** between orb and framework concerns
|
||||
- **Support different release cycles** for CI/CD tools vs. core framework
|
||||
|
||||
### Getting Help
|
||||
|
||||
- **Documentation**: Check the [QQQ Wiki](https://github.com/Kingsrook/qqq/wiki)
|
||||
- **Issues**: Report bugs and feature requests on [Main QQQ Issues](https://github.com/Kingsrook/qqq/issues)
|
||||
- **Discussions**: Join community discussions on [Main QQQ Discussions](https://github.com/Kingsrook/qqq/discussions)
|
||||
- **Questions**: Ask questions in the main QQQ repository
|
||||
|
||||
### Contact Information
|
||||
|
||||
- **Company**: Kingsrook, LLC
|
||||
- **Email**: contact@kingsrook.com
|
||||
- **Website**: https://qrun.io
|
||||
- **Main GitHub**: https://github.com/Kingsrook/qqq
|
||||
- **CircleCI Registry**: [kingsrook/qqq-orb](https://circleci.com/developer/orbs/orb/kingsrook/qqq-orb)
|
||||
|
||||
## 🙏 Acknowledgments
|
||||
|
||||
- **CircleCI Team**: For the excellent CI/CD platform and orb system
|
||||
- **Maven Team**: For the powerful Java build system
|
||||
- **npm Team**: For the Node.js package management system
|
||||
- **QQQ Framework Team**: For the underlying low-code platform
|
||||
- **Open Source Community**: For the tools and libraries that make this possible
|
||||
|
||||
---
|
||||
|
||||
**Built with ❤️ by the Kingsrook Team**
|
||||
|
||||
**This is a CI/CD component of the QQQ framework. For complete information, support, and community, visit: https://github.com/Kingsrook/qqq**
|
||||
+112
@@ -0,0 +1,112 @@
|
||||
# Security Policy
|
||||
|
||||
## Supported Versions
|
||||
|
||||
QQQ Orb follows semantic versioning and provides security updates for the following versions:
|
||||
|
||||
| Version | Supported | End of Life |
|
||||
| ------- | ------------------ | ----------- |
|
||||
| 2.1.x | :white_check_mark: | TBD |
|
||||
| 2.0.x | :white_check_mark: | TBD |
|
||||
| 1.x.x | :white_check_mark: | TBD |
|
||||
| < 1.0 | :x: | EOL |
|
||||
|
||||
**Note**: We recommend using the latest stable version for security updates.
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
**🚨 Security vulnerabilities should NEVER be reported publicly.**
|
||||
|
||||
If you discover a security vulnerability in QQQ Orb, please report it privately:
|
||||
|
||||
### **Email Security Reports**
|
||||
Send security reports to: **security@kingsrook.com**
|
||||
|
||||
### **What to Include**
|
||||
- **Description**: Clear description of the vulnerability
|
||||
- **Impact**: Potential impact on users and CI/CD systems
|
||||
- **Reproduction**: Steps to reproduce the issue
|
||||
- **Environment**: QQQ Orb version, CircleCI version, OS details
|
||||
- **Timeline**: If you need disclosure by a specific date
|
||||
|
||||
### **Response Timeline**
|
||||
- **Initial Response**: Within 24 hours
|
||||
- **Assessment**: Within 3 business days
|
||||
- **Update**: Regular updates on progress
|
||||
- **Resolution**: As quickly as possible based on severity
|
||||
|
||||
### **What Happens Next**
|
||||
1. **Acknowledgment**: We'll acknowledge receipt within 24 hours
|
||||
2. **Investigation**: Our security team will investigate the report
|
||||
3. **Assessment**: We'll assess the severity and impact
|
||||
4. **Fix Development**: Develop and test a security fix
|
||||
5. **Release**: Release a security update
|
||||
6. **Disclosure**: Public disclosure with credit (if requested)
|
||||
|
||||
## Security Best Practices
|
||||
|
||||
### **For Users**
|
||||
- **Keep Updated**: Always use the latest stable version
|
||||
- **Monitor Releases**: Watch for security advisories
|
||||
- **Report Issues**: Report any security concerns immediately
|
||||
- **Follow Guidelines**: Use QQQ Orb according to security best practices
|
||||
- **Secure Contexts**: Ensure CircleCI contexts contain only necessary secrets
|
||||
|
||||
### **For Contributors**
|
||||
- **Security Review**: All code changes undergo security review
|
||||
- **Dependency Scanning**: Regular vulnerability scanning of dependencies
|
||||
- **Secure Development**: Follow secure coding practices
|
||||
- **Testing**: Security testing is part of our development process
|
||||
- **Secret Management**: Never commit secrets or credentials
|
||||
|
||||
## Security Features
|
||||
|
||||
QQQ Orb includes several security features:
|
||||
|
||||
- **Input Validation**: Comprehensive input validation and sanitization
|
||||
- **Secret Management**: Secure handling of CI/CD secrets and credentials
|
||||
- **Audit Logging**: Comprehensive audit trails for CI/CD events
|
||||
- **Secure Defaults**: Secure-by-default configuration
|
||||
- **Dependency Scanning**: Regular scanning of orb dependencies
|
||||
|
||||
## Security Updates
|
||||
|
||||
### **Release Process**
|
||||
Security updates follow our standard [Release Flow](https://github.com/Kingsrook/qqq/wiki/Release-Flow):
|
||||
|
||||
1. **Security Fix**: Develop and test security fix
|
||||
2. **Release Branch**: Create release branch for security update
|
||||
3. **Testing**: Thorough testing of security fix
|
||||
4. **Release**: Release security update to users
|
||||
5. **Communication**: Notify users of security update
|
||||
|
||||
### **Update Notifications**
|
||||
- **GitHub Releases**: Security updates announced in release notes
|
||||
- **Security Advisories**: GitHub security advisories for critical issues
|
||||
- **Email Notifications**: Direct notifications for critical vulnerabilities
|
||||
- **CircleCI Registry**: Updated orb versions in CircleCI registry
|
||||
|
||||
## CI/CD Security Considerations
|
||||
|
||||
### **CircleCI Context Security**
|
||||
- **Minimal Permissions**: Use least-privilege access for contexts
|
||||
- **Secret Rotation**: Regularly rotate secrets and credentials
|
||||
- **Access Control**: Limit access to sensitive contexts
|
||||
- **Audit Logs**: Monitor context usage and access
|
||||
|
||||
### **Orb Security**
|
||||
- **Version Pinning**: Always pin specific orb versions
|
||||
- **Source Verification**: Verify orb source and integrity
|
||||
- **Regular Updates**: Keep orb versions up to date
|
||||
- **Security Scanning**: Scan orb dependencies regularly
|
||||
|
||||
## Contact Information
|
||||
|
||||
- **Security Email**: security@kingsrook.com
|
||||
- **General Contact**: contact@kingsrook.com
|
||||
- **Company**: Kingsrook, LLC
|
||||
- **Website**: https://qrun.io
|
||||
|
||||
---
|
||||
|
||||
**Thank you for helping keep QQQ Orb secure!** 🛡️
|
||||
@@ -5,7 +5,7 @@ description: >
|
||||
usage:
|
||||
version: 2.1
|
||||
orbs:
|
||||
qqq-orb: kingsrook/qqq-orb@2.1
|
||||
qqq-orb: kingsrook/qqq-orb@0.3.1
|
||||
|
||||
workflows:
|
||||
# Test workflow for feature branches
|
||||
|
||||
@@ -10,6 +10,14 @@ parameters:
|
||||
type: string
|
||||
default: "snapshot"
|
||||
description: "Branch type: snapshot, release_candidate, release, or hotfix"
|
||||
check_middleware_api_versions:
|
||||
type: boolean
|
||||
default: false
|
||||
description: "Whether to run middleware API version checks"
|
||||
publish_asciidoc:
|
||||
type: boolean
|
||||
default: false
|
||||
description: "Whether to publish AsciiDoc documentation"
|
||||
|
||||
steps:
|
||||
- checkout
|
||||
@@ -18,7 +26,10 @@ steps:
|
||||
- attach_workspace:
|
||||
at: .
|
||||
- mvn_verify
|
||||
- check_middleware_api_versions
|
||||
- when:
|
||||
condition: << parameters.check_middleware_api_versions >>
|
||||
steps:
|
||||
- check_middleware_api_versions
|
||||
- mvn_jar_deploy
|
||||
- when:
|
||||
condition:
|
||||
@@ -27,4 +38,7 @@ steps:
|
||||
- equal: ["release_candidate", << parameters.branch_type >>]
|
||||
steps:
|
||||
- git_operations
|
||||
- publish_asciidoc
|
||||
- when:
|
||||
condition: << parameters.publish_asciidoc >>
|
||||
steps:
|
||||
- publish_asciidoc
|
||||
@@ -6,8 +6,17 @@ description: >
|
||||
|
||||
executor: localstack/default
|
||||
|
||||
parameters:
|
||||
check_middleware_api_versions:
|
||||
type: boolean
|
||||
default: false
|
||||
description: "Whether to run middleware API version checks"
|
||||
|
||||
steps:
|
||||
- checkout
|
||||
- mvn_build
|
||||
- mvn_verify
|
||||
- check_middleware_api_versions
|
||||
- when:
|
||||
condition: << parameters.check_middleware_api_versions >>
|
||||
steps:
|
||||
- check_middleware_api_versions
|
||||
@@ -37,10 +37,21 @@ elif [[ "$CURRENT_BRANCH" == "develop" ]]; then
|
||||
TARGET_VERSION="$MAJOR_MINOR.$NEW_PATCH-SNAPSHOT"
|
||||
echo "Develop branch detected - targeting snapshot version: $TARGET_VERSION"
|
||||
elif [[ "$CURRENT_BRANCH" == release/* ]]; then
|
||||
# Release branch - should be a release candidate (e.g., 1.0.0-RC.1)
|
||||
# Release branch - should be a release candidate (e.g., 1.0.0-RC.1, 1.0.0-RC.2, etc.)
|
||||
RELEASE_VERSION=$(echo "$CURRENT_BRANCH" | sed 's/release\///')
|
||||
TARGET_VERSION="$RELEASE_VERSION-RC.1"
|
||||
echo "Release branch detected - targeting RC version: $TARGET_VERSION"
|
||||
|
||||
# Check if current version is already an RC for this release
|
||||
if [[ "$NPM_VERSION" =~ ^$RELEASE_VERSION-RC\.([0-9]+)$ ]]; then
|
||||
# Increment existing RC number
|
||||
CURRENT_RC=${BASH_REMATCH[1]}
|
||||
NEW_RC=$((CURRENT_RC + 1))
|
||||
TARGET_VERSION="$RELEASE_VERSION-RC.$NEW_RC"
|
||||
echo "Release branch detected - incrementing RC from $NPM_VERSION to $TARGET_VERSION"
|
||||
else
|
||||
# First RC for this release
|
||||
TARGET_VERSION="$RELEASE_VERSION-RC.1"
|
||||
echo "Release branch detected - creating first RC: $TARGET_VERSION"
|
||||
fi
|
||||
elif [[ "$CURRENT_BRANCH" == hotfix/* ]]; then
|
||||
# Hotfix branch - should be a patch version (e.g., 1.0.1)
|
||||
HOTFIX_VERSION=$(echo "$CURRENT_BRANCH" | sed 's/hotfix\///')
|
||||
|
||||
Reference in new issue
Block a user