الانتقال إلى المحتوى
DevOps والـ CloudCI/CD· 7 دقائق للقراءة

الـ CI والـ Continuous Delivery والـ Continuous Deployment: 3 ممارسات مش pipeline واحدة

كل مصطلح بيجاوب على سؤال مختلف عن طريقة شغل الفريق، والـ pipeline لوحدها مابتجاوبش على ولا واحد فيهم.

ReadIn

مقال كل يوم يفرق معاك

21 نوفمبر 2026
  • كاتب موثّق
محتويات المقال

الـ slide بتاعة الفريق مكتوب عليها "we do CI/CD". كل feature branch بتشغّل pipeline بتعمل build وتشغّل الـ tests وتعمل deploy على preview environment. والـ production على بُعد زرار. ومع ذلك الـ branches بتعيش 3 أسابيع، ودمج الواحدة بياخد يومين حل conflicts، والـ build بتاع الـ main أحمر من يوم التلات، والـ releases بتحصل مرة في الشهر بعد "أسبوع تثبيت". الـ pipeline موجودة فعلًا، لكن الممارسات اللي هي متسمّية على اسمها مش بتحصل.

الفكرة الغلط الشائعة

الفكرة بتقول إن الـ CI/CD هو setup لأداة. لو فيه pipeline automated بتعمل build للـ app وتشغّل الـ tests وتعمل deploy، يبقى انت بتعمل CI/CD، والـ continuous integration والـ continuous delivery والـ continuous deployment مجرد 3 أسامي لأجزاء من الـ pipeline دي.

والفكرة مفهومة. المنتجات نفسها بتتباع على إنها platforms للـ "CI" أو "CI/CD"، و Martin Fowler بيشاور على النقطة دي بالظبط: "The confusion comes from calling these tools Continuous Integration Services." والاختصار نفسه بيلزق الأفكار في بعض، وبرنامج الأبحاث DORA بيقول إن الـ continuous delivery "is often combined with continuous integration and shortened to CI/CD". والـ pipeline هي الجزء اللي بتشوفه وتظبطه وتعمله demo.

النص الصح في الكلام: الـ automation أساسي. قايمة Fowler لممارسات الـ CI فيها "Automate the Build" و "Every Push to Mainline Should Trigger a Build"، والـ deployment pipelines هي "a central part of ContinuousDelivery". بس DORA واضح في الحد ده: "using modern tooling without implementing the necessary technical practices and process change described in this document won't produce the expected benefits."

اللي بيحصل فعلًا

كل مصطلح بيجاوب على سؤال مختلف عن طريقة شغل الفريق، وكل واحد مبني على اللي قبله.

الـ continuous integration: شغل الكل بيتقابل كل قد إيه؟

تعريف Fowler للـ إنه ممارسة "where each member of a team merges their changes into a codebase together with their colleagues changes at least daily." وكل integration "is verified by an automated build (including test) to detect integration errors as quickly as possible." والوصف بتاع DORA نفس الكلام: الـ developers "merge their work into a shared trunk/mainline at least daily, rather than working on long-lived feature branches"، والـ tests لازم تخلص في حدود "an upper limit of about 10 minutes".

الكلمة المهمة هنا هي integrate. الـ build server اللي شغال على branch عمرها 3 أسابيع بيختبر الـ branch دي لوحدها، مش بيختبر هي هتركب إزاي مع شغل الباقيين. ولما اتسأل ينفع تشغّل CI service على الـ feature branches، رد Fowler كان "yes - but you're not doing Continuous Integration"، وزوّد إن "we shouldn't confuse a tool for the practice."

الـ continuous delivery: تقدر تعمل release دلوقتي؟

الـ بكلام Fowler هو "a software development discipline where you build software in such a way that the software can be released to production at any time." والاختبار بتاعه: إن business sponsor يقدر يطلب إن النسخة الحالية من التطوير "be deployed into production at a moment's notice". ومن العلامات اللي بيقول إنك بتعمله فعلًا إن الفريق "prioritizes keeping the software deployable over working on new features".

والأداة اللي بتساعد في ده هي الـ : الـ build متقسّم stages، وشغلته "to detect any changes that will lead to problems in production." والـ stages الأخيرة ممكن يبقى فيها checks يدوية. وأسبوع التثبيت الشهري علامة عكسية: بيقول إن الـ mainline ماكانتش جاهزة للـ release باقي الشهر.

الـ continuous deployment: كل تغيير بيعدّي بيطلع لوحده؟

الـ بيروح خطوة أبعد: "every change goes through the pipeline and automatically gets put into production". أما مع الـ continuous delivery، فانت قادر تعمل deploy كتير "but may choose not to do it". يعني الـ delivery لازم ييجي الأول: "In order to do Continuous Deployment you must be doing Continuous Delivery." ومش مناسب لكل حاجة. DORA بيقول إن الـ continuous deployment "can't be applied to software such as firmware or mobile apps"، أما الـ continuous delivery فبيتطبّق على كل أنواع السوفتوير، حتى في البيئات اللي عليها regulations.

الممارسةالسؤال اللي بتجاوبهتعرف إزاي إنك بتعملها
Continuous integrationشغل الكل بيتقابل كتير؟كل واحد بيدمج في الـ mainline مرة في اليوم على الأقل، والـ build الأحمر بيتصلّح الأول
Continuous deliveryنقدر نعمل release للـ mainline دلوقتي؟أي نسخة تقدر تطلع production وقت ما تطلبها، من غير مرحلة تثبيت
Continuous deploymentكل تغيير بيعدّي بيطلع لوحده؟مفيش قرار من حد بين pipeline خضرا والـ production
"عندنا pipeline"الـ build والـ deploy automated؟مابتجاوبش على ولا سؤال من التلاتة اللي فوق

تطبقها إزاي في مشروعك

  1. قيس الـ branches بتعيش قد إيهبُص على الـ pull requests اللي اتدمجت الشهر اللي فات، واكتب كل branch عاشت كام يوم. لو أغلبهم عاشوا أكتر من يوم، يبقى انت بتشغّل أداة CI، مش بتمارس continuous integration. صغّر الشغل، مش الـ pipeline.
  2. تابع صحة الـ mainlineاكتب الـ main build بقى أحمر كام مرة وفضل كده قد إيه، والـ build بالـ tests بياخد وقت قد إيه. واتفقوا إن الـ mainline الحمرا بتتصلّح أو تتعمل لها revert قبل أي شغل جديد، وخلّي هدفكم feedback في دقايق.
  3. اسأل سؤال الـ release كل أسبوعتقدروا تعملوا deploy للـ mainline الحالية على الـ production النهارده، من غير freeze ولا مرحلة تثبيت؟ وكل "لأ" بتشاور على الشغل اللي الـ continuous delivery محتاجاه: tests ناقصة، أو خطوات يدوية، أو features مش مكتملة ومن غير switch.
  4. اختار الـ continuous deployment وانت قاصدلما الـ release وقت ما تحب يبقى حاجة عادية، قرروا هل كل build أخضر يطلع live لوحده. DORA بيقول إنه بيشتغل كويس مع الـ web services، بس مايتطبّقش على الـ mobile apps أو الـ firmware، واللي هدفها يبقى الـ continuous delivery.

الخلاصة

  • الـ pipeline أداة، والـ continuous integration والـ delivery والـ deployment ممارسات ليها اختبارات خاصة بيها.
  • الـ continuous integration معناه إن الكل بيدمج في mainline مشتركة مرة في اليوم على الأقل، بـ checks automated سريعة.
  • الـ continuous delivery معناه إن الـ mainline تقدر تطلع production في أي وقت تطلبه.
  • الـ continuous deployment معناه إن أي تغيير بيعدّي الـ pipeline بيروح production لوحده.
  • كل واحدة معتمدة على اللي قبلها، والـ mainline الحمرا أو الـ branches اللي بتعيش كتير بيبوّظوا التلاتة.

📚 المصادر

  1. Continuous Integration — Martin Fowler
  2. ContinuousDelivery — Martin Fowler (bliki)
  3. DeploymentPipeline — Martin Fowler (bliki)
  4. Capabilities: Continuous integration — DORA
  5. Capabilities: Continuous delivery — DORA

التعليقات (0)