Skip to content
This repository was archived by the owner on Nov 12, 2026. It is now read-only.

ci: GitHub→GitLab mirror + GitLab publish pipeline - #19

Draft
beengud wants to merge 1 commit into
mainfrom
ci/gitlab-mirror
Draft

beengud wants to merge 1 commit into
mainfrom
ci/gitlab-mirror

Conversation

@beengud

@beengud beengud commented Jun 24, 2026

Copy link
Copy Markdown
Owner

Ports the GitHub→GitLab mirror + GitLab publish pipeline from the deprecated Go fork (beengud/observe PRs #10/#12) to this TypeScript fork, adapted for bun. Implements the cutover plan: mirror beengud/cli into NHL GitLab, then have the mop projects consume the mirrored repo.

Closes #10

What's here

  • .github/workflows/sync-to-gitlab.yml — on every push to main (and manual dispatch), bare-mirror-clone push to the NHL GitLab repo (bare clone avoids GitLab's "deny updating a hidden ref"). Same approach as the old fork.
  • .gitlab-ci.yml — runs on the GitLab mirror: test → build (linux/x64 binary dist-bin/observe-linux-x64) → publish to the mop-config generic package registry → open an MR bumping OBSERVE_CLI_VERSION. Adapted from Go (go build) to bun (bun run build --target linux-x64).

Required setup before enabling

GitHub (this repo → Settings → Secrets and variables → Actions):

  • Secret GITLAB_SYNC_TOKEN — GitLab project access token, write_repository scope, on the mirror repo.
  • Variable GITLAB_MIRROR_URL — host/path without scheme/.git, e.g. gitlab.com/nhl/mop/cli (confirm the exact path when you create the GitLab repo — placeholder assumed).

GitLab (mirror repo → Settings → CI/CD → Variables):

  • MOP_CONFIG_PAT (api scope on nhl/mop), OBSERVE_OPENAPI_SPEC, OBSERVE_GQL_SPEC, OBSERVE_GQL_TOKEN.
  • Confirm MOP_CONFIG_PROJECT_ID (currently the old 82631227).

⚠️ Known gate

bun run codegen (run by both test and build) fetches the schema via GraphQL introspection, which is disabled on standard customer tenants — so the GitLab test/build stages will fail until OBSERVE_GQL_SPEC points at an introspection-enabled endpoint (or codegen is repointed at a committed SDL). Same blocker as observeinc#10. The mirror workflow has no such dependency and works as soon as the secret/variable are set.

Draft until the GitLab repo + secrets exist and the codegen gate is resolved.

Adapts the old Go fork's sync-to-gitlab action and .gitlab-ci.yml to bun:
mirror beengud/cli to NHL GitLab on main, then build (bun run build
--target linux-x64) + publish to mop-config registry + open a version-bump MR.
Build/test stages are gated on codegen (GraphQL introspection); see observeinc#10.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@beengud

beengud commented Sep 22, 2026

Copy link
Copy Markdown
Owner Author

Parking this — not pursuing for now.

The fork is a transitional dependency, not a product we're investing in. Strategy going forward: mop-cli (Rust) owns the Observe workflow surface natively — it wraps auth to get you a session, then shells out to existing binaries (observe/cli, lokitool, mimirtool, promtool, tempo, alloy) and, over time, absorbs the thin net-adds this fork carries. As that happens the fork retires.

A GitHub→GitLab mirror + a full publish pipeline is more machinery than a retiring dependency warrants. For now the binary is built locally (bun run build:single) and dropped on PATH / pinned in the mop-config generic package registry when a real release is needed. Reopen if that calculus changes.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Re-establish GitLab publish pipeline + GitHub→GitLab mirror sync

2 participants