انتقل إلى المحتوى
أمين أبوزيد
MID-055

CI/CD المتقدم

  • 6 درس
  • 2.5 ساعة تدريب (تقدير)
في هذه الصفحة 8 موضوعات

نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.

نظرة عامة

الموضوعات

  • بيئات النشر
  • بوابات الجودة الآلية
  • التراجع (Rollback)

تعلّم أولًا

2.5 ساعة تدريب (تقدير)

مخرجات التعلم

  1. Promote one immutable artifact through environments (dev, staging, production).
  2. Add automated quality gates (tests, contracts, coverage thresholds, security scans).
  3. Implement blue-green or rolling deployments with automated rollback on failed checks.
  4. Use feature flags to separate deployment from release.

الدروس

  1. 01ابنِ مرة واحدة وروّج في كل مكان
  2. 02البيئات والموافقات
  3. 03بوابات الجودة
  4. 04استراتيجيات النشر
  5. 05مفاتيح الميزات (Feature Flags)
  6. 06عرض عملي: تراجع آلي عند فشل فحص الصحة

المختبر والتمارين

Lab

MID-055-LAB1 · Promotion pipeline

Outcomes: 1–4 · Time: ~3 h Build a pipeline for Shop services: build one image, deploy to dev, then staging with gates (tests, contracts, scans, coverage threshold), then production with approval. Use a rolling or blue-green strategy with a post-deploy smoke check and automatic rollback. Put one new feature behind a flag. Acceptance: a deliberately broken release is rolled back without human action.

Exercises (assessment: pipeline review)

IDOutcomeTask
MID-055-EX011Review a pipeline that builds a separate image per environment. List the problems and the fix.
MID-055-EX022Choose gates for orders and order them by speed; state what blocks a merge versus a deployment.
MID-055-EX033Compare rolling, blue-green, and canary for the payments service; pick one with reasons.
MID-055-EX043Plan a database column rename so that a rollback stays safe.
MID-055-EX054Put a new discount rule behind a flag; define rollout stages and the removal date.
MID-055-EX061List the manual production steps in a given runbook and automate two of them.
أظهر الحلول
  • EX01 Rebuilds can differ from the tested artifact and are slower; build once, tag by SHA, promote by digest, configure per environment.
  • EX02 Fast first: lint and unit tests, then integration and contract tests, then scans. Merge gates: tests, contracts, scans. Deployment gates: smoke tests and SLO check.
  • EX03 For payments, blue-green or canary with automatic rollback to limit exposure; rolling is acceptable if the change is backward compatible and probes are good.
  • EX04 Expand and contract: add the new column, write to both, migrate, switch reads, drop the old column in a later release.
  • EX05 Flag default off; staff, then 5%, 25%, 100% watching error rate; remove the flag and the old path within a set period.
  • EX06 Example: manual database migrations and smoke tests become pipeline jobs; approval remains only for the production gate.

Outcome 4 is also covered by quiz Q09–Q10; outcomes 1–3 by the lab and the pipeline review.

الاختبار

Outcomes: O1 build once, promote · O2 quality gates · O3 deployment strategies and rollback · O4 feature flags.

اختبار ذاتي لك: لا توجد درجات، ولا يُحفظ أو يُرسل أي شيء. اختر إجابة ثم تحقق منها، ويمكنك المحاولة مرة أخرى كما تشاء.

  1. 1"Build once, promote everywhere" means:O1
  2. 2Environments should differ by:O1
  3. 3A good quality gate is:O2
  4. 4Why avoid chasing 100% coverage?O2
  5. 5In blue-green deployment you roll back by:O3
  6. 6A canary release:O3
  7. 7Safe rollback requires the database schema to be:O3
  8. 8A readiness probe that always returns 200:O3
  9. 9Feature flags separate:O4
  10. 10Release flags should be:O4

الجزء العملي

Pipeline review (MID-055-EX01) plus lab MID-055-LAB1. Pass: quiz at least 8/10, a pipeline promoting one artifact through two environments with gates, and a broken release rolled back automatically.

أخطاء شائعة

Rebuilding per environment; manual production steps; flags never removed.

التقييم

Pipeline review.

الصلة بالمسار الوظيفي

Large migrations (SRB-017) and engineering productivity (STF-009).

اكتب للبحث في المستويات والمراحل والوحدات والدروس.