Chuyển đến nội dung
Skillpedia
Triển khai và đám mây (DevOps)48k · #4133

circleci

Skill này làm gì

Công cụ này giúp thiết lập CircleCI, một nền tảng tự động hóa các tác vụ phát triển phần mềm như xây dựng, kiểm thử và triển khai mã. Nó dùng một tệp cấu hình để định nghĩa các bước này.

Khi nào nên dùng

  • ✓Khi bạn cần thiết lập tự động hóa kiểm thử và triển khai mã.
  • ✓Khi dùng “orbs” để có các cấu hình tái sử dụng.
  • ✓Để tối ưu thời gian build bằng các kỹ thuật như caching và parallelism.

Liên kết skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/circleci/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/circleci/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Thiết lập CircleCI để xây dựng và kiểm thử dự án Node.js của tôi, rồi triển khai lên production khi mã được đẩy lên nhánh 'main'.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Bạn viết một tệp tên `.circleci/config.yml` mô tả các bước build, kiểm thử và triển khai. CircleCI đọc tệp này và tự động chạy các tác vụ.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

CircleCI

Build, test, and deploy applications using CircleCI's cloud-native CI/CD platform.

When to Use This Skill

Use this skill when:

  • Setting up CI/CD pipelines with CircleCI
  • Using orbs for reusable configuration
  • Optimizing build times with caching and parallelism
  • Configuring CircleCI workflows and approvals
  • Managing CircleCI contexts and secrets

Prerequisites

  • CircleCI account connected to repository
  • Project enabled in CircleCI dashboard
  • Basic YAML understanding

Configuration File

Create .circleci/config.yml:

version: 2.1

orbs:
  node: circleci/node@5.2
  docker: circleci/docker@2.4

executors:
  default:
    docker:
      - image: cimg/node:20.10
    working_directory: ~/project

jobs:
  build:
    executor: default
    steps:
      - checkout
      - node/install-packages:
          pkg-manager: npm
      - run:
          name: Build application
          command: npm run build
      - persist_to_workspace:
          root: .
          paths:
            - dist

  test:
    executor: default
    steps:
      - checkout
      - node/install-packages:
          pkg-manager: npm
      - run:
          name: Run tests
          command: npm test

  deploy:
    executor: default
    steps:
      - checkout
      - attach_workspace:
          at: .
      - run:
          name: Deploy
          command: ./deploy.sh

workflows:
  build-test-deploy:
    jobs:
      - build
      - test:
          requires:
            - build
      - deploy:
          requires:
            - test
          filters:
            branches:
              only: main

Executors

Docker Executor

executors:
  node:
    docker:
      - image: cimg/node:20.10
      - image: cimg/postgres:15.0
        environment:
          POSTGRES_USER: test
          POSTGRES_DB: testdb
    working_directory: ~/app

Machine Executor

executors:
  linux-machine:
    machine:
      image: ubuntu-2204:current
    resource_class: large

macOS Executor

executors:
  macos:
    macos:
      xcode: "15.0.0"
    resource_class: macos.m1.medium.gen1

Caching

Dependency Caching

jobs:
  build:
    steps:
      - checkout
      - restore_cache:
          keys:
            - v1-deps-{{ checksum "package-lock.json" }}
            - v1-deps-
      - run: npm ci
      - save_cache:
          key: v1-deps-{{ checksum "package-lock.json" }}
          paths:
            - node_modules

Multi-Key Caching

- restore_cache:
    keys:
      - v1-{{ .Branch }}-{{ checksum "package-lock.json" }}
      - v1-{{ .Branch }}-
      - v1-main-
      - v1-

Workspaces

Persist Data

jobs:
  build:
    steps:
      - checkout
      - run: npm run build
      - persist_to_workspace:
          root: .
          paths:
            - dist
            - node_modules

  deploy:
    steps:
      - attach_workspace:
          at: ~/project
      - run: ./deploy.sh

Parallelism

Test Splitting

jobs:
  test:
    parallelism: 4
    steps:
      - checkout
      - run:
          name: Run tests
          command: |
            TESTFILES=$(circleci tests glob "test/**/*.test.js" | circleci tests split --split-by=timings)
            npm test -- $TESTFILES
      - store_test_results:
          path: test-results

Workflows

Sequential Jobs

workflows:
  pipeline:
    jobs:
      - build
      - test:
          requires:
            - build
      - deploy:
          requires:
            - test

Parallel Jobs

workflows:
  pipeline:
    jobs:
      - build
      - test-unit:
          requires:
            - build
      - test-integration:
          requires:
            - build
      - deploy:
          requires:
            - test-unit
            - test-integration

Manual Approval

workflows:
  deploy-prod:
    jobs:
      - build
      - test
      - hold:
          type: approval
          requires:
            - test
      - deploy-production:
          requires:
            - hold

Scheduled Workflows

workflows:
  nightly:
    triggers:
      - schedule:
          cron: "0 2 * * *"
          filters:
            branches:
              only:
                - main
    jobs:
      - build
      - test

Branch Filtering

workflows:
  build-deploy:
    jobs:
      - build:
          filters:
            branches:
              only:

…
Câu hỏi thường gặp

CI/CD là gì?

CI/CD là viết tắt của Continuous Integration và Continuous Delivery/Deployment. Đó là thực hành tự động hóa việc tích hợp và phân phối mã, giúp quá trình phát triển nhanh hơn và đáng tin cậy hơn.

“Orbs” là gì?

“Orbs” giống như các gói cấu hình có sẵn mà bạn có thể dùng để thêm chức năng vào pipeline CircleCI mà không phải viết mọi thứ từ đầu.

Tôi có cần biết lập trình để dùng CircleCI không?

Nên có hiểu biết cơ bản về cách dự án được build và kiểm thử, cùng một chút quen thuộc với định dạng YAML, dùng để viết cấu hình.

Chi tiết

Mô tả gốc của tác giả

Configure CircleCI workflows and orbs for continuous integration and deployment.

repo: sickn33/agentic-awesome-skills

Độ phổ biến

Sao GitHub
48k
Vị trí xếp hạng
#4133
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự