شعار Ci Cd Pipeline Design

Ci Cd Pipeline Design

المجتمع
selvarajmurugesan90
ci-cd-pipeline-design

Designs and troubleshoots CI/CD pipelines (GitHub Actions, GitLab CI, or equivalent) including stage layout, caching, parallelization, quality gates, and secrets handling. Use when the user asks to "set up a CI/CD pipeline," "add a build/test/deploy workflow," "fix a failing pipeline stage," "speed up CI," "add branch protection / required checks," or "design a deployment pipeline" for an application or infrastructure repo.

نظرة عامة

الناشرselvarajmurugesan90
المستودعops-engineering-skills
اسم المهارةci-cd-pipeline-design
النجوم
44
التفريعات
18
الملفات المرفقة
تعليمات فقط
الترخيصApache-2.0
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • مكتفية بذاتها

    كل ما يحتاجه النموذج موجود في التعليمات — لا ملفات إضافية لمزامنتها.

  • مفتوحة المصدر

    نشرها selvarajmurugesan90 على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Ci Cd Pipeline Design في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/selvarajmurugesan90/ops-engineering-skills/tree/main/plugins/devops/skills/ci-cd-pipeline-design
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/selvarajmurugesan90/ops-engineering-skills.git /tmp/ops-engineering-skills
mkdir -p .claude/skills
cp -r /tmp/ops-engineering-skills/plugins/devops/skills/ci-cd-pipeline-design .claude/skills/ci-cd-pipeline-design
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل Ci Cd Pipeline Design في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج مهارة Ci Cd Pipeline Design تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Ci Cd Pipeline Design بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تستهلك تعليمات المهارة أي توكنات ما دامت المهارة غير مستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

CI/CD Pipeline Design

Purpose

A CI/CD pipeline is the mechanism that turns a code change into a verified, deployable artifact and, eventually, a running system — reliably, repeatably, and fast enough that engineers trust it over manual steps. Badly designed pipelines either fail to catch real regressions (weak gates, flaky tests suppressed rather than fixed) or become so slow and brittle that engineers route around them (manual deploys, skipped checks). This skill covers designing pipeline stages, gates, caching, and parallelization so that CI/CD is both trustworthy and fast enough to stay in the critical path of every change.

When to use

  • Standing up CI/CD for a new service or monorepo from scratch.
  • A pipeline is slow (multi-tens-of-minutes) and engineers are asking to skip it or it's blocking delivery cadence.
  • Adding quality gates: required checks, branch protection, test coverage thresholds, or manual approval gates before production deploy.
  • Migrating a pipeline between platforms (e.g., Jenkins to GitHub Actions, or GitHub Actions to GitLab CI).
  • Diagnosing flaky or intermittently failing pipeline stages.
  • Adding matrix builds, caching, or parallel test sharding to reduce pipeline wall-clock time.

Prerequisites & environment

  • A version-controlled repository (Git) with a CI platform already available or to be provisioned: GitHub Actions, GitLab CI, Jenkins, CircleCI, etc. Examples below use GitHub Actions and GitLab CI syntax.
  • Repository or project admin permission to configure branch protection, required status checks, and CI/CD variables/secrets.
  • For GitHub Actions: Actions enabled on the repo; runner availability (GitHub-hosted or self-hosted) understood, since self-hosted runners need their own patching/security posture.
  • For GitLab CI: a configured runner (shared or project-specific) and .gitlab-ci.yml support; GitLab 15+ recommended for modern rules:/workflow: syntax (older only:/except: still works but is deprecated in favor of rules:).
  • Secrets already stored in the platform's secret store (GitHub Actions secrets/environments, GitLab CI/CD variables marked "masked" and "protected") — never in the pipeline file itself.

Step-by-step guidance

  1. Define the stage model before writing YAML. A typical pipeline has: lint/static-analysis → build → unit test → package/containerize → integration test → publish artifact → deploy (per environment). Keep fast, cheap checks (lint, unit tests) first so failures surface in seconds/minutes, not after a 20-minute build.

  2. Trigger scoping. Run the full pipeline on pushes to the default branch and on pull requests; run only relevant subsets on other branches. For monorepos, use path filters so a docs-only change doesn't trigger a full backend build.

    GitHub Actions:

    yaml
    name: ci
    on:
      pull_request:
        branches: [main]
      push:
        branches: [main]
    concurrency:
      group: ci-${{ github.workflow }}-${{ github.ref }}
      cancel-in-progress: true
    jobs:
      lint:
        runs-on: ubuntu-latest
        steps:
          - uses: actions/checkout@v4
          - uses: actions/setup-node@v4
            with:
              node-version: "20"
              cache: "npm"
          - run: npm ci
          - run: npm run lint
    
      test:
        needs: lint
        runs-on: ubuntu-latest
        strategy:
          matrix:
            shard: [1, 2, 3, 4]
        steps:
          - uses: actions/checkout@v4
          - uses: actions/setup-node@v4
            with:
              node-version: "20"
              cache: "npm"
          - run: npm ci
          - run: npm test -- --shard=${{ matrix.shard }}/4
    
      build:
        needs: test
        runs-on: ubuntu-latest
        steps:
          - uses: actions/checkout@v4
          - run: docker build -t myapp:${{ github.sha }} .

    GitLab CI equivalent (.gitlab-ci.yml):

    yaml
    stages: [lint, test, build]
    
    workflow:
      rules:
        - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
        - if: '$CI_COMMIT_BRANCH == "main"'
    
    lint:
      stage: lint
      script:
        - npm ci
        - npm run lint
    
    test:
      stage: test
      parallel: 4
      script:
        - npm ci
        - npm test -- --shard=$CI_NODE_INDEX/$CI_NODE_TOTAL
    
    build:
      stage: build
      needs: ["test"]
      script:
        - docker build -t myapp:$CI_COMMIT_SHORT_SHA .
  3. Cache dependencies, not build output you can't trust. Cache package manager directories (~/.npm, ~/.m2, ~/.cache/pip) keyed by a lock file hash. Avoid caching compiled artifacts across unrelated commits — stale caches cause "works in CI, fails locally" (or the reverse) bugs.

  4. Add required quality gates as required status checks, not just as jobs that "happen to run." In GitHub: Settings → Branches → branch protection rule → "Require status checks to pass" and select the exact job names. A job that runs but isn't marked required can fail silently and still allow merge.

  5. Add a manual approval gate before production deploy using GitHub Actions environment: protection rules or GitLab's when: manual with environment:, rather than trusting a human to remember to "deploy only after checking."

    yaml
    deploy-prod:
      needs: build
      runs-on: ubuntu-latest
      environment:
        name: production
        url: https://app.example.com
      steps:
        - run: ./deploy.sh prod ${{ github.sha }}

    Configure production as a protected GitHub environment requiring reviewer approval under Settings → Environments.

  6. Fail fast and make failures actionable. Surface test reports, not just exit codes (JUnit XML upload, annotations on the PR diff). A red pipeline with no indication of what failed drives engineers to rerun blindly instead of fixing the root cause.

  7. Measure and budget pipeline duration. Track p50/p95 pipeline duration over time; if it creeps past your team's tolerance (commonly cited target: keep PR feedback under ~10-15 minutes), invest in test sharding, dependency caching, or splitting slow integration suites into a separate, less-blocking pipeline.

Best practices

  • Pin action/image versions (e.g., actions/checkout@v4, not @main) to avoid supply-chain surprises from upstream changes; update deliberately via Dependabot/Renovate rather than floating on latest.
  • Keep pipeline definitions in the same repo as the code they build ("pipeline as code"), reviewed via the same PR process as application code.
  • Separate CI (build/test/verify) concerns from CD (deploy) concerns into distinct workflows/stages so a deploy can be re-triggered without rerunning the entire test suite.
  • Use concurrency/pipeline cancellation so superseded runs on the same branch don't waste runner minutes.
  • Treat flaky tests as a defect to fix, not something to retry away indefinitely — a retry: 2 band-aid that runs forever hides real instability.
  • Emit structured build metadata (commit SHA, build number, timestamp) into the artifact/image so any deployed instance is traceable back to its pipeline run — this underpins release-versioning-and-changelog-automation.
  • Keep secrets out of logs: mask output, avoid set -x around commands that interpolate secret env vars, and use the platform's masked/secret variable feature rather than plain CI variables.

Common pitfalls

  • Symptom: Pipeline is green but a bug reaches production anyway. Fix: Audit whether the job that "should have" caught it is actually a required status check, not just a job that runs — non-required jobs can fail without blocking merge.

  • Symptom: CI takes 40+ minutes and engineers start merging with --no-verify or bypassing checks. Fix: Profile the pipeline (per-step timing), parallelize the test suite via sharding, cache dependencies keyed on lockfile hash, and move slow end-to-end suites to a separate, non-blocking nightly pipeline.

  • Symptom: Same test fails ~5% of the time with no code change ("flaky test"), and the team adds automatic retries to make it pass. Fix: Quarantine the flaky test (mark it non-blocking, file a ticket), fix the root cause (shared state, timing assumption, unseeded randomness), then re-enable it as blocking — indefinite silent retries erode trust in the whole pipeline signal.

  • Symptom: A secret leaks in build logs (e.g., printed via env or an -x shell trace). Fix: Store secrets only in the platform's secret store, reference them as ${{ secrets.NAME }} / ${SECRET_NAME} masked CI/CD variables, and audit logs for accidental echo/env/printenv dumps of the environment.

  • Symptom: Self-hosted runner has stale tooling and pipeline behavior differs from GitHub-hosted runners used elsewhere. Fix: Pin the runner image/tooling versions explicitly in the workflow (language runtime, Docker version) rather than relying on whatever happens to be installed on the runner host.

Worked example

Scenario: A Node.js service repo needs CI on every PR (lint, unit test, build, container image) and CD to a staging environment automatically on merge to main, with a manual gate to production.

.github/workflows/ci-cd.yml:

yaml
name: ci-cd
on:
  pull_request:
    branches: [main]
  push:
    branches: [main]

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  verify:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with: { node-version: "20", cache: "npm" }
      - run: npm ci
      - run: npm run lint
      - run: npm test -- --coverage
      - name: Upload coverage
        uses: actions/upload-artifact@v4
        with: { name: coverage, path: coverage/ }

  build-image:
    needs: verify
    if: github.event_name == 'push'
    runs-on: ubuntu-latest
    permissions: { contents: read, packages: write }
    steps:
      - uses: actions/checkout@v4
      - run: |
          docker build -t ghcr.io/${{ github.repository }}:${{ github.sha }} .
          echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
          docker push ghcr.io/${{ github.repository }}:${{ github.sha }}

  deploy-staging:
    needs: build-image
    runs-on: ubuntu-latest
    environment: { name: staging }
    steps:
      - run: ./deploy.sh staging ${{ github.sha }}

  deploy-prod:
    needs: deploy-staging
    runs-on: ubuntu-latest
    environment: { name: production }   # protected: requires reviewer approval
    steps:
      - run: ./deploy.sh prod ${{ github.sha }}

With branch protection on main requiring the verify job's checks (lint, test) and the production environment configured with a required reviewer, a bad change cannot reach production without a passing pipeline and a human sign-off — while staging still deploys automatically for fast feedback.

Cross-references

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي Ci Cd Pipeline Design؟

Designs and troubleshoots CI/CD pipelines (GitHub Actions, GitLab CI, or equivalent) including stage layout, caching, parallelization, quality gates, and secrets handling. Use when the user asks to "set up a CI/CD pipeline," "add a build/test/deploy workflow," "fix a failing pipeline stage," "speed up CI," "add branch protection / required checks," or "design a deployment pipeline" for an application or infrastructure repo.

لماذا تستخدم Ci Cd Pipeline Design على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Ci Cd Pipeline Design عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Ci Cd Pipeline Design في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/selvarajmurugesan90/ops-engineering-skills/tree/main/plugins/devops/skills/ci-cd-pipeline-design. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Ci Cd Pipeline Design؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Ci Cd Pipeline Design؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Ci Cd Pipeline Design معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Ci Cd Pipeline Design مجانية؟

نعم. نشرها selvarajmurugesan90 على GitHub بموجب ترخيص Apache-2.0. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇