Getting the repository onto GitLab and running the first CI
This guide walks through publishing edox-ops to GitLab and triggering the first
pipeline. It assumes the pipeline is already defined in
.gitlab-ci.yml.
For what each CI job does, Docker-in-Docker, and runner troubleshooting, see
gitlab-ci.md.
What you need before you start
| Item | Notes |
|---|---|
| GitLab account | GitLab.com or your organization’s self-managed instance |
| Empty or new GitLab project | You will push this repository into it |
| Git on your workstation | Same repo you develop in (e.g. esysdox-ops on Windows) |
| Authentication to GitLab | SSH key in GitLab Preferences → SSH Keys, or HTTPS with a personal access token. Multiple keys: gitlab-ssh-keys.md |
Cursor / IDE GitLab integration (if configured) helps with merge requests and browsing
the project in the editor. Pushing code still uses normal git remotes and your SSH
or HTTPS credentials unless you have separately configured them.
No extra CI/CD variables or secrets are required for the current pipeline.
Canonical SSH remote for this repo: git@gitlab-ai:libesys/esysdox-ops.git (remote
name gitlab). See gitlab-ssh-keys.md.
1. Create the GitLab project
- Sign in to GitLab.
- Select New project → Create blank project (or Import project if you use another host).
- Choose a project name (e.g.
esysdox-ops) and namespace (group or user). - Set visibility (private/internal/public) per your policy.
- Optional: disable “Initialize repository with a README” if you will push an existing local repository (avoids unrelated first commit on GitLab).
- Create the project and copy its clone URL:
- SSH:
git@gitlab.com:your-group/esysdox-ops.git - HTTPS:
https://gitlab.com/your-group/esysdox-ops.git
- SSH:
Note the project’s default branch name under Settings → Repository (main or
master). Your local default branch should match what you intend to push, or you should
change the GitLab default branch after the first push.
2. Connect the local repository to GitLab
In your local clone (project root):
git remote -v
If no remote points at GitLab, add the project remote (uses the gitlab-ai SSH alias;
see gitlab-ssh-keys.md):
git remote add gitlab git@gitlab-ai:libesys/esysdox-ops.git
HTTPS example:
git remote add gitlab https://gitlab.com/your-group/esysdox-ops.git
Confirm the branch you will push and that the working tree is clean:
git status
git log -3 --oneline
Ensure .gitlab-ci.yml is committed on that branch (it is part of
this repository).
3. Push the code
First push (sets upstream tracking):
git push -u gitlab master
Use main instead of master if that is your local and GitLab default branch:
git push -u gitlab main
If GitLab rejected the push because the remote already has commits (e.g. README from project creation), either pull and merge once, or—only if you are sure—force-push an empty initial remote; prefer merging when unsure.
After a successful push, the project Repository view on GitLab should show your files,
including .gitlab-ci.yml.
4. Enable CI and runners (GitLab UI)
The pipeline file alone is not enough: a GitLab Runner must execute jobs.
GitLab.com (recommended first try)
- Open the project → Settings → CI/CD.
- Expand Runners.
- Ensure shared runners are enabled for the project (common default on GitLab.com).
- Confirm CI/CD is not disabled under project settings.
Shared runners are the fastest way to try the first pipeline; see
gitlab-ci.md if the integration job fails and you need a
self-hosted runner with privileged = true.
Self-managed GitLab
- Register a GitLab Runner for the project or group.
- Use the docker executor for compatibility with
.gitlab-ci.yml. - For the
integrationjob, the runner may needprivileged = trueinconfig.toml— details ingitlab-ci.md.
No CI/CD variables need to be added for lint, unit, or integration jobs today.
5. Trigger the first pipeline
Pipelines start automatically when the rules in .gitlab-ci.yml match:
| Event | Runs pipeline? |
|---|---|
Push to default branch (master / main) | Yes |
| Merge request opened or updated | Yes |
| Tag pushed | Yes |
| Push to other branches without an MR | No (unless you change workflow: rules) |
So the first pipeline usually appears right after the initial git push to the
default branch, or when you open a merge request.
6. Watch the first pipeline
- In the project, go to Build → Pipelines.
- Open the newest pipeline (status: running, passed, or failed).
- Open each job to read logs:
| Job | Stage | What success looks like |
|---|---|---|
ruff | lint | Ruff check and format check exit 0 |
unit | test | Pytest finishes; coverage % on pipeline and Cobertura on MRs |
integration | integration | run_docker.sh completes; log ends with integration success |
Jobs run in order: ruff and unit first, then integration.
If ruff or unit fails, fix the reported issues locally (same commands as in the README)
and push again.
If only integration fails, read the job log for Docker, DinD, or privileged errors, then
follow gitlab-ci.md.
7. Run the same checks locally (optional)
Before or after the first CI run:
pip install -e ".[dev]"
ruff check src tests scripts/pre_commit scripts/gitlint_rules.py
ruff format --check src tests scripts/pre_commit scripts/gitlint_rules.py
python -m pytest -q --cov=edox_ops
Integration (Linux):
bash tests/integration/run_docker.sh
Windows:
.\test.ps1
8. Optional next steps (not required for first CI)
| Step | Where | Purpose |
|---|---|---|
| Require passing pipeline before merge | Settings → Merge requests | Block merges when CI fails |
| Protect default branch | Settings → Repository → Protected branches | Enforce MR workflow |
| Add runner tags | .gitlab-ci.yml + runner registration | Pin integration to a capable runner |
| Mirror to GitHub | GitHub repo settings | Use .github/workflows/ci.yml in parallel |
Quick checklist
- GitLab project created; clone URL copied
-
git remote add gitlab …(ororigin→ GitLab) -
git push -u gitlab <default-branch> - Shared or project runners available
- Build → Pipelines shows a pipeline with
ruff,unit,integration - All three jobs green (or
integrationinvestigated usinggitlab-ci.md)
Related docs
how-to-contribute.md— join project, dev setup, Cursor AIgitlab-ssh-keys.md— multiple keys,~/.ssh/configaliases, choosinggit@gitlab-aivsgit@gitlab.comgitlab-ci-agent-access.md— how agents read CI logs (glab, API token, paste)gitlab-ci.md— pipeline diagram, Docker-in-Docker, runner setup, troubleshootingcommit-messages.md— commit format for this repositorycommit-checklist.md— pre-commit before you push