Skip to content

ci: GitLab pipeline with lint, test and release jobs - #18

Merged
JsNcAr merged 2 commits into
mainfrom
feat/gitlab-ci
Oct 14, 2026
Merged

JsNcAr merged 2 commits into
mainfrom
feat/gitlab-ci

Conversation

@JsNcAr

@JsNcAr JsNcAr commented Oct 12, 2026

Copy link
Copy Markdown
Owner

Summary

A GitLab CI/CD pipeline for the services that live on the self-hosted instance, mirroring the GitHub workflows so a clone can carry either file or both.

.gitlab-ci.yml

  • One pipeline per change: merge request pipelines win over branch pipelines for the same commit (the pattern from the Korvy and KorvynApi pipelines).
  • lint (black, flake8, mypy, pip-audit) and test (postgres:17 service, JUnit report so results show in the merge request widget) on every change, with pip and Poetry caches keyed on poetry.lock.
  • Same sources of truth as the GitHub workflows: Poetry from poetry.lock's header; Python from .python-version, which the image tag cannot read, so PYTHON_VERSION repeats the minor and the job fails if the two disagree.
  • On a v* tag: verify (the standard-library script checks tag vs pyproject.toml and extracts the notes), build (poetry build), release (glab release create with job-token login; wheel and sdist go to the project's generic package registry and are linked from the release page). release-cli is deprecated since GitLab 18.0, so this uses the gitlab-org/cli image, pinned.
  • Validated with the instance's CI lint API: valid, no warnings. The instance runs GitLab 19.2.4 with an online group runner and the package registry enabled.

scripts/release.py: after the push it prints the pipeline URL for the remote it pushed to (/actions on github.com, /-/pipelines elsewhere), parsing scp-like, ssh:// with a port, and https remotes. Six new tests.

Docs: releasing, setup, README, AGENTS and Known Issues describe both hosts; the adapting list names the GitLab variables; the releasing doc tells a GitLab project what to check if the first release's asset upload is refused by the job token.

Not included

A deploy job. The KorvynApi pipeline has an SSH deploy that is specific to its server; the starter's Known Issues entry "No deployment story" still covers deployment, and the GitLab pipeline has a release stage to hang one on.

Verification

  • black, flake8, mypy clean; 94 pure tests pass with --noconftest; check-version v0.1.0 passes.
  • GitLab CI lint API on the instance: valid: true, no errors, no warnings.
  • The release jobs cannot run in the starter (no tag by design); a clone's first tag is their first run, and the releasing doc covers the one thing that can only be checked then.

🤖 Generated with Claude Code

BrahiamSSS and others added 2 commits October 12, 2026 11:02
.gitlab-ci.yml for a GitLab instance, kept in step with the GitHub
workflows: one pipeline per change (merge request pipelines win over branch
pipelines), lint (black, flake8, mypy, pip-audit) and test (postgres:17
service, JUnit report in the merge request widget) on every change, and on a
v* tag the release jobs: verify (scripts/release.py, nothing installed),
build (poetry build) and release (glab, job-token login, wheel and sdist in
the generic package registry and linked from the release page). Python comes
from PYTHON_VERSION, checked against .python-version so the two cannot
drift; Poetry from poetry.lock's header. Validated with the instance's CI
lint API (GitLab 19.2).

Docs describe both hosts; the adapting list names the GitLab variables.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
After the push, the script prints where the release pipeline runs:
/actions on github.com, /-/pipelines elsewhere, parsed from the three
remote URL spellings (scp-like, ssh:// with a port, https). Tested.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@JsNcAr
JsNcAr merged commit cebd686 into main Oct 14, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants