ci: GitHub→GitLab mirror + GitLab publish pipeline#19
Draft
beengud wants to merge 1 commit into
Draft
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ports the GitHub→GitLab mirror + GitLab publish pipeline from the deprecated Go fork (
beengud/observePRs #10/#12) to this TypeScript fork, adapted for bun. Implements the cutover plan: mirrorbeengud/cliinto NHL GitLab, then have themopprojects consume the mirrored repo.Closes #10
What's here
.github/workflows/sync-to-gitlab.yml— on every push tomain(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 binarydist-bin/observe-linux-x64) → publish to the mop-config generic package registry → open an MR bumpingOBSERVE_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):
GITLAB_SYNC_TOKEN— GitLab project access token,write_repositoryscope, on the mirror repo.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.MOP_CONFIG_PROJECT_ID(currently the old82631227).bun run codegen(run by bothtestandbuild) fetches the schema via GraphQL introspection, which is disabled on standard customer tenants — so the GitLabtest/buildstages will fail untilOBSERVE_GQL_SPECpoints 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.