@bluefly/openstandardagents 0.2.7 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.devfile.yaml +1 -1
- package/.env.example +1 -1
- package/.version.json +2 -2
- package/.wiki-config.json +24 -0
- package/CHANGELOG.md +11 -18
- package/CODEOWNERS +75 -0
- package/CONTRIBUTING.md +1 -1
- package/README.md +171 -243
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/repositories/schema.repository.d.ts +6 -1
- package/dist/repositories/schema.repository.d.ts.map +1 -1
- package/dist/repositories/schema.repository.js +49 -27
- package/dist/repositories/schema.repository.js.map +1 -1
- package/dist/services/migration.service.d.ts +4 -3
- package/dist/services/migration.service.d.ts.map +1 -1
- package/dist/services/migration.service.js +11 -10
- package/dist/services/migration.service.js.map +1 -1
- package/dist/services/release-automation/release.service.js +1 -1
- package/dist/services/release-automation/release.service.js.map +1 -1
- package/dist/services/release-automation/schemas/release.schema.js +1 -1
- package/dist/services/runtime/claude/claude-adapter.js +1 -1
- package/dist/services/runtime/claude/claude-adapter.js.map +1 -1
- package/dist/spec/v0.2.8/CHANGELOG.md +401 -0
- package/dist/spec/v0.2.8/README.md +72 -0
- package/dist/spec/v0.2.8/migrations/v0.2.3-to-v0.2.4.md +599 -0
- package/dist/spec/v0.2.8/migrations/v0.2.5-RC-to-v0.2.6.md +65 -0
- package/dist/spec/v0.2.8/migrations/v0.2.6-to-v0.2.8.md +81 -0
- package/{spec/v0.2.6-dev/ossa-0.2.5.schema.json → dist/spec/v0.2.8/ossa-0.2.8.schema.json} +1509 -52
- package/dist/spec/v0.2.8/ossa-0.2.8.yaml +581 -0
- package/dist/types/index.d.ts +3 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/index.d.ts +6 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +6 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/version.d.ts +68 -0
- package/dist/utils/version.d.ts.map +1 -0
- package/dist/utils/version.js +156 -0
- package/dist/utils/version.js.map +1 -0
- package/eslint-report.json +1 -0
- package/examples/adk-integration/code-review-workflow.yml +1 -1
- package/examples/adk-integration/customer-support.yml +1 -1
- package/examples/adk-integration/data-pipeline.yml +1 -1
- package/examples/advanced/workflows/hybrid-model-strategy.yaml +1 -1
- package/examples/agent-manifests/critics/critic-agent.yaml +1 -1
- package/examples/agent-manifests/governors/governor-agent.yaml +1 -1
- package/examples/agent-manifests/integrators/integrator-agent.yaml +1 -1
- package/examples/agent-manifests/judges/judge-agent.yaml +1 -1
- package/examples/agent-manifests/monitors/monitor-agent.yaml +1 -1
- package/examples/agent-manifests/orchestrators/orchestrator-agent.yaml +1 -1
- package/examples/agent-manifests/sample-compliant-agent.yaml +1 -1
- package/examples/agent-manifests/workers/worker-agent.yaml +1 -1
- package/examples/anthropic/claude-assistant.ossa.json +1 -1
- package/examples/autogen/multi-agent.ossa.json +1 -1
- package/examples/claude-code/code-reviewer.ossa.yaml +78 -0
- package/examples/claude-code/ossa-validator.ossa.yaml +80 -0
- package/examples/common_npm/agent-router.ossa.yaml +1 -0
- package/examples/common_npm/agent-router.v0.2.2.ossa.yaml +1 -1
- package/examples/crewai/research-team.ossa.json +1 -1
- package/examples/cursor/code-review-agent.ossa.json +1 -1
- package/examples/drupal/gitlab-ml-recommender.ossa.yaml +1 -0
- package/examples/drupal/gitlab-ml-recommender.v0.2.2.ossa.yaml +1 -1
- package/examples/extensions/drupal-v1.yml +1 -1
- package/examples/extensions/kagent-v1.yml +1 -1
- package/examples/getting-started/hello-world-complete.ossa.yaml +1 -1
- package/examples/integration-patterns/agent-to-agent-orchestration.ossa.yaml +4 -4
- package/examples/kagent/compliance-validator.ossa.yaml +1 -1
- package/examples/kagent/cost-optimizer.ossa.yaml +1 -1
- package/examples/kagent/documentation-agent.ossa.yaml +1 -1
- package/examples/kagent/k8s-troubleshooter-v1.ossa.yaml +1 -0
- package/examples/kagent/k8s-troubleshooter-v1.v0.2.2.ossa.yaml +1 -1
- package/examples/kagent/k8s-troubleshooter.ossa.yaml +1 -1
- package/examples/kagent/security-scanner.ossa.yaml +1 -1
- package/examples/langchain/chain-agent.ossa.json +1 -1
- package/examples/langflow/workflow-agent.ossa.json +1 -1
- package/examples/langgraph/state-machine-agent.ossa.json +1 -1
- package/examples/llamaindex/rag-agent.ossa.json +1 -1
- package/examples/migration-guides/from-langchain-to-ossa.yaml +4 -4
- package/examples/multi-agent/README.md +74 -0
- package/examples/multi-agent/conditional-router.ossa.yaml +42 -0
- package/examples/multi-agent/parallel-execution.ossa.yaml +54 -0
- package/examples/multi-agent/sequential-pipeline.ossa.yaml +45 -0
- package/examples/openai/basic-agent.ossa.yaml +1 -1
- package/examples/openai/multi-tool-agent.ossa.json +1 -1
- package/examples/openai/swarm-agent.ossa.json +1 -1
- package/examples/production/document-analyzer-openai.yml +1 -1
- package/examples/quickstart/support-agent.ossa.yaml +1 -1
- package/examples/spec-examples/audit-agent.yml +1 -1
- package/examples/spec-examples/chat-agent.yml +1 -1
- package/examples/spec-examples/compliance-agent.yml +1 -1
- package/examples/spec-examples/monitoring-agent.yml +1 -1
- package/examples/spec-examples/workflow-agent.yml +1 -1
- package/examples/templates/ossa-compliance.yaml +1 -1
- package/examples/vercel/edge-agent.ossa.json +1 -1
- package/gl-code-quality-report.json +62 -0
- package/llms-ctx-full.txt +39 -0
- package/llms-ctx.txt +39 -0
- package/llms.txt +47 -0
- package/package.json +3 -2
- package/scripts/eslint-to-codequality.cjs +34 -0
- package/scripts/generate-llms-ctx.sh +17 -0
- package/scripts/generate-schema-docs.ts +31 -10
- package/scripts/sync-version.js +4 -12
- package/scripts/validate-schema.ts +2 -1
- package/spec/v0.2.8/CHANGELOG.md +401 -0
- package/spec/v0.2.8/README.md +72 -0
- package/spec/v0.2.8/migrations/v0.2.3-to-v0.2.4.md +599 -0
- package/spec/v0.2.8/migrations/v0.2.5-RC-to-v0.2.6.md +65 -0
- package/spec/v0.2.8/migrations/v0.2.6-to-v0.2.8.md +81 -0
- package/{dist/spec/v0.2.6-dev/ossa-0.2.5.schema.json → spec/v0.2.8/ossa-0.2.8.schema.json} +1509 -52
- package/spec/v0.2.8/ossa-0.2.8.yaml +581 -0
- package/test-results/junit.xml +299 -0
- package/bin/validate-ossa-0.2.5-RC.ts +0 -244
- package/dist/spec/v0.2.6-dev/ossa-0.2.6-dev.schema.json +0 -1696
- package/scripts/lib/exec.ts +0 -37
- package/scripts/lib/file-ops.ts +0 -58
- package/scripts/lib/version.ts +0 -83
- package/spec/v0.2.6-dev/ossa-0.2.6-dev.schema.json +0 -1696
- package/website/.lighthouserc.ts +0 -24
- package/website/.prettierrc +0 -10
- package/website/DESIGN_SYSTEM_IMPLEMENTATION.md +0 -445
- package/website/Dockerfile +0 -30
- package/website/app/about/page.tsx +0 -304
- package/website/app/blog/[slug]/page.tsx +0 -208
- package/website/app/blog/page.tsx +0 -249
- package/website/app/design-guide/page.tsx +0 -511
- package/website/app/docs/[[...slug]]/page.tsx +0 -847
- package/website/app/docs/core-concepts/project-structure/page.tsx +0 -349
- package/website/app/ecosystem/page.tsx +0 -410
- package/website/app/examples/page.tsx +0 -133
- package/website/app/globals.scss +0 -370
- package/website/app/layout.tsx +0 -106
- package/website/app/license/page.tsx +0 -183
- package/website/app/not-found.tsx +0 -18
- package/website/app/page.tsx +0 -686
- package/website/app/page.tsx.bak +0 -679
- package/website/app/page.tsx.bak2 +0 -649
- package/website/app/playground/page.tsx +0 -487
- package/website/app/robots.ts +0 -19
- package/website/app/rss.xml/route.ts +0 -74
- package/website/app/schema/page.tsx +0 -1001
- package/website/app/sitemap.ts +0 -56
- package/website/app/specification/page.tsx +0 -287
- package/website/components/InstallCommand.tsx +0 -96
- package/website/components/Logo.tsx +0 -97
- package/website/components/StructuredData.tsx +0 -65
- package/website/components/docs/DocsSearch.tsx +0 -104
- package/website/components/docs/DocsSidebar.tsx +0 -155
- package/website/components/docs/MarkdownContent.tsx +0 -401
- package/website/components/docs/VersionSelector.tsx +0 -105
- package/website/components/examples/ExamplesViewer.tsx +0 -293
- package/website/components/layout/Footer.tsx +0 -116
- package/website/components/layout/Header.tsx +0 -172
- package/website/components/schema/SchemaComponentsAccordion.tsx +0 -84
- package/website/components/schema/SchemaExplorer.tsx +0 -213
- package/website/components/ui/Badge.tsx +0 -82
- package/website/components/ui/Button.tsx +0 -116
- package/website/components/ui/Card.tsx +0 -167
- package/website/components/ui/Checkbox.tsx +0 -141
- package/website/components/ui/Input.tsx +0 -169
- package/website/components/ui/Radio.tsx +0 -141
- package/website/components/ui/Select.tsx +0 -182
- package/website/components/ui/Tag.tsx +0 -158
- package/website/components/ui/Textarea.tsx +0 -195
- package/website/components/ui/index.ts +0 -11
- package/website/content/blog/OpenAPI-AI-Agents-Standard.md +0 -285
- package/website/content/blog/Why-Formal-Standards-Matter-Now.md +0 -198
- package/website/content/blog/gitlab-kubernetes-agent-ecosystem.md +0 -286
- package/website/content/blog/introducing-ossa-framework.md +0 -328
- package/website/content/blog/ossa-production-results.md +0 -279
- package/website/content/blog/welcome-to-ossa.md +0 -43
- package/website/content/blog/why-ai-agents-need-open-standard.md +0 -98
- package/website/content/docs/00-home.md +0 -153
- package/website/content/docs/adapters/openai-adapter.md +0 -693
- package/website/content/docs/agents/catalog.md +0 -28
- package/website/content/docs/aiflow-framework-integration-with-ossa.md +0 -107
- package/website/content/docs/api-reference/index.md +0 -38
- package/website/content/docs/api-reference/ossa-core-api.md +0 -634
- package/website/content/docs/api-reference/ossa-registry-api.md +0 -515
- package/website/content/docs/api-reference/unified-agent-gateway.md +0 -599
- package/website/content/docs/architecture/execution-flow.md +0 -335
- package/website/content/docs/architecture/multi-agent-systems.md +0 -737
- package/website/content/docs/architecture/overview.md +0 -121
- package/website/content/docs/architecture/stack-integration.md +0 -461
- package/website/content/docs/changelog.md +0 -246
- package/website/content/docs/cli-reference/index.md +0 -111
- package/website/content/docs/cli-reference/ossa-agents.md +0 -70
- package/website/content/docs/cli-reference/ossa-export.md +0 -56
- package/website/content/docs/cli-reference/ossa-generate.md +0 -66
- package/website/content/docs/cli-reference/ossa-gitlab-agent.md +0 -57
- package/website/content/docs/cli-reference/ossa-import.md +0 -56
- package/website/content/docs/cli-reference/ossa-init.md +0 -57
- package/website/content/docs/cli-reference/ossa-migrate.md +0 -62
- package/website/content/docs/cli-reference/ossa-run.md +0 -66
- package/website/content/docs/cli-reference/ossa-schema.md +0 -57
- package/website/content/docs/cli-reference/ossa-setup.md +0 -57
- package/website/content/docs/cli-reference/ossa-validate.md +0 -66
- package/website/content/docs/configuration/index.md +0 -97
- package/website/content/docs/contributing.md +0 -599
- package/website/content/docs/deployment/github-mirroring.md +0 -924
- package/website/content/docs/documentation.md +0 -100
- package/website/content/docs/ecosystem/framework-support.md +0 -1361
- package/website/content/docs/ecosystem/overview.md +0 -366
- package/website/content/docs/errors/index.md +0 -10
- package/website/content/docs/examples/aiflow-framework-integration-with-ossa.md +0 -107
- package/website/content/docs/examples/catalog.md +0 -300
- package/website/content/docs/for-audiences/students-researchers.md +0 -122
- package/website/content/docs/getting-started/index.md +0 -92
- package/website/content/docs/getting-started/installation.md +0 -155
- package/website/content/docs/getting-started/running-agents.md +0 -309
- package/website/content/docs/getting-started.md +0 -91
- package/website/content/docs/integrations/aiflow.md +0 -104
- package/website/content/docs/integrations/drupal.md +0 -105
- package/website/content/docs/migration-guides/agent-schema-comparison.md +0 -232
- package/website/content/docs/migration-guides/anthropic-mcp-to-ossa.md +0 -1750
- package/website/content/docs/migration-guides/crewai-to-ossa.md +0 -274
- package/website/content/docs/migration-guides/drupal-eca-to-ossa.md +0 -2017
- package/website/content/docs/migration-guides/general-agent-schema.yml +0 -247
- package/website/content/docs/migration-guides/index.md +0 -133
- package/website/content/docs/migration-guides/langchain-to-ossa.md +0 -1714
- package/website/content/docs/migration-guides/langflow-to-ossa.md +0 -2075
- package/website/content/docs/migration-guides/migration-manifest.json +0 -64
- package/website/content/docs/migration-guides/openai-to-ossa.md +0 -1202
- package/website/content/docs/openapi-extensions/examples.md +0 -550
- package/website/content/docs/openapi-extensions/index.md +0 -551
- package/website/content/docs/openapi-extensions/operation-extensions.md +0 -457
- package/website/content/docs/openapi-extensions/root-extensions.md +0 -410
- package/website/content/docs/ossa-compliant-badge.md +0 -251
- package/website/content/docs/pre-release/index.md +0 -175
- package/website/content/docs/quick-reference.md +0 -17
- package/website/content/docs/readme.md +0 -35
- package/website/content/docs/releases/v0.2.6.md +0 -99
- package/website/content/docs/schema-reference/agent-capabilities.md +0 -50
- package/website/content/docs/schema-reference/agent-id.md +0 -52
- package/website/content/docs/schema-reference/agent-name.md +0 -50
- package/website/content/docs/schema-reference/agent-role.md +0 -54
- package/website/content/docs/schema-reference/agent-spec.md +0 -406
- package/website/content/docs/schema-reference/agent-version.md +0 -50
- package/website/content/docs/schema-reference/autonomy.md +0 -568
- package/website/content/docs/schema-reference/constraints.md +0 -543
- package/website/content/docs/schema-reference/index.md +0 -45
- package/website/content/docs/schema-reference/llm-config.md +0 -445
- package/website/content/docs/schema-reference/observability.md +0 -654
- package/website/content/docs/schema-reference/ossa-manifest.md +0 -309
- package/website/content/docs/schema-reference/taxonomy.md +0 -509
- package/website/content/docs/schema-reference/tools.md +0 -628
- package/website/content/docs/templates/blog-post.md +0 -43
- package/website/content/docs/types-reference/index.md +0 -105
- package/website/content/docs/use-cases/00-index.md +0 -395
- package/website/content/docs/use-cases/cicd-code-review.md +0 -1236
- package/website/content/docs/use-cases/customer-support.md +0 -1234
- package/website/content/docs/use-cases/enterprise-compliance.md +0 -1208
- package/website/content/docs/use-cases/research-multi-agent.md +0 -1161
- package/website/content/docs/versioning.md +0 -288
- package/website/dev.sh +0 -53
- package/website/docker-compose.dev.yml +0 -36
- package/website/lib/version.ts +0 -35
- package/website/lib/versions.json +0 -103
- package/website/next.config.ts +0 -18
- package/website/nginx.conf +0 -32
- package/website/package-lock.json +0 -9679
- package/website/package.json +0 -59
- package/website/postcss.config.mjs +0 -9
- package/website/scripts/fetch-versions.js +0 -166
- package/website/scripts/generate-examples-index.js +0 -163
- package/website/scripts/merge-docs-to-wiki.ts +0 -207
- package/website/scripts/sync-version.js +0 -72
- package/website/scripts/sync-wiki.ts +0 -322
- package/website/scripts/upload-wiki.ts +0 -199
- package/website/styles/_spacing.scss +0 -453
- package/website/styles/_tokens.scss +0 -245
- package/website/styles/_typography.scss +0 -361
- package/website/styles/_variables.scss +0 -287
- package/website/tailwind.config.ts +0 -170
|
@@ -1,924 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "GitHub Mirroring Deployment Guide"
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# GitHub Mirroring Deployment Guide
|
|
6
|
-
|
|
7
|
-
## Overview
|
|
8
|
-
|
|
9
|
-
This guide documents the GitHub mirroring setup for the Open Standard Agents (OSSA) repository. The project uses a **dual-platform strategy** where GitLab serves as the primary development platform, and GitHub acts as a public mirror for broader community access and visibility.
|
|
10
|
-
|
|
11
|
-
### Why Mirror to GitHub?
|
|
12
|
-
|
|
13
|
-
- **Broader Reach**: GitHub has a larger developer community and better discoverability
|
|
14
|
-
- **Ecosystem Integration**: Many tools and services integrate better with GitHub
|
|
15
|
-
- **Redundancy**: Provides backup and alternative access to the repository
|
|
16
|
-
- **Community Engagement**: Easier for external contributors to discover and engage
|
|
17
|
-
- **Website Hosting**: GitHub Pages serves as the primary website host (openstandardagents.org)
|
|
18
|
-
|
|
19
|
-
### Architecture
|
|
20
|
-
|
|
21
|
-
```
|
|
22
|
-
┌─────────────────────────────────────────────────────────────┐
|
|
23
|
-
│ GitLab (Primary) │
|
|
24
|
-
│ - Source of truth for code │
|
|
25
|
-
│ - CI/CD pipeline orchestration │
|
|
26
|
-
│ - Merge requests and code review │
|
|
27
|
-
│ - Issue tracking and project management │
|
|
28
|
-
│ - NPM package publishing │
|
|
29
|
-
│ - GitLab Pages (backup website) │
|
|
30
|
-
└──────────────────┬──────────────────────────────────────────┘
|
|
31
|
-
│
|
|
32
|
-
│ Automatic Push Mirror
|
|
33
|
-
│ (on main branch & tags)
|
|
34
|
-
│
|
|
35
|
-
▼
|
|
36
|
-
┌─────────────────────────────────────────────────────────────┐
|
|
37
|
-
│ GitHub (Mirror) │
|
|
38
|
-
│ - Public repository mirror │
|
|
39
|
-
│ - GitHub Actions CI (validation) │
|
|
40
|
-
│ - GitHub Pages (primary website) │
|
|
41
|
-
│ - Community engagement │
|
|
42
|
-
│ - Release distribution │
|
|
43
|
-
│ - CodeQL security scanning │
|
|
44
|
-
└─────────────────────────────────────────────────────────────┘
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
---
|
|
48
|
-
|
|
49
|
-
## Prerequisites
|
|
50
|
-
|
|
51
|
-
Before setting up GitHub mirroring, ensure you have:
|
|
52
|
-
|
|
53
|
-
1. **GitLab Repository**: Primary repository on GitLab (gitlab.com/blueflyio/openstandardagents)
|
|
54
|
-
2. **GitHub Repository**: Target mirror repository (github.com/blueflyio/openstandardagents)
|
|
55
|
-
3. **GitHub Personal Access Token**: With `repo` and `workflow` permissions
|
|
56
|
-
4. **GitLab CI/CD Access**: Ability to set CI/CD variables in GitLab project settings
|
|
57
|
-
|
|
58
|
-
---
|
|
59
|
-
|
|
60
|
-
## Configuration
|
|
61
|
-
|
|
62
|
-
### 1. GitHub Personal Access Token Setup
|
|
63
|
-
|
|
64
|
-
Create a GitHub Personal Access Token (PAT) with the following permissions:
|
|
65
|
-
|
|
66
|
-
**Token Permissions Required:**
|
|
67
|
-
- `repo` - Full control of private repositories
|
|
68
|
-
- `repo:status` - Access commit status
|
|
69
|
-
- `repo_deployment` - Access deployment status
|
|
70
|
-
- `public_repo` - Access public repositories
|
|
71
|
-
- `workflow` - Update GitHub Action workflows
|
|
72
|
-
|
|
73
|
-
**Steps to Create Token:**
|
|
74
|
-
|
|
75
|
-
1. Go to GitHub Settings → Developer settings → Personal access tokens → Tokens (classic)
|
|
76
|
-
2. Click "Generate new token (classic)"
|
|
77
|
-
3. Set token name: `GitLab Mirror - OSSA`
|
|
78
|
-
4. Set expiration: 90 days (recommended) or No expiration (requires periodic rotation)
|
|
79
|
-
5. Select scopes: `repo`, `workflow`
|
|
80
|
-
6. Click "Generate token"
|
|
81
|
-
7. **Copy the token immediately** (you won't see it again)
|
|
82
|
-
|
|
83
|
-
**Security Best Practices:**
|
|
84
|
-
- Use a dedicated service account or bot account for mirroring
|
|
85
|
-
- Set token expiration and rotate regularly
|
|
86
|
-
- Store token securely in GitLab CI/CD variables (masked)
|
|
87
|
-
- Never commit tokens to the repository
|
|
88
|
-
- Use fine-grained tokens when available (GitHub beta feature)
|
|
89
|
-
|
|
90
|
-
### 2. GitLab CI/CD Variable Configuration
|
|
91
|
-
|
|
92
|
-
Add the GitHub token to GitLab CI/CD variables:
|
|
93
|
-
|
|
94
|
-
**Steps:**
|
|
95
|
-
|
|
96
|
-
1. Navigate to GitLab project: Settings → CI/CD → Variables
|
|
97
|
-
2. Click "Add variable"
|
|
98
|
-
3. Configure variable:
|
|
99
|
-
- **Key**: `GITHUB_MIRROR_TOKEN`
|
|
100
|
-
- **Value**: `<your-github-personal-access-token>`
|
|
101
|
-
- **Type**: Variable
|
|
102
|
-
- **Environment scope**: All (default)
|
|
103
|
-
- **Protect variable**: ✅ Yes (recommended - only available to protected branches)
|
|
104
|
-
- **Mask variable**: ✅ Yes (hides value in job logs)
|
|
105
|
-
- **Expand variable reference**: ❌ No
|
|
106
|
-
4. Click "Add variable"
|
|
107
|
-
|
|
108
|
-
**Verification:**
|
|
109
|
-
|
|
110
|
-
The token is correctly configured when:
|
|
111
|
-
- Variable appears in Settings → CI/CD → Variables list
|
|
112
|
-
- Value is masked (shows as `[masked]` in logs)
|
|
113
|
-
- Mirror job runs successfully without authentication errors
|
|
114
|
-
|
|
115
|
-
### 3. GitLab CI/CD Mirror Job
|
|
116
|
-
|
|
117
|
-
The mirror job is defined in `.gitlab-ci.yml` at the `mirror` stage:
|
|
118
|
-
|
|
119
|
-
```yaml
|
|
120
|
-
mirror:github:
|
|
121
|
-
stage: mirror
|
|
122
|
-
image: alpine:latest
|
|
123
|
-
before_script:
|
|
124
|
-
- apk add --no-cache git
|
|
125
|
-
- git config --global user.email "ci@blueflyio.com"
|
|
126
|
-
- git config --global user.name "GitLab CI"
|
|
127
|
-
script:
|
|
128
|
-
- |
|
|
129
|
-
if [ -z "$GITHUB_MIRROR_TOKEN" ]; then
|
|
130
|
-
echo "ℹ️ GITHUB_MIRROR_TOKEN not set - skipping"
|
|
131
|
-
exit 0
|
|
132
|
-
fi
|
|
133
|
-
|
|
134
|
-
echo "🔄 Syncing to GitHub..."
|
|
135
|
-
git remote add github https://${GITHUB_MIRROR_TOKEN}@github.com/blueflyio/openstandardagents.git || true
|
|
136
|
-
git push github --all --force || true
|
|
137
|
-
git push github --tags --force || true
|
|
138
|
-
echo "✅ GitHub mirror synced"
|
|
139
|
-
rules:
|
|
140
|
-
- if: $CI_COMMIT_TAG
|
|
141
|
-
when: on_success
|
|
142
|
-
- if: $CI_COMMIT_BRANCH == "main"
|
|
143
|
-
when: on_success
|
|
144
|
-
allow_failure: true
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
**Job Configuration Details:**
|
|
148
|
-
|
|
149
|
-
| Setting | Value | Purpose |
|
|
150
|
-
|---------|-------|---------|
|
|
151
|
-
| **Stage** | `mirror` | Runs after release stage |
|
|
152
|
-
| **Image** | `alpine:latest` | Minimal Linux image with git |
|
|
153
|
-
| **Trigger** | Tags + main branch | Mirrors production code only |
|
|
154
|
-
| **Force Push** | Yes | Ensures GitHub matches GitLab exactly |
|
|
155
|
-
| **Failure Handling** | `allow_failure: true` | Pipeline succeeds even if mirror fails |
|
|
156
|
-
|
|
157
|
-
**When Mirror Runs:**
|
|
158
|
-
|
|
159
|
-
1. **On Git Tags**: When a new version tag is created (e.g., `v0.2.5`)
|
|
160
|
-
2. **On Main Branch**: When commits are pushed to the `main` branch
|
|
161
|
-
3. **Not on Feature Branches**: Feature branches are not mirrored
|
|
162
|
-
|
|
163
|
-
**What Gets Mirrored:**
|
|
164
|
-
|
|
165
|
-
- ✅ All branches (`git push --all`)
|
|
166
|
-
- ✅ All tags (`git push --tags`)
|
|
167
|
-
- ✅ Commit history
|
|
168
|
-
- ✅ Repository metadata
|
|
169
|
-
- ❌ GitLab-specific features (CI/CD variables, merge requests, issues)
|
|
170
|
-
|
|
171
|
-
---
|
|
172
|
-
|
|
173
|
-
## CI/CD Considerations
|
|
174
|
-
|
|
175
|
-
### Dual-Pipeline Strategy
|
|
176
|
-
|
|
177
|
-
The project uses a **dual-pipeline strategy** where GitLab is the primary CI/CD platform, and GitHub provides supplementary validation and deployment.
|
|
178
|
-
|
|
179
|
-
#### GitLab CI/CD (Primary)
|
|
180
|
-
|
|
181
|
-
**Stages:**
|
|
182
|
-
1. `setup` - Environment preparation
|
|
183
|
-
2. `version-detect` - Milestone and version detection
|
|
184
|
-
3. `validate` - Code validation, linting, version sync
|
|
185
|
-
4. `build` - Build distribution packages
|
|
186
|
-
5. `test` - Unit tests, security audits, coverage
|
|
187
|
-
6. `quality` - Quality gates
|
|
188
|
-
7. `deploy` - Website deployment (manual)
|
|
189
|
-
8. `release` - NPM publishing (milestone-gated)
|
|
190
|
-
9. `mirror` - GitHub synchronization
|
|
191
|
-
|
|
192
|
-
**Key Features:**
|
|
193
|
-
- **Milestone-Gated Releases**: Requires closed milestone + `ENABLE_RELEASE=true`
|
|
194
|
-
- **Dev Tag Management**: Automatic dev tags on development branch
|
|
195
|
-
- **Documentation Sync**: Validates version consistency across docs
|
|
196
|
-
- **Comprehensive Testing**: Lint, typecheck, unit tests, security audits
|
|
197
|
-
- **Manual Website Deployment**: Controlled deployment to GitLab Pages
|
|
198
|
-
- **NPM Publishing**: Automated npm publish on release
|
|
199
|
-
|
|
200
|
-
**Release Gate:**
|
|
201
|
-
|
|
202
|
-
Releases require **BOTH** conditions:
|
|
203
|
-
1. ✅ Milestone must be 100% complete and closed
|
|
204
|
-
2. ✅ CI/CD variable `ENABLE_RELEASE` must be set to `"true"`
|
|
205
|
-
|
|
206
|
-
This allows deploying to main without releasing. Set the variable only when ready to release.
|
|
207
|
-
|
|
208
|
-
#### GitHub Actions (Mirror)
|
|
209
|
-
|
|
210
|
-
**Workflows:**
|
|
211
|
-
|
|
212
|
-
1. **CI Workflow** (`.github/workflows/ci.yml`)
|
|
213
|
-
- Validate, lint, test, security audit
|
|
214
|
-
- Build package and website
|
|
215
|
-
- Upload coverage to Codecov
|
|
216
|
-
- Runs on: `push` to main/develop, `pull_request`
|
|
217
|
-
|
|
218
|
-
2. **Release Workflow** (`.github/workflows/release.yml`)
|
|
219
|
-
- Semantic release (GitHub releases)
|
|
220
|
-
- NPM publishing (backup)
|
|
221
|
-
- GitHub Pages deployment
|
|
222
|
-
- Runs on: `push` to main/develop
|
|
223
|
-
|
|
224
|
-
3. **CodeQL Workflow** (`.github/workflows/codeql.yml`)
|
|
225
|
-
- Security vulnerability scanning
|
|
226
|
-
- Code quality analysis
|
|
227
|
-
- Runs on: `push`, `pull_request`, weekly schedule
|
|
228
|
-
|
|
229
|
-
**Key Differences:**
|
|
230
|
-
|
|
231
|
-
| Feature | GitLab (Primary) | GitHub (Mirror) |
|
|
232
|
-
|---------|------------------|-----------------|
|
|
233
|
-
| **Purpose** | Source of truth | Public mirror |
|
|
234
|
-
| **CI Trigger** | All branches | main/develop only |
|
|
235
|
-
| **Release Strategy** | Milestone-gated | Semantic release |
|
|
236
|
-
| **NPM Publish** | Primary | Backup/fallback |
|
|
237
|
-
| **Website Deploy** | Manual button | Automatic on main |
|
|
238
|
-
| **Test Coverage** | Comprehensive | Basic validation |
|
|
239
|
-
|
|
240
|
-
### Force Push Strategy
|
|
241
|
-
|
|
242
|
-
The mirror job uses `--force` flags for both branches and tags:
|
|
243
|
-
|
|
244
|
-
```bash
|
|
245
|
-
git push github --all --force
|
|
246
|
-
git push github --tags --force
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
**Why Force Push?**
|
|
250
|
-
|
|
251
|
-
1. **Single Source of Truth**: GitLab is authoritative, GitHub must match exactly
|
|
252
|
-
2. **Conflict Resolution**: Prevents divergence between platforms
|
|
253
|
-
3. **Tag Updates**: Allows updating existing tags (e.g., fixing release notes)
|
|
254
|
-
4. **Simplicity**: No merge conflicts or manual intervention required
|
|
255
|
-
|
|
256
|
-
**Implications:**
|
|
257
|
-
|
|
258
|
-
⚠️ **Warning**: Force pushing overwrites GitHub history. This is intentional for mirroring but has consequences:
|
|
259
|
-
|
|
260
|
-
- **GitHub-only commits are lost**: Any commits made directly to GitHub will be overwritten
|
|
261
|
-
- **Pull requests may break**: GitHub PRs should not be used; use GitLab merge requests
|
|
262
|
-
- **History rewriting**: If GitLab history is rewritten, GitHub will match
|
|
263
|
-
- **Tag updates**: Existing tags can be updated (useful for release notes)
|
|
264
|
-
|
|
265
|
-
**Best Practices:**
|
|
266
|
-
|
|
267
|
-
- ✅ Always work on GitLab (primary platform)
|
|
268
|
-
- ✅ Use GitLab merge requests for code review
|
|
269
|
-
- ✅ Create issues on GitLab, not GitHub
|
|
270
|
-
- ❌ Never commit directly to GitHub
|
|
271
|
-
- ❌ Never create GitHub pull requests
|
|
272
|
-
- ❌ Never manually push to GitHub
|
|
273
|
-
|
|
274
|
-
### Tag Synchronization
|
|
275
|
-
|
|
276
|
-
Tags are synchronized automatically when created on GitLab:
|
|
277
|
-
|
|
278
|
-
**Tag Creation Flow:**
|
|
279
|
-
|
|
280
|
-
1. **GitLab Release**: Tag created on GitLab (e.g., `v0.2.5`)
|
|
281
|
-
2. **CI Pipeline Triggers**: Mirror job runs automatically
|
|
282
|
-
3. **GitHub Sync**: Tag pushed to GitHub with `--force`
|
|
283
|
-
4. **GitHub Actions**: Release workflow triggers on new tag
|
|
284
|
-
5. **GitHub Release**: Semantic release creates GitHub release
|
|
285
|
-
|
|
286
|
-
**Tag Types:**
|
|
287
|
-
|
|
288
|
-
- **Production Tags**: `v0.2.5`, `v1.0.0` (semantic versions)
|
|
289
|
-
- **Dev Tags**: `0.2.6-dev-1`, `0.2.6-dev-2` (development builds)
|
|
290
|
-
- **RC Tags**: `v0.2.5-RC` (release candidates)
|
|
291
|
-
|
|
292
|
-
**Tag Metadata:**
|
|
293
|
-
|
|
294
|
-
GitLab tags include comprehensive release information:
|
|
295
|
-
|
|
296
|
-
```
|
|
297
|
-
Release v0.2.5
|
|
298
|
-
|
|
299
|
-
Milestone - v0.2.5 - Bug Fixes & Documentation
|
|
300
|
-
Pipeline - 12345678
|
|
301
|
-
Released - 2025-11-25T20:00:00Z
|
|
302
|
-
Commit - abc123def456
|
|
303
|
-
|
|
304
|
-
Documentation
|
|
305
|
-
- Schema - https://openstandardagents.org/schema/
|
|
306
|
-
- Changelog - https://github.com/blueflyio/openstandardagents/blob/main/CHANGELOG.md
|
|
307
|
-
- Migration Guide - https://openstandardagents.org/docs/migration-guides/
|
|
308
|
-
|
|
309
|
-
npm Package - @bluefly/openstandardagents@0.2.5
|
|
310
|
-
GitLab Release - https://gitlab.com/blueflyio/openstandardagents/-/releases/v0.2.5
|
|
311
|
-
```
|
|
312
|
-
|
|
313
|
-
This metadata is preserved when mirrored to GitHub.
|
|
314
|
-
|
|
315
|
-
---
|
|
316
|
-
|
|
317
|
-
## Branch Protection Rules
|
|
318
|
-
|
|
319
|
-
### GitHub Branch Protection
|
|
320
|
-
|
|
321
|
-
To prevent accidental commits to GitHub and maintain GitLab as the source of truth, configure branch protection rules on GitHub:
|
|
322
|
-
|
|
323
|
-
**Recommended Settings for `main` Branch:**
|
|
324
|
-
|
|
325
|
-
1. Navigate to GitHub repository: Settings → Branches → Branch protection rules
|
|
326
|
-
2. Click "Add rule" or edit existing rule for `main`
|
|
327
|
-
3. Configure protection:
|
|
328
|
-
|
|
329
|
-
**Branch name pattern**: `main`
|
|
330
|
-
|
|
331
|
-
**Protect matching branches:**
|
|
332
|
-
- ✅ **Require a pull request before merging**
|
|
333
|
-
- Required approvals: 1
|
|
334
|
-
- ❌ Dismiss stale pull request approvals when new commits are pushed
|
|
335
|
-
- ❌ Require review from Code Owners
|
|
336
|
-
- ❌ Restrict who can dismiss pull request reviews
|
|
337
|
-
- ❌ Allow specified actors to bypass required pull requests
|
|
338
|
-
- ❌ Require approval of the most recent reviewable push
|
|
339
|
-
|
|
340
|
-
- ✅ **Require status checks to pass before merging**
|
|
341
|
-
- ✅ Require branches to be up to date before merging
|
|
342
|
-
- Status checks: `validate`, `lint`, `test`, `build`
|
|
343
|
-
|
|
344
|
-
- ✅ **Require conversation resolution before merging**
|
|
345
|
-
|
|
346
|
-
- ✅ **Require signed commits**
|
|
347
|
-
|
|
348
|
-
- ❌ **Require linear history** (conflicts with mirror force push)
|
|
349
|
-
|
|
350
|
-
- ✅ **Require deployments to succeed before merging**
|
|
351
|
-
- Environments: `production`
|
|
352
|
-
|
|
353
|
-
- ❌ **Lock branch** (would prevent mirroring)
|
|
354
|
-
|
|
355
|
-
- ❌ **Do not allow bypassing the above settings**
|
|
356
|
-
|
|
357
|
-
- ✅ **Restrict who can push to matching branches**
|
|
358
|
-
- Add: GitLab CI service account or bot account
|
|
359
|
-
- This allows mirror job to push while preventing manual pushes
|
|
360
|
-
|
|
361
|
-
- ✅ **Allow force pushes**
|
|
362
|
-
- Specify who can force push: GitLab CI service account only
|
|
363
|
-
- Required for mirroring to work
|
|
364
|
-
|
|
365
|
-
- ✅ **Allow deletions**
|
|
366
|
-
- Specify who can delete: GitLab CI service account only
|
|
367
|
-
|
|
368
|
-
**Additional Protection for `develop` Branch:**
|
|
369
|
-
|
|
370
|
-
Apply similar rules to `develop` branch if mirrored:
|
|
371
|
-
- Same settings as `main`
|
|
372
|
-
- Adjust status checks as needed
|
|
373
|
-
- Allow force pushes from GitLab CI only
|
|
374
|
-
|
|
375
|
-
### GitLab Branch Protection
|
|
376
|
-
|
|
377
|
-
GitLab branch protection is already configured:
|
|
378
|
-
|
|
379
|
-
**Main Branch:**
|
|
380
|
-
- ✅ Protected branch
|
|
381
|
-
- ✅ Merge requests required
|
|
382
|
-
- ✅ Merge trains enabled
|
|
383
|
-
- ✅ Code owner approval required
|
|
384
|
-
- ✅ All discussions must be resolved
|
|
385
|
-
|
|
386
|
-
**Development Branch:**
|
|
387
|
-
- ✅ Protected branch
|
|
388
|
-
- ✅ Merge requests required
|
|
389
|
-
- ✅ Maintainer approval required
|
|
390
|
-
|
|
391
|
-
### Interaction Between Platforms
|
|
392
|
-
|
|
393
|
-
**GitLab Merge Trains + GitHub Protection:**
|
|
394
|
-
|
|
395
|
-
GitLab merge trains ensure that:
|
|
396
|
-
1. All CI checks pass before merge
|
|
397
|
-
2. Code is always in a releasable state
|
|
398
|
-
3. No merge conflicts on main
|
|
399
|
-
|
|
400
|
-
GitHub protection ensures that:
|
|
401
|
-
1. Mirror is the only way to update GitHub
|
|
402
|
-
2. No accidental commits to GitHub
|
|
403
|
-
3. Status checks validate mirrored code
|
|
404
|
-
|
|
405
|
-
**Consistency Guidelines:**
|
|
406
|
-
|
|
407
|
-
- ✅ Keep branch names consistent (main, develop, feature/*)
|
|
408
|
-
- ✅ Use same commit message conventions
|
|
409
|
-
- ✅ Apply similar protection rules
|
|
410
|
-
- ✅ Maintain same branching strategy
|
|
411
|
-
- ❌ Don't create GitHub-specific branches
|
|
412
|
-
- ❌ Don't use different versioning schemes
|
|
413
|
-
|
|
414
|
-
---
|
|
415
|
-
|
|
416
|
-
## Verification
|
|
417
|
-
|
|
418
|
-
### How to Verify Mirroring is Working
|
|
419
|
-
|
|
420
|
-
**1. Check GitLab CI/CD Pipeline:**
|
|
421
|
-
|
|
422
|
-
```bash
|
|
423
|
-
# Navigate to GitLab project
|
|
424
|
-
# Go to: CI/CD → Pipelines
|
|
425
|
-
# Find latest pipeline on main branch
|
|
426
|
-
# Check mirror:github job status
|
|
427
|
-
```
|
|
428
|
-
|
|
429
|
-
**Expected Output:**
|
|
430
|
-
```
|
|
431
|
-
🔄 Syncing to GitHub...
|
|
432
|
-
✅ GitHub mirror synced
|
|
433
|
-
```
|
|
434
|
-
|
|
435
|
-
**2. Compare Commits:**
|
|
436
|
-
|
|
437
|
-
```bash
|
|
438
|
-
# Clone both repositories
|
|
439
|
-
git clone https://gitlab.com/blueflyio/openstandardagents.git gitlab-repo
|
|
440
|
-
git clone https://github.com/blueflyio/openstandardagents.git github-repo
|
|
441
|
-
|
|
442
|
-
# Compare latest commits
|
|
443
|
-
cd gitlab-repo && git log -1 --oneline
|
|
444
|
-
cd ../github-repo && git log -1 --oneline
|
|
445
|
-
|
|
446
|
-
# Should show same commit hash and message
|
|
447
|
-
```
|
|
448
|
-
|
|
449
|
-
**3. Verify Tags:**
|
|
450
|
-
|
|
451
|
-
```bash
|
|
452
|
-
# List tags on both platforms
|
|
453
|
-
cd gitlab-repo && git tag -l | sort
|
|
454
|
-
cd ../github-repo && git tag -l | sort
|
|
455
|
-
|
|
456
|
-
# Should show identical tag lists
|
|
457
|
-
```
|
|
458
|
-
|
|
459
|
-
**4. Check GitHub Actions:**
|
|
460
|
-
|
|
461
|
-
```bash
|
|
462
|
-
# Navigate to GitHub repository
|
|
463
|
-
# Go to: Actions tab
|
|
464
|
-
# Verify workflows are running successfully
|
|
465
|
-
```
|
|
466
|
-
|
|
467
|
-
**5. Test Website Deployment:**
|
|
468
|
-
|
|
469
|
-
```bash
|
|
470
|
-
# Visit both websites
|
|
471
|
-
curl -I https://openstandardagents.org
|
|
472
|
-
# Should return 200 OK from GitHub Pages
|
|
473
|
-
|
|
474
|
-
curl -I https://blueflyio.gitlab.io/openstandardagents
|
|
475
|
-
# Should return 200 OK from GitLab Pages
|
|
476
|
-
```
|
|
477
|
-
|
|
478
|
-
### Verification Checklist
|
|
479
|
-
|
|
480
|
-
- [ ] GitLab mirror job completes successfully
|
|
481
|
-
- [ ] Latest commit on GitHub matches GitLab
|
|
482
|
-
- [ ] All tags are synchronized
|
|
483
|
-
- [ ] GitHub Actions workflows pass
|
|
484
|
-
- [ ] Website deploys successfully to GitHub Pages
|
|
485
|
-
- [ ] No authentication errors in GitLab CI logs
|
|
486
|
-
- [ ] Branch protection rules are active on GitHub
|
|
487
|
-
- [ ] Force push is restricted to CI service account
|
|
488
|
-
|
|
489
|
-
---
|
|
490
|
-
|
|
491
|
-
## Troubleshooting
|
|
492
|
-
|
|
493
|
-
### Common Issues and Solutions
|
|
494
|
-
|
|
495
|
-
#### 1. Authentication Failed
|
|
496
|
-
|
|
497
|
-
**Symptom:**
|
|
498
|
-
```
|
|
499
|
-
fatal: Authentication failed for 'https://github.com/blueflyio/openstandardagents.git/'
|
|
500
|
-
```
|
|
501
|
-
|
|
502
|
-
**Causes:**
|
|
503
|
-
- Token expired or invalid
|
|
504
|
-
- Token lacks required permissions
|
|
505
|
-
- Token not set in GitLab CI/CD variables
|
|
506
|
-
|
|
507
|
-
**Solutions:**
|
|
508
|
-
|
|
509
|
-
1. **Verify token exists:**
|
|
510
|
-
```bash
|
|
511
|
-
# In GitLab: Settings → CI/CD → Variables
|
|
512
|
-
# Check GITHUB_MIRROR_TOKEN is present and masked
|
|
513
|
-
```
|
|
514
|
-
|
|
515
|
-
2. **Check token permissions:**
|
|
516
|
-
- Go to GitHub: Settings → Developer settings → Personal access tokens
|
|
517
|
-
- Verify token has `repo` and `workflow` scopes
|
|
518
|
-
- Regenerate token if needed
|
|
519
|
-
|
|
520
|
-
3. **Update GitLab variable:**
|
|
521
|
-
- Delete old `GITHUB_MIRROR_TOKEN` variable
|
|
522
|
-
- Create new variable with fresh token
|
|
523
|
-
- Ensure "Masked" is checked
|
|
524
|
-
|
|
525
|
-
4. **Test token manually:**
|
|
526
|
-
```bash
|
|
527
|
-
git clone https://${GITHUB_MIRROR_TOKEN}@github.com/blueflyio/openstandardagents.git
|
|
528
|
-
# Should clone successfully
|
|
529
|
-
```
|
|
530
|
-
|
|
531
|
-
#### 2. Token Expiration
|
|
532
|
-
|
|
533
|
-
**Symptom:**
|
|
534
|
-
```
|
|
535
|
-
remote: Invalid username or password.
|
|
536
|
-
fatal: Authentication failed
|
|
537
|
-
```
|
|
538
|
-
|
|
539
|
-
**Prevention:**
|
|
540
|
-
- Set calendar reminder 1 week before expiration
|
|
541
|
-
- Use longer expiration periods (90 days)
|
|
542
|
-
- Consider using GitHub App tokens (no expiration)
|
|
543
|
-
|
|
544
|
-
**Resolution:**
|
|
545
|
-
|
|
546
|
-
1. **Generate new token** (see "GitHub Personal Access Token Setup")
|
|
547
|
-
2. **Update GitLab variable** with new token
|
|
548
|
-
3. **Retry failed pipeline** or push new commit
|
|
549
|
-
|
|
550
|
-
**Automation:**
|
|
551
|
-
```bash
|
|
552
|
-
# Add to monitoring/alerting
|
|
553
|
-
# Check token expiration date
|
|
554
|
-
# Alert 7 days before expiration
|
|
555
|
-
```
|
|
556
|
-
|
|
557
|
-
#### 3. Force Push Rejected
|
|
558
|
-
|
|
559
|
-
**Symptom:**
|
|
560
|
-
```
|
|
561
|
-
! [rejected] main -> main (non-fast-forward)
|
|
562
|
-
error: failed to push some refs
|
|
563
|
-
```
|
|
564
|
-
|
|
565
|
-
**Causes:**
|
|
566
|
-
- Branch protection prevents force push
|
|
567
|
-
- CI service account not in allowed list
|
|
568
|
-
- GitHub repository has diverged
|
|
569
|
-
|
|
570
|
-
**Solutions:**
|
|
571
|
-
|
|
572
|
-
1. **Check branch protection:**
|
|
573
|
-
- GitHub: Settings → Branches → main
|
|
574
|
-
- Verify "Allow force pushes" is enabled
|
|
575
|
-
- Verify CI service account is in allowed list
|
|
576
|
-
|
|
577
|
-
2. **Verify CI account permissions:**
|
|
578
|
-
- Ensure token is from account with force push access
|
|
579
|
-
- Check account is repository admin or has force push permission
|
|
580
|
-
|
|
581
|
-
3. **Manual sync (emergency only):**
|
|
582
|
-
```bash
|
|
583
|
-
# Clone GitLab repo
|
|
584
|
-
git clone https://gitlab.com/blueflyio/openstandardagents.git
|
|
585
|
-
cd openstandardagents
|
|
586
|
-
|
|
587
|
-
# Add GitHub remote
|
|
588
|
-
git remote add github https://${GITHUB_MIRROR_TOKEN}@github.com/blueflyio/openstandardagents.git
|
|
589
|
-
|
|
590
|
-
# Force push
|
|
591
|
-
git push github --all --force
|
|
592
|
-
git push github --tags --force
|
|
593
|
-
```
|
|
594
|
-
|
|
595
|
-
#### 4. Mirror Job Skipped
|
|
596
|
-
|
|
597
|
-
**Symptom:**
|
|
598
|
-
```
|
|
599
|
-
ℹ️ GITHUB_MIRROR_TOKEN not set - skipping
|
|
600
|
-
```
|
|
601
|
-
|
|
602
|
-
**Causes:**
|
|
603
|
-
- Variable not set in GitLab CI/CD
|
|
604
|
-
- Variable not available to pipeline (scope issue)
|
|
605
|
-
- Variable name mismatch
|
|
606
|
-
|
|
607
|
-
**Solutions:**
|
|
608
|
-
|
|
609
|
-
1. **Verify variable name:**
|
|
610
|
-
- Must be exactly `GITHUB_MIRROR_TOKEN`
|
|
611
|
-
- Case-sensitive
|
|
612
|
-
|
|
613
|
-
2. **Check variable scope:**
|
|
614
|
-
- Environment scope should be "All" or match pipeline environment
|
|
615
|
-
- Protected variable should be enabled if branch is protected
|
|
616
|
-
|
|
617
|
-
3. **Verify variable in pipeline:**
|
|
618
|
-
```yaml
|
|
619
|
-
# Add debug step to mirror job
|
|
620
|
-
script:
|
|
621
|
-
- echo "Token set: $([ -n "$GITHUB_MIRROR_TOKEN" ] && echo 'yes' || echo 'no')"
|
|
622
|
-
```
|
|
623
|
-
|
|
624
|
-
#### 5. Merge Conflicts on GitHub
|
|
625
|
-
|
|
626
|
-
**Symptom:**
|
|
627
|
-
```
|
|
628
|
-
CONFLICT (content): Merge conflict in <file>
|
|
629
|
-
```
|
|
630
|
-
|
|
631
|
-
**Cause:**
|
|
632
|
-
- Commits made directly to GitHub (violates workflow)
|
|
633
|
-
- Manual changes to GitHub repository
|
|
634
|
-
|
|
635
|
-
**Solution:**
|
|
636
|
-
|
|
637
|
-
⚠️ **This should never happen if workflow is followed correctly.**
|
|
638
|
-
|
|
639
|
-
1. **Identify conflicting commits:**
|
|
640
|
-
```bash
|
|
641
|
-
git log --oneline --graph --all
|
|
642
|
-
```
|
|
643
|
-
|
|
644
|
-
2. **Force sync from GitLab (destructive):**
|
|
645
|
-
```bash
|
|
646
|
-
git push github --all --force
|
|
647
|
-
git push github --tags --force
|
|
648
|
-
```
|
|
649
|
-
|
|
650
|
-
3. **Prevent future conflicts:**
|
|
651
|
-
- Enable branch protection on GitHub
|
|
652
|
-
- Restrict push access to CI service account only
|
|
653
|
-
- Educate team: "Never commit to GitHub directly"
|
|
654
|
-
|
|
655
|
-
#### 6. Tag Synchronization Issues
|
|
656
|
-
|
|
657
|
-
**Symptom:**
|
|
658
|
-
- Tags missing on GitHub
|
|
659
|
-
- Tag points to different commit
|
|
660
|
-
- Duplicate tags with different content
|
|
661
|
-
|
|
662
|
-
**Solutions:**
|
|
663
|
-
|
|
664
|
-
1. **Verify tag exists on GitLab:**
|
|
665
|
-
```bash
|
|
666
|
-
git ls-remote --tags https://gitlab.com/blueflyio/openstandardagents.git
|
|
667
|
-
```
|
|
668
|
-
|
|
669
|
-
2. **Force sync tags:**
|
|
670
|
-
```bash
|
|
671
|
-
git push github --tags --force
|
|
672
|
-
```
|
|
673
|
-
|
|
674
|
-
3. **Delete and recreate tag (if corrupted):**
|
|
675
|
-
```bash
|
|
676
|
-
# On GitLab
|
|
677
|
-
git tag -d v0.2.5
|
|
678
|
-
git push origin :refs/tags/v0.2.5
|
|
679
|
-
|
|
680
|
-
# Recreate tag
|
|
681
|
-
git tag -a v0.2.5 -m "Release v0.2.5"
|
|
682
|
-
git push origin v0.2.5
|
|
683
|
-
|
|
684
|
-
# Mirror will sync automatically
|
|
685
|
-
```
|
|
686
|
-
|
|
687
|
-
#### 7. GitHub Actions Not Triggering
|
|
688
|
-
|
|
689
|
-
**Symptom:**
|
|
690
|
-
- Mirror succeeds but GitHub Actions don't run
|
|
691
|
-
- Workflows show "skipped" status
|
|
692
|
-
|
|
693
|
-
**Causes:**
|
|
694
|
-
- Workflow files not present in mirrored branch
|
|
695
|
-
- Workflow disabled on GitHub
|
|
696
|
-
- Token lacks `workflow` permission
|
|
697
|
-
|
|
698
|
-
**Solutions:**
|
|
699
|
-
|
|
700
|
-
1. **Verify workflow files exist:**
|
|
701
|
-
```bash
|
|
702
|
-
ls -la .github/workflows/
|
|
703
|
-
# Should show: ci.yml, release.yml, codeql.yml
|
|
704
|
-
```
|
|
705
|
-
|
|
706
|
-
2. **Check workflow status:**
|
|
707
|
-
- GitHub: Actions tab
|
|
708
|
-
- Verify workflows are enabled (not disabled)
|
|
709
|
-
|
|
710
|
-
3. **Update token permissions:**
|
|
711
|
-
- Add `workflow` scope to GitHub token
|
|
712
|
-
- Update `GITHUB_MIRROR_TOKEN` in GitLab
|
|
713
|
-
|
|
714
|
-
4. **Manually trigger workflow:**
|
|
715
|
-
- GitHub: Actions → Select workflow → Run workflow
|
|
716
|
-
|
|
717
|
-
---
|
|
718
|
-
|
|
719
|
-
## Maintenance
|
|
720
|
-
|
|
721
|
-
### Token Rotation
|
|
722
|
-
|
|
723
|
-
**Recommended Schedule:**
|
|
724
|
-
- Rotate tokens every 90 days
|
|
725
|
-
- Set calendar reminders
|
|
726
|
-
- Document rotation in team runbook
|
|
727
|
-
|
|
728
|
-
**Rotation Process:**
|
|
729
|
-
|
|
730
|
-
1. **Generate new token** (see "GitHub Personal Access Token Setup")
|
|
731
|
-
2. **Test new token:**
|
|
732
|
-
```bash
|
|
733
|
-
git clone https://${NEW_TOKEN}@github.com/blueflyio/openstandardagents.git test-clone
|
|
734
|
-
```
|
|
735
|
-
3. **Update GitLab variable:**
|
|
736
|
-
- Settings → CI/CD → Variables
|
|
737
|
-
- Edit `GITHUB_MIRROR_TOKEN`
|
|
738
|
-
- Replace value with new token
|
|
739
|
-
4. **Verify mirror job:**
|
|
740
|
-
- Trigger pipeline manually or push commit
|
|
741
|
-
- Check mirror:github job succeeds
|
|
742
|
-
5. **Revoke old token:**
|
|
743
|
-
- GitHub: Settings → Developer settings → Personal access tokens
|
|
744
|
-
- Find old token → Revoke
|
|
745
|
-
|
|
746
|
-
**Automation:**
|
|
747
|
-
```bash
|
|
748
|
-
# Add to monitoring
|
|
749
|
-
# Alert 7 days before token expiration
|
|
750
|
-
# Provide rotation instructions in alert
|
|
751
|
-
```
|
|
752
|
-
|
|
753
|
-
### Monitoring
|
|
754
|
-
|
|
755
|
-
**Key Metrics to Monitor:**
|
|
756
|
-
|
|
757
|
-
1. **Mirror Job Success Rate**
|
|
758
|
-
- Target: > 99%
|
|
759
|
-
- Alert if: < 95% over 7 days
|
|
760
|
-
|
|
761
|
-
2. **Sync Latency**
|
|
762
|
-
- Target: < 5 minutes from GitLab commit to GitHub
|
|
763
|
-
- Alert if: > 15 minutes
|
|
764
|
-
|
|
765
|
-
3. **Token Expiration**
|
|
766
|
-
- Alert: 7 days before expiration
|
|
767
|
-
- Critical: 1 day before expiration
|
|
768
|
-
|
|
769
|
-
4. **GitHub Actions Status**
|
|
770
|
-
- Target: All workflows passing
|
|
771
|
-
- Alert if: Any workflow failing > 24 hours
|
|
772
|
-
|
|
773
|
-
**Monitoring Setup:**
|
|
774
|
-
|
|
775
|
-
```yaml
|
|
776
|
-
# Example: GitLab CI monitoring job
|
|
777
|
-
monitor:mirror:
|
|
778
|
-
stage: .post
|
|
779
|
-
script:
|
|
780
|
-
- |
|
|
781
|
-
# Check last mirror job status
|
|
782
|
-
LAST_STATUS=$(curl -sS "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/jobs?scope=success&per_page=1" \
|
|
783
|
-
-H "PRIVATE-TOKEN: ${GITLAB_TOKEN}" | jq -r '.[0].status')
|
|
784
|
-
|
|
785
|
-
if [ "$LAST_STATUS" != "success" ]; then
|
|
786
|
-
echo "⚠️ Last mirror job failed"
|
|
787
|
-
# Send alert to monitoring system
|
|
788
|
-
fi
|
|
789
|
-
rules:
|
|
790
|
-
- if: $CI_PIPELINE_SOURCE == "schedule"
|
|
791
|
-
allow_failure: true
|
|
792
|
-
```
|
|
793
|
-
|
|
794
|
-
### Updates and Changes
|
|
795
|
-
|
|
796
|
-
**When to Update Mirror Configuration:**
|
|
797
|
-
|
|
798
|
-
1. **Repository Rename**
|
|
799
|
-
- Update GitHub repository URL in `.gitlab-ci.yml`
|
|
800
|
-
- Update documentation references
|
|
801
|
-
|
|
802
|
-
2. **Organization Change**
|
|
803
|
-
- Update GitHub organization in mirror URL
|
|
804
|
-
- Regenerate token for new organization
|
|
805
|
-
|
|
806
|
-
3. **Branch Strategy Change**
|
|
807
|
-
- Update mirror job rules to include/exclude branches
|
|
808
|
-
- Update branch protection rules
|
|
809
|
-
|
|
810
|
-
4. **Token Permissions Change**
|
|
811
|
-
- Regenerate token with new permissions
|
|
812
|
-
- Update GitLab variable
|
|
813
|
-
- Test mirror job
|
|
814
|
-
|
|
815
|
-
**Change Process:**
|
|
816
|
-
|
|
817
|
-
1. **Test in development:**
|
|
818
|
-
- Create test repository on GitHub
|
|
819
|
-
- Update mirror URL to test repo
|
|
820
|
-
- Verify mirror works
|
|
821
|
-
|
|
822
|
-
2. **Update production:**
|
|
823
|
-
- Update `.gitlab-ci.yml` with new configuration
|
|
824
|
-
- Create merge request
|
|
825
|
-
- Review and approve
|
|
826
|
-
- Merge to main
|
|
827
|
-
|
|
828
|
-
3. **Verify:**
|
|
829
|
-
- Check mirror job succeeds
|
|
830
|
-
- Verify GitHub repository updated
|
|
831
|
-
- Monitor for 24 hours
|
|
832
|
-
|
|
833
|
-
---
|
|
834
|
-
|
|
835
|
-
## Security Considerations
|
|
836
|
-
|
|
837
|
-
### Token Security
|
|
838
|
-
|
|
839
|
-
**Best Practices:**
|
|
840
|
-
|
|
841
|
-
1. **Use Dedicated Service Account**
|
|
842
|
-
- Create GitHub bot account (e.g., `ossa-mirror-bot`)
|
|
843
|
-
- Use bot account token for mirroring
|
|
844
|
-
- Limit bot account permissions to minimum required
|
|
845
|
-
|
|
846
|
-
2. **Token Storage**
|
|
847
|
-
- ✅ Store in GitLab CI/CD variables (masked)
|
|
848
|
-
- ✅ Enable "Protected" flag for production
|
|
849
|
-
- ❌ Never commit to repository
|
|
850
|
-
- ❌ Never log token value
|
|
851
|
-
- ❌ Never share via insecure channels
|
|
852
|
-
|
|
853
|
-
3. **Token Permissions**
|
|
854
|
-
- Use minimum required scopes (`repo`, `workflow`)
|
|
855
|
-
- Avoid admin or org-level permissions
|
|
856
|
-
- Use fine-grained tokens when available
|
|
857
|
-
|
|
858
|
-
4. **Token Rotation**
|
|
859
|
-
- Rotate every 90 days minimum
|
|
860
|
-
- Rotate immediately if compromised
|
|
861
|
-
- Document rotation in security runbook
|
|
862
|
-
|
|
863
|
-
### Access Control
|
|
864
|
-
|
|
865
|
-
**GitLab:**
|
|
866
|
-
- Limit who can edit CI/CD variables (Maintainer role)
|
|
867
|
-
- Protect main and develop branches
|
|
868
|
-
- Require merge request approvals
|
|
869
|
-
- Enable merge trains
|
|
870
|
-
|
|
871
|
-
**GitHub:**
|
|
872
|
-
- Restrict force push to CI service account only
|
|
873
|
-
- Enable branch protection on main
|
|
874
|
-
- Require status checks before merge
|
|
875
|
-
- Enable signed commits
|
|
876
|
-
|
|
877
|
-
### Audit Logging
|
|
878
|
-
|
|
879
|
-
**GitLab:**
|
|
880
|
-
- Monitor CI/CD job logs for mirror activity
|
|
881
|
-
- Track variable changes in audit log
|
|
882
|
-
- Alert on failed mirror jobs
|
|
883
|
-
|
|
884
|
-
**GitHub:**
|
|
885
|
-
- Enable audit log for repository
|
|
886
|
-
- Monitor force push events
|
|
887
|
-
- Track token usage
|
|
888
|
-
|
|
889
|
-
**Retention:**
|
|
890
|
-
- Keep CI/CD logs for 90 days minimum
|
|
891
|
-
- Archive audit logs for 1 year
|
|
892
|
-
- Comply with organizational retention policies
|
|
893
|
-
|
|
894
|
-
---
|
|
895
|
-
|
|
896
|
-
## Related Documentation
|
|
897
|
-
|
|
898
|
-
- **GitLab CI/CD Pipeline**: `.gitlab-ci.yml` (lines 1089-1109)
|
|
899
|
-
- **GitHub Workflows**: `.github/workflows/`
|
|
900
|
-
- **Release Process**: `.gitlab/docs/releases/`
|
|
901
|
-
- **Infrastructure Documentation**: `.gitlab/docs/infrastructure/`
|
|
902
|
-
- **Website Deployment**: `website/README.md`
|
|
903
|
-
|
|
904
|
-
---
|
|
905
|
-
|
|
906
|
-
## Support
|
|
907
|
-
|
|
908
|
-
**Issues:**
|
|
909
|
-
- GitLab: https://gitlab.com/blueflyio/openstandardagents/-/issues
|
|
910
|
-
- GitHub: https://github.com/blueflyio/openstandardagents/issues
|
|
911
|
-
|
|
912
|
-
**Documentation:**
|
|
913
|
-
- Website: https://openstandardagents.org
|
|
914
|
-
- GitLab Wiki: https://gitlab.com/blueflyio/openstandardagents/-/wikis/home
|
|
915
|
-
|
|
916
|
-
**Contact:**
|
|
917
|
-
- Email: support@bluefly.io
|
|
918
|
-
- GitLab: @bluefly
|
|
919
|
-
|
|
920
|
-
---
|
|
921
|
-
|
|
922
|
-
**Version**: 1.0.0
|
|
923
|
-
**Last Updated**: 2025-11-25
|
|
924
|
-
**Maintained By**: OSSA Platform Team
|