Skip to content

feat(tia): add GitLab CI baseline support - #1841

Open
calebdw wants to merge 1 commit into
pestphp:5.xfrom
calebdw:calebdw/push-nnyqzozmkzwk
Open

feat(tia): add GitLab CI baseline support#1841
calebdw wants to merge 1 commit into
pestphp:5.xfrom
calebdw:calebdw/push-nnyqzozmkzwk

Conversation

@calebdw

@calebdw calebdw commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

What:

  • Bug Fix
  • New Feature

Description:

Hello!

This adds GitLab support to the tia engine, not just gitlab.com but also self-hosted instances (as long as the glab binary is authenticated) as many companies use the self-hosted option for their codebases.

Thanks!

@nunomaduro

Copy link
Copy Markdown
Member

hi friend, did you tested this on gitlab itself?

@calebdw
calebdw marked this pull request as draft August 11, 2026 02:52
@calebdw

calebdw commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

Not, yet---I started to but got pulled away on other fixes. I'll let you know once I confirm this works

@calebdw
calebdw force-pushed the calebdw/push-nnyqzozmkzwk branch 3 times, most recently from dbd6f50 to cfa90b9 Compare August 17, 2026 22:05
Extract BaselineSync into a provider architecture with an abstract
BaseRemote class and concrete GitHubRemote/GitLabRemote implementations.

GitLab support uses the glab CLI to fetch TIA baselines from CI
pipelines. The GitLabRemote queries the GitLab API for the latest
successful job matching the configured name on the default branch,
then downloads artifacts via `glab job artifact`.

Self-hosted GitLab instances are supported automatically: any
non-GitHub remote is detected as GitLab when the glab CLI is
installed, with authentication validated at fetch time.

Key changes:
- BaseRemote abstract class holds shared logic: CLI existence/auth
  checks, error classification, git remote URL parsing, and default
  branch resolution
- GitHubRemote extracts existing gh CLI logic unchanged
- GitLabRemote adds glab CLI support with default job name
  `tia-baseline`, configurable via `->baselined(job: "name")`
- BaselineSync becomes a provider-agnostic orchestrator that iterates
  registered remotes to detect the matching CI provider
- Configuration::baselined() accepts optional `job` parameter for
  GitLab job name customization
- GitLab job query filters by both job name and default branch ref
  to ensure cache key matches downloaded artifact
@calebdw
calebdw force-pushed the calebdw/push-nnyqzozmkzwk branch from cfa90b9 to f68d815 Compare August 17, 2026 22:12
@calebdw

calebdw commented Aug 17, 2026

Copy link
Copy Markdown
Contributor Author

@nunomaduro, I've tested this out in GitLab and it works! (even in a private self-hosted instance) You can test it yourself with this project: https://gitlab.com/calebdw/sql-entities

Note that this really depends on #1844 so that should be merged as well (I had to do some finagling in the .gitlab-ci.yml to get tia recording working which is definitely not something we want to have the general userbase doing

@calebdw
calebdw marked this pull request as ready for review August 17, 2026 22:39
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