用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/ffsshhttiikk/opencode-agents-skills --skill gitlab-ci命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | gitlab-ci |
| description | GitLab's built-in CI/CD platform using YAML configuration for pipeline automation |
| category | devops |
I am GitLab's integrated CI/CD platform that automates building, testing, and deploying your code. I use YAML configuration files to define pipelines, with tight integration into GitLab's repository, issue tracking, and deployment features.
Basic .gitlab-ci.yml:
stages:
- build
- test
- deploy
variables:
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
MAVEN_OPTS: "-Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository"
build:
stage: build
image: maven:3.8.6-openjdk-17
script:
- mvn clean compile -DskipTests
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- .m2/repository
artifacts:
paths:
- target/
expire_in: 1 hour
test:
stage: test
image: maven:3.8.6-openjdk-17
script:
- mvn test
coverage: '/Total.*?([0-9]{1,3})%/'
artifacts:
reports:
junit: target/surefire-reports/*.xml
coverage_report:
coverage_format:
Advanced Matrix Builds:
stages:
- build
- test
- deploy
variables:
DOCKER_REGISTRY: registry.example.com
build:
stage: build
image: docker:20.10
services:
- docker:20.10-dind
script:
- docker build -t $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA .
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
only:
changes:
- Dockerfile
- src/**/*
.test_template: &test_template
stage: test
script:
- npm ci
- npm test
coverage: '/All files[^|]*\|[^|]*\s+([\d\.]+)/'
artifacts:
reports:
junit: junit.xml
test:linux:
<<: *test_template
image:
Auto DevOps with Customization:
include:
- template: Auto-DevOps.gitlab-ci.yml
variables:
AUTO_DEVOPS_BUILD_IMAGE: Dockerfile
AUTO_DEVOPS_BUILD_STRATEGY: docker
DOCKER_DRIVER: overlay2
KUBERNETES_VERSION: "1.25"
HELM_VERSION: "3.10"
stages:
- build
- test
- deploy
test:unit:
extends: .test:unit
allow_failure: false
test:integration:
extends: .test:integration
services:
- postgres:14
- redis:7
variables:
POSTGRES_DB: test
DATABASE_URL: "postgresql://test:test@postgres:5432/test"
REDIS_URL: "redis://redis:6379"
after_script:
- echo "Running additional cleanup"
review:
environment:
name: review/$CI_COMMIT_REF_NAME
url: https://$CI_ENVIRONMENT_SLUG.example.com
on_stop:
Pipeline with Dependencies:
stages:
- build
- test
- package
- deploy
build:library:
stage: build
script:
- make build-library
artifacts:
paths:
- dist/
- package.json
rules:
- if: $CI_COMMIT_TAG
- if: $CI_MERGE_REQUEST_IID
changes:
- library/**/*
build:service:
stage: build
script:
- make build-service
dependencies:
- build:library
artifacts:
paths:
- bin/
rules:
- if: $CI_COMMIT_TAG
- if: $CI_MERGE_REQUEST_IID
changes:
- service/**/*
package:docker: