Skip to content

Commit e4dc8e1

Browse files
Copilotfasaxc
andcommitted
Add product flavors and documentation workflow to copilot instructions
Co-authored-by: fasaxc <469264+fasaxc@users.noreply.github.com>
1 parent 487b55d commit e4dc8e1

File tree

1 file changed

+78
-3
lines changed

1 file changed

+78
-3
lines changed

.github/copilot-instructions.md

Lines changed: 78 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,78 @@ This repository contains the documentation sites for Calico (Open Source), Calic
1010
- **Build System**: Combination of Makefile targets and Yarn scripts
1111
- **Deployment**: Netlify with preview builds for PRs
1212

13+
## Product Flavors and Documentation Workflow
14+
15+
### Three Calico Product Flavors
16+
This repository documents three distinct flavors of Project Calico:
17+
18+
1. **Calico Open Source** (`calico/` directory)
19+
- The upstream open source project
20+
- Base functionality for container and Kubernetes networking and security
21+
22+
2. **Calico Enterprise** (`calico-enterprise/` directory)
23+
- Commercial offering with additional enterprise features
24+
- Builds upon Calico Open Source functionality
25+
26+
3. **Calico Cloud** (`calico-cloud/` directory)
27+
- SaaS derivative of Calico Enterprise
28+
- Managed service offering hosted by Tigera
29+
30+
### Feature Flow and Relationships
31+
- **Feature Flow**: New features typically flow from Open Source → Enterprise → Cloud
32+
- **Exception**: The `calicoctl` command-line tool is **not used** with Calico Cloud
33+
- **Documentation Impact**: When documenting new OSS features, they should also be added to `calico-enterprise/` and `calico-cloud/` directories (unless specifically excluded like calicoctl)
34+
35+
### Versioned vs Unversioned Documentation Structure
36+
The repository contains both versioned and unversioned documentation **on the same `main` branch**:
37+
38+
#### Unversioned Directories (Current Development)
39+
- `calico/` - Current development version of Calico OSS
40+
- `calico-enterprise/` - Current development version of Calico Enterprise
41+
- `calico-cloud/` - Current development version of Calico Cloud
42+
43+
#### Versioned Directories (Released Versions)
44+
- `calico_versioned_docs/` - Previous released versions of Calico OSS
45+
- `calico-enterprise_versioned_docs/` - Previous released versions of Calico Enterprise
46+
- `calico-cloud_versioned_docs/` - Previous released versions of Calico Cloud
47+
48+
### Documentation Workflow Guidelines
49+
50+
#### New Features
51+
- **Target**: Add to **unversioned directories** (`calico/`, `calico-enterprise/`, `calico-cloud/`)
52+
- **Multi-product**: New OSS features should typically be added to all three product directories
53+
- **Rationale**: These become the next release version
54+
55+
#### Backports and Bug Fixes
56+
- **Target**: Add to **versioned directories** (`*_versioned_docs/version-*`)
57+
- **Scope**: Only for fixes that need to be applied to already-released versions
58+
- **Rationale**: Updates existing released documentation
59+
60+
#### Release Process
61+
- At release time, unversioned docs are copied and converted into new versioned directories
62+
- The unversioned directories continue to represent the next development version
63+
64+
### "Next" Build System
65+
The build system uses "**next**" terminology to refer to unversioned documentation:
66+
67+
#### Next Build Targets
68+
```bash
69+
make build-next # Build unversioned "next" documentation
70+
make start-next # Start development server with next docs
71+
make serve-next # Build and serve next docs
72+
```
73+
74+
#### Next Documentation URLs
75+
When running the development server with next docs, access via:
76+
```
77+
http://localhost:3000/<product-flavor>/next/<path-to-specific-doc>
78+
```
79+
80+
Examples:
81+
- `http://localhost:3000/calico/next/getting-started/kubernetes/`
82+
- `http://localhost:3000/calico-enterprise/next/network-policy/`
83+
- `http://localhost:3000/calico-cloud/next/get-started/`
84+
1385
## Critical Setup Requirements
1486

1587
### Node.js Version (CRITICAL)
@@ -56,13 +128,16 @@ make build CONTAINERIZED=true
56128
make serve CONTAINERIZED=true
57129
```
58130

59-
### Special Development Modes
131+
### Next Version Development (Unversioned Docs)
60132
```bash
61-
# Build with unreleased documentation versions
62-
make serve-next # Quick start with next versions
133+
# Development with unreleased "next" documentation versions
134+
make start-next # Start dev server with next versions
135+
make serve-next # Quick build and serve next versions
63136
make build-next && make serve # Full build with next versions
64137
```
65138

139+
These commands build the unversioned documentation (from `calico/`, `calico-enterprise/`, `calico-cloud/` directories) rather than the versioned releases. Use these when working on new features or documentation for the next release.
140+
66141
## Testing Infrastructure
67142

68143
### Unit Tests (Jest)

0 commit comments

Comments
 (0)