Initial commit
This commit is contained in:
12
.claude-plugin/plugin.json
Normal file
12
.claude-plugin/plugin.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "gitlab",
|
||||
"description": "Guidance for using the glab CLI effectively with GitLab",
|
||||
"version": "1.0.0",
|
||||
"author": {
|
||||
"name": "MLL",
|
||||
"email": "info@mll.com"
|
||||
},
|
||||
"skills": [
|
||||
"./skills"
|
||||
]
|
||||
}
|
||||
3
README.md
Normal file
3
README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# gitlab
|
||||
|
||||
Guidance for using the glab CLI effectively with GitLab
|
||||
45
plugin.lock.json
Normal file
45
plugin.lock.json
Normal file
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"$schema": "internal://schemas/plugin.lock.v1.json",
|
||||
"pluginId": "gh:mll-lab/claude-plugin-marketplace:plugins/gitlab",
|
||||
"normalized": {
|
||||
"repo": null,
|
||||
"ref": "refs/tags/v20251128.0",
|
||||
"commit": "3f0661687830d8995d677948f8d75ccd717cece4",
|
||||
"treeHash": "efc04b63950d8dcc801786ce5d161af429cc5f9d3e34ff01d6742ae0d4e1556c",
|
||||
"generatedAt": "2025-11-28T10:27:07.668828Z",
|
||||
"toolVersion": "publish_plugins.py@0.2.0"
|
||||
},
|
||||
"origin": {
|
||||
"remote": "git@github.com:zhongweili/42plugin-data.git",
|
||||
"branch": "master",
|
||||
"commit": "aa1497ed0949fd50e99e70d6324a29c5b34f9390",
|
||||
"repoRoot": "/Users/zhongweili/projects/openmind/42plugin-data"
|
||||
},
|
||||
"manifest": {
|
||||
"name": "gitlab",
|
||||
"description": "Guidance for using the glab CLI effectively with GitLab",
|
||||
"version": "1.0.0"
|
||||
},
|
||||
"content": {
|
||||
"files": [
|
||||
{
|
||||
"path": "README.md",
|
||||
"sha256": "be53f94523adac73ffde991f08da319a84fbc0708957e30fa7e289df7fa6a8e1"
|
||||
},
|
||||
{
|
||||
"path": ".claude-plugin/plugin.json",
|
||||
"sha256": "9d26c5d161ab281335e2e0401eaf275da5be60b22251336f30656b85e11d8156"
|
||||
},
|
||||
{
|
||||
"path": "skills/SKILL.md",
|
||||
"sha256": "7622b9a30f8ce814d6f7c51464296a5ae51660c0f796b3c62d22209a421c16ac"
|
||||
}
|
||||
],
|
||||
"dirSha256": "efc04b63950d8dcc801786ce5d161af429cc5f9d3e34ff01d6742ae0d4e1556c"
|
||||
},
|
||||
"security": {
|
||||
"scannedAt": null,
|
||||
"scannerVersion": null,
|
||||
"flags": []
|
||||
}
|
||||
}
|
||||
83
skills/SKILL.md
Normal file
83
skills/SKILL.md
Normal file
@@ -0,0 +1,83 @@
|
||||
---
|
||||
name: gitlab-ci
|
||||
description: Use when working with GitLab using the glab CLI tool. Currently provides guidance for CI/CD pipelines including checking pipeline status, viewing job logs, and working with branches and tags.
|
||||
---
|
||||
|
||||
# GitLab CI/CD with glab CLI
|
||||
|
||||
## Core Principle
|
||||
|
||||
**Always use `--branch` to specify branches or tags, never use pipeline IDs directly.**
|
||||
|
||||
## Common Workflows
|
||||
|
||||
### 1. Check Pipeline Status
|
||||
|
||||
```bash
|
||||
# Check current branch
|
||||
glab ci status
|
||||
|
||||
# Check specific branch or tag
|
||||
glab ci status --branch=<branch-or-tag>
|
||||
|
||||
# Compact view
|
||||
glab ci status --compact --branch=<branch-or-tag>
|
||||
```
|
||||
|
||||
### 2. Get Pipeline Details
|
||||
|
||||
```bash
|
||||
# Get pipeline info for a branch/tag
|
||||
glab ci get --branch=<branch-or-tag>
|
||||
|
||||
# Include job IDs and details
|
||||
glab ci get --branch=<branch-or-tag> --with-job-details
|
||||
```
|
||||
|
||||
### 3. View Job Logs
|
||||
|
||||
```bash
|
||||
# By job name (recommended when you know the name)
|
||||
glab ci trace <job-name> --branch=<branch-or-tag>
|
||||
|
||||
# By job ID (use after getting job IDs from `glab ci get --with-job-details`)
|
||||
glab ci trace <job-id>
|
||||
```
|
||||
|
||||
**Example workflow:**
|
||||
```bash
|
||||
# 1. Check status and see job names
|
||||
glab ci status --branch=staging
|
||||
|
||||
# 2. Get logs for a specific failed job
|
||||
glab ci trace check-pending-migrations --branch=staging
|
||||
```
|
||||
|
||||
### 4. List Pipelines
|
||||
|
||||
```bash
|
||||
# List recent pipelines (overview only)
|
||||
glab ci list
|
||||
|
||||
# Filter by ref (branch/tag)
|
||||
glab ci list --ref=<branch-or-tag>
|
||||
|
||||
# Filter by status
|
||||
glab ci list --status=failed
|
||||
```
|
||||
|
||||
## Important Notes
|
||||
|
||||
- **NEVER use `glab ci view`** - it only works interactively. Use `glab ci status --live` for monitoring or `glab ci trace` for job logs instead
|
||||
- Job names and job IDs work with `glab ci trace`, but pipeline IDs do not
|
||||
- Always specify `--repo` if working with a repository other than the current directory
|
||||
- Use `--branch` for both branches and tags (the flag name is `--branch` even for tags)
|
||||
|
||||
## Quick Reference
|
||||
|
||||
| Task | Command |
|
||||
|------|---------|
|
||||
| Pipeline status | `glab ci status --branch=<ref>` |
|
||||
| Pipeline details | `glab ci get --branch=<ref>` |
|
||||
| Job logs | `glab ci trace <job-name\|job-id> [--branch=<ref>]` |
|
||||
| List pipelines | `glab ci list [--ref=<ref>]` |
|
||||
Reference in New Issue
Block a user