<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Mohammad Osama on Medium]]></title>
        <description><![CDATA[Stories by Mohammad Osama on Medium]]></description>
        <link>https://medium.com/@mohammad.osamaa25?source=rss-c24c01fd6fca------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*UGvsnIEcILbpfEG475fCQg.png</url>
            <title>Stories by Mohammad Osama on Medium</title>
            <link>https://medium.com/@mohammad.osamaa25?source=rss-c24c01fd6fca------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 08:37:15 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mohammad.osamaa25/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[ Master Azure DevOps Pipelines: From Zero to Hero]]></title>
            <link>https://medium.com/@mohammad.osamaa25/master-azure-devops-pipelines-from-zero-to-hero-ce46dbdd7ae6?source=rss-c24c01fd6fca------2</link>
            <guid isPermaLink="false">https://medium.com/p/ce46dbdd7ae6</guid>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[azure-devops]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Mohammad Osama]]></dc:creator>
            <pubDate>Wed, 17 Sep 2025 17:24:57 GMT</pubDate>
            <atom:updated>2025-09-17T17:24:57.764Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*POO3ybp76wNrJQ3izmAMKg.jpeg" /></figure><p>The DevOps world is evolving faster than ever. According to the <strong>2024 State of DevOps Report by Puppet</strong>, organizations with mature DevOps practices deploy <strong>208 times more frequently</strong> and recover from failures <strong>2,604 times faster</strong> than low performers.</p><p>In this era where <strong>CI/CD pipelines</strong> are at the heart of software delivery, Azure DevOps remains one of the most powerful platforms to streamline software development and operations.</p><p>If you’re looking to move from theory to <strong>hands-on, real-world Azure DevOps mastery</strong>, I’ve built something just for you.</p><p>👉 <a href="https://www.udemy.com/course/azure-devops-pipelines-from-zero-to-hero/?referralCode=D7883D594345D9D64EA3"><strong>Azure DevOps Pipelines from Zero to Hero</strong></a></p><h3>Why Azure DevOps?</h3><ul><li><strong>Adoption at scale</strong>: Microsoft reported that <strong>more than 5 million developers</strong> actively use Azure DevOps worldwide.</li><li><strong>Seamless integration</strong>: Works across GitHub, Azure, on-prem, and multi-cloud.</li><li><strong>Enterprise-ready</strong>: Security, compliance, and scalability are built-in.</li><li><strong>All-in-one platform</strong>: Boards, Repos, Pipelines, Test Plans, and Artifacts — all in one place.</li></ul><h3>What You’ll Learn in This Course</h3><p>This isn’t just theory — it’s <strong>hands-on labs, real deployments, and guided projects</strong>. By the end of this course, you’ll be confident building production-ready pipelines.</p><h3>Key Skills You’ll Master</h3><ul><li>Set up and configure Azure DevOps Organizations and Projects.</li><li>Manage code with <strong>Azure Repos</strong>.</li><li>Create both <strong>Classic</strong> and <strong>YAML Pipelines</strong>.</li><li>Deploy apps to <strong>Azure App Services</strong>, <strong>Azure Container Apps</strong>, and <strong>AKS</strong>.</li><li>Use <strong>Helm charts</strong> with Kubernetes.</li><li>Implement <strong>self-hosted agents</strong> (Windows, Docker, Kubernetes) with <strong>KEDA auto-scaling</strong>.</li><li>Secure DevOps workflows with <strong>branch policies &amp; RBAC</strong>.</li></ul><h3>Hands-On Projects 🛠️</h3><ul><li>CI/CD for a .NET Core Web App → Azure App Services</li><li>Kubernetes deployment with <strong>YAML + Helm</strong></li><li>Self-hosted agent with <strong>Kubernetes auto-scaling</strong></li><li>Multi-stage YAML pipeline → <strong>deploy to AKS</strong></li><li>Secure DevOps setup with <strong>permissions &amp; branch policies</strong></li></ul><h3>Who Is This For?</h3><ul><li><strong>Beginners</strong> new to Azure DevOps.</li><li><strong>Intermediate engineers</strong> aiming to level up their CI/CD skills.</li><li><strong>DevOps professionals</strong> looking for <strong>real-world, enterprise-style experience</strong>.</li><li>Anyone preparing for <strong>DevOps roles</strong> with modern cloud-native tooling.</li></ul><p>👉 <a href="https://www.udemy.com/course/azure-devops-pipelines-from-zero-to-hero/?referralCode=D7883D594345D9D64EA3"><strong>Enroll in Azure DevOps Pipelines from Zero to Hero Today</strong></a></p><h3>Closing Thoughts</h3><p>DevOps isn’t just about automation — it’s about speed, resilience, and delivering value continuously.<br>If you want to <strong>build pipelines that scale like enterprises do</strong>, this course gives you the roadmap.</p><p>Take the leap from Zero ➝ Hero and start mastering Azure DevOps Pipelines now.</p><p>👉 <a href="https://www.udemy.com/course/azure-devops-pipelines-from-zero-to-hero/?referralCode=D7883D594345D9D64EA3">Start Learning Here</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ce46dbdd7ae6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Autoscaling Azure DevOps Self-Hosted Agents with KEDA on Kubernetes ]]></title>
            <link>https://medium.com/@mohammad.osamaa25/autoscaling-azure-devops-self-hosted-agents-with-keda-on-kubernetes-e591f6db9f00?source=rss-c24c01fd6fca------2</link>
            <guid isPermaLink="false">https://medium.com/p/e591f6db9f00</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[azure-devops]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[azure]]></category>
            <dc:creator><![CDATA[Mohammad Osama]]></dc:creator>
            <pubDate>Wed, 17 Sep 2025 17:15:12 GMT</pubDate>
            <atom:updated>2025-09-17T17:15:12.569Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/698/1*hC26qxWkqBGpTTnkfYlKBA.png" /></figure><p>Scaling CI/CD infrastructure efficiently is one of the biggest challenges DevOps engineers face. Azure DevOps self-hosted agents are powerful, but running them as static deployments often leads to wasted resources or limited parallelism.</p><p>In this tutorial, I’ll show you how to <strong>autoscale Azure DevOps self-hosted agents using the KEDA Operator</strong> on Kubernetes. We’ll configure agents to spin up automatically when new pipeline jobs are queued, and then gracefully terminate once the job completes.</p><p>👉 I’ve explained this step-by-step in much more detail in my Udemy course:<br><a href="https://www.udemy.com/course/azure-devops-pipelines-from-zero-to-hero/?referralCode=D7883D594345D9D64EA3"><strong>Azure DevOps Pipelines from Zero to Hero</strong></a></p><h3>Why KEDA for Autoscaling Azure DevOps Agents?</h3><p><a href="https://keda.sh/">KEDA (Kubernetes Event-Driven Autoscaler)</a> allows you to scale Kubernetes workloads based on external event sources such as message queues, databases, or even Azure DevOps pipelines.</p><p>Instead of keeping agents running all the time, KEDA will:</p><ul><li>Spin up a new agent when a pipeline build is queued.</li><li>Ensure isolated build environments by running each agent as a Kubernetes Job.</li><li>Clean up agents automatically after job completion.</li></ul><p>This approach saves resources and ensures your pipelines scale seamlessly with demand.</p><h3>Step 1: Install KEDA Operator</h3><p>We’ll install KEDA in our Kubernetes cluster using Helm:</p><pre>helm repo add kedacore https://kedacore.github.io/charts<br>helm install my-keda kedacore/keda</pre><h3>Step 2: Create a ScaledJob for Azure DevOps Agent</h3><p>Unlike running agents as Deployments, <strong>Jobs</strong> provide full control: each job starts a fresh agent pod, runs exactly one pipeline task, and then terminates.</p><blockquote>Here’s an example ScaledJob manifest:</blockquote><pre>apiVersion: keda.sh/v1alpha1<br>kind: ScaledJob<br>metadata:<br>  name: azdevops-scaledjob<br>spec:<br>  jobTargetRef:<br>    template:<br>      spec:<br>        containers:<br>        - name: azdevops-agent-job<br>          image: &lt;your self hosted agent docker image&gt;<br>          imagePullPolicy: Always<br>          env:<br>            - name: AZP_URL<br>              value: &quot;&lt;your_AzDevOps_Server_Url&gt;&quot;  <br>            - name: AZP_POOL<br>              value: &quot;&lt;AzDevOps Pool&gt;&quot;  <br>            - name: AZP_TOKEN<br>              valueFrom:<br>                secretKeyRef:<br>                  name: azp-agent-secret<br>                  key: AZP_TOKEN<br>          args: [&quot;--once&quot;]  # 👈 Ensures the agent terminates after one job<br>          securityContext:<br>            privileged: true<br>  maxReplicaCount: 10<br>  triggers:<br>  - type: azure-pipelines<br>    metadata:<br>      poolName: &quot;&lt;Az DevOps Pool&gt;&quot;<br>      organizationURLFromEnv: &quot;AZP_URL&quot;<br>      personalAccessTokenFromEnv: &quot;AZP_TOKEN&quot;</pre><h3>Required Environment Variables</h3><ul><li><strong>AZP_URL</strong> → Your Azure DevOps organization URL (e.g., <a href="https://dev.azure.com/mycompany).">https://dev.azure.com/mycompany).</a></li><li><strong>AZP_POOL</strong> → The name of the Agent Pool to register the job agents into.</li><li><strong>AZP_TOKEN</strong> → Personal Access Token (PAT) with “Agent Pools (read, manage)” scope.</li></ul><blockquote><em>👉 </em><strong><em>Store </em></strong><strong><em>AZP_TOKEN securely in a Kubernetes secret</em></strong><em> (</em><em>azp-agent-secret).</em></blockquote><pre>kubectl create secret generic azp-agent-secret \ - from-literal=AZP_TOKEN=&lt;your_pat_here&gt;</pre><h3>Step 3: Run Pipelines and Watch Autoscaling in Action</h3><p>Now, let’s test it by running a pipeline that executes 5 jobs simultaneously.</p><h3>✨ Visual walkthrough of what happens:</h3><ol><li><strong>Pipeline queued</strong> → KEDA detects queued jobs and spins up 5 fresh agent pods.</li><li><strong>Agents registered</strong> → The new pods instantly join your Azure DevOps agent pool.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0pwSP4eWF9CTP4IxZwhAXA.png" /></figure><p><strong>3. Jobs running</strong> → Each agent picks up exactly one job and executes it in isolation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_9IO35CY1DD67COw4R4Y8Q.png" /></figure><p><strong>4. Jobs completed</strong> → Thanks to the --once flag, each agent unregisters itself after the job and the pod shuts down.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mwY3Zli9o0CTYFR1SN3kRA.png" /></figure><p>This ensures that your cluster resources are used only when pipeline workloads exist.</p><h3>Final Thoughts</h3><p>By combining Azure DevOps self-hosted agents with KEDA’s event-driven autoscaling, you get:</p><ul><li>✅ <strong>Efficient resource usage</strong> — agents exist only when needed.</li><li>✅ <strong>Isolated builds</strong> — each pipeline job runs in a clean pod.</li><li>✅ <strong>Horizontal scalability</strong> — scale up to hundreds of jobs if your cluster allows.</li></ul><p>If you’re looking to master Azure DevOps pipelines from scratch to advanced setups like this one, check out my course:</p><h3>🎓 <a href="https://www.udemy.com/course/azure-devops-pipelines-from-zero-to-hero/?referralCode=D7883D594345D9D64EA3"><strong>Azure DevOps Pipelines from Zero to Hero</strong></a></h3><p>I cover not just the basics but also real-world production scenarios like caching, artifacts, self-hosted agents, and Kubernetes integrations.</p><p>💬 <strong>Have you tried running Azure DevOps agents with KEDA before?</strong> What challenges did you face? Drop your experience in the comments!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e591f6db9f00" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Running Azure DevOps Self-Hosted Agents in Docker ]]></title>
            <link>https://medium.com/@mohammad.osamaa25/running-azure-devops-self-hosted-agents-in-docker-4dfd3e2b96bd?source=rss-c24c01fd6fca------2</link>
            <guid isPermaLink="false">https://medium.com/p/4dfd3e2b96bd</guid>
            <category><![CDATA[cicd]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[azure-devops]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[azure]]></category>
            <dc:creator><![CDATA[Mohammad Osama]]></dc:creator>
            <pubDate>Wed, 17 Sep 2025 09:14:35 GMT</pubDate>
            <atom:updated>2025-09-17T09:14:35.423Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/868/0*cXtp3kNTTEaX9Wzc.png" /></figure><p>Microsoft-hosted agents are great for quick builds, but sometimes you need <strong>more control</strong>. That’s where <strong>self-hosted agents</strong> come in.</p><p>They allow you to:</p><ul><li>Install custom software or dependencies (e.g., SDKs, build tools).</li><li>Control networking and security requirements.</li><li>Reuse cached dependencies for faster builds.</li></ul><p>In this post, we’ll learn how to <strong>run an Azure DevOps self-hosted agent locally in Docker</strong>. This way, your pipelines can run jobs directly on your machine, but inside an isolated and reproducible environment.</p><p>👉 If you want to go beyond this and learn pipelines end-to-end, check out my course:<br><a href="https://www.udemy.com/course/azure-devops-pipelines-from-zero-to-hero/?referralCode=D7883D594345D9D64EA3"><strong>Azure DevOps Pipelines from Zero to Hero</strong></a></p><h3>Prerequisites ✅</h3><p>Before starting, you need:</p><ul><li>An <strong>Azure DevOps account</strong></li><li>A <strong>Personal Access Token (PAT)</strong> with “Agent Pools (read &amp; manage)” permissions</li><li>Docker installed locally</li></ul><h3>Step 1. The Dockerfile Explained 📝</h3><p>The <strong>Dockerfile</strong> defines what your container environment will look like. Think of it as a recipe that builds a ready-to-use image.</p><p>Here’s an example for Ubuntu 24.04 Dockerfile:</p><pre>FROM ubuntu:24.04 ENV TARGETARCH=&quot;linux-x64&quot;<br>Install dependencies<br>RUN apt update &amp;&amp; \ apt upgrade -y &amp;&amp; \ apt install -y curl git jq libicu74<br>#Install Azure CLI (optional but useful for scripting)<br>RUN curl -sL https://aka.ms/InstallAzureCLIDeb | bash<br>WORKDIR /azp/<br>#Copy the startup script into the container<br>COPY ./start.sh ./ RUN chmod +x ./start.sh</pre><h3>👉 Breakdown</h3><ul><li><strong>Base image</strong>: Uses Ubuntu 24.04 as the foundation.</li><li><strong>Dependencies</strong>: Installs common tools (curl, git, jq, etc.).</li><li><strong>Azure CLI</strong>: Optional, but useful if your pipelines call az commands.</li><li><strong>Workdir</strong>: /azp/ is where the agent files will live.</li><li><strong>start.sh</strong>: A custom script that handles registration and startup.</li><li><strong>Non-root user</strong>: More secure than running everything as root.</li></ul><h3>Step 2. The Start Script Explained ⚡</h3><p>The start.sh script is where the magic happens. It:</p><ul><li>Downloads the latest Azure Pipelines agent package.</li><li>Registers the agent with your Azure DevOps organization using your <strong>PAT</strong>.</li><li>Keeps the agent process running so it can pick up jobs.</li></ul><p>Here’s a simplified version:</p><pre>#!/bin/bash set -e<br># Check required variables<br>if [ -z &quot;${AZP_URL}&quot; ]; then echo &quot;error: missing AZP_URL&quot; &gt;&amp;2 exit 1 fi<br>if [ -z &quot;${AZP_TOKEN}&quot; ]; then echo &quot;error: missing AZP_TOKEN&quot; &gt;&amp;2 exit 1 fi<br># Download the latest Azure Pipelines agent<br>echo &quot;Downloading agent…&quot; curl -LsS https://vstsagentpackage.azureedge.net/agent/3.233.0/vsts-agent-linux-x64-3.233.0.tar.gz | tar -xz<br># Configure the agent<br>echo &quot;Configuring agent…&quot; ./config.sh - unattended \ - url &quot;${AZP_URL}&quot; \ - auth &quot;PAT&quot; \ - token &quot;${AZP_TOKEN}&quot; \ - pool &quot;${AZP_POOL:-Default}&quot; \ - agent &quot;${AZP_AGENT_NAME:-$(hostname)}&quot; \ - work &quot;${AZP_WORK:-_work}&quot; \ - replace \ - acceptTeeEula<br># Run the agent<br>echo &quot;Running agent…&quot; ./run.sh</pre><h3>Step 3. Build the Docker Image 🏗️</h3><p>Run this command in the same directory as your Dockerfile and start.sh:</p><pre>docker build -t azp-agent:local .</pre><blockquote>This will create an image called azp-agent:local</blockquote><h3>Step 4. Run the Container Locally 🚀</h3><p>Start your self-hosted agent with:</p><pre>docker run \ -e AZP_URL=&quot;https://dev.azure.com/&lt;ORG_NAME&gt;&quot; \ -e AZP_TOKEN=&quot;&lt;YOUR_PAT_TOKEN&gt;&quot; \ -e AZP_POOL=&quot;Default&quot; \ -e AZP_AGENT_NAME=&quot;local-docker-agent&quot; \ - name &quot;azp-agent-local&quot; \ azp-agent:local</pre><h3>What Do These Variables Mean? 🔑</h3><ul><li><strong>AZP_URL</strong> → The URL of your Azure DevOps organization (e.g., <a href="https://dev.azure.com/mycompany).">https://dev.azure.com/mycompany).</a></li><li><strong>AZP_TOKEN</strong> → A Personal Access Token (PAT) with permission to register agents. This is how the agent authenticates with Azure DevOps.</li><li><strong>AZP_POOL</strong> → The name of the Agent Pool where the agent will be registered. By default, it’s <strong>Default</strong>. You can also create a new pool under <em>Organization Settings → Agent Pools</em>.</li><li><strong>AZP_AGENT_NAME</strong> → A friendly name for your agent. This is what you’ll see in the Azure DevOps portal.</li><li><strong>— name</strong> → The name of the Docker container itself (e.g., azp-agent-local). This is for Docker management, not Azure DevOps.</li></ul><h3>Step 5. Verify the Agent ✅</h3><p>Once the container is running, go to:</p><p><strong>Azure DevOps → Organization Settings → Agent Pools → Default</strong></p><p>You should now see your new <strong>local-docker-agent</strong> online 🎉.</p><h3>Wrap-Up 🎯</h3><p>Running a self-hosted Azure DevOps agent locally in Docker gives you:</p><ul><li>Full control of the environment</li><li>Ability to test pipelines without extra infrastructure</li><li>A reproducible and isolated build machine</li></ul><p>Later, you can extend this same approach to <strong>Azure Container Instances</strong> or <strong>Kubernetes</strong> for scaling.</p><p>👉 Want to master Azure DevOps pipelines from scratch to advanced?<br>Check out my full course: <a href="https://www.udemy.com/course/azure-devops-pipelines-from-zero-to-hero/?referralCode=D7883D594345D9D64EA3"><strong>Azure DevOps Pipelines from Zero to Hero</strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4dfd3e2b96bd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to REDUCE Build Time Using Caching in Azure Pipelines ]]></title>
            <link>https://medium.com/@mohammad.osamaa25/how-to-reduce-build-time-using-caching-in-azure-pipelines-810493e0f8ff?source=rss-c24c01fd6fca------2</link>
            <guid isPermaLink="false">https://medium.com/p/810493e0f8ff</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[azure-devops]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Mohammad Osama]]></dc:creator>
            <pubDate>Tue, 16 Sep 2025 10:08:38 GMT</pubDate>
            <atom:updated>2025-09-16T10:08:38.669Z</atom:updated>
            <content:encoded><![CDATA[<p>Pipeline caching can significantly reduce build time by allowing outputs or downloaded dependencies from one run to be reused in later runs. Instead of repeatedly downloading or recreating files, you can save precious minutes (or even hours) in your CI/CD process.</p><p>In this article, we’ll explore <strong>how caching works in Azure Pipelines</strong>, show you how to enable it, and compare performance results with and without cache.</p><p>👉 If you want to go from <strong>zero to hero in Azure Pipelines</strong>, check out my full Udemy course here:<br><a href="https://www.udemy.com/course/azure-devops-pipelines-from-zero-to-hero/?referralCode=D7883D594345D9D64EA3"><strong>Azure DevOps Pipelines from Zero to Hero</strong></a></p><h3>Why Caching Matters 🕒</h3><p>When running pipelines locally, builds often benefit from cached dependencies stored on your dev machine. But Azure Pipelines uses <strong>ephemeral agents</strong> — fresh VMs or containers for each run. That means <strong>no local cache</strong> is available between runs.</p><p>This is where caching comes in:</p><ul><li>✅ <strong>Reuses dependencies</strong> like NuGet packages, npm modules, or Maven jars.</li><li>✅ <strong>Reduces network calls</strong> (fewer external downloads).</li><li>✅ <strong>Speeds up CI/CD runs</strong>, especially in dependency-heavy projects.</li></ul><p>⚠️ Note: caching helps only when the <strong>restore + save time is less than the re-download time</strong>. Otherwise, it may not improve performance.</p><h3>Enabling Caching in Pipelines</h3><p>You can enable caching with the Cache@2 task. Here’s a simple NuGet example:</p><pre>variables:<br>  solution: &#39;**/WebAppTest.sln&#39;<br>  NUGET_PACKAGES: $(Pipeline.Workspace)/.nuget/packages<br><br>- task: Cache@2<br>  inputs:<br>    key: &#39;nuget | &quot;$(Agent.OS)&quot; | **/packages.lock.json,!**/bin/**,!**/obj/**&#39;<br>    restoreKeys: |<br>       nuget | &quot;$(Agent.OS)&quot;<br>    path: $(NUGET_PACKAGES)<br>  displayName: Cache NuGet packages</pre><h3>🔑 Key Points</h3><ul><li><strong>path</strong> → folder to store/reuse cached files.</li><li><strong>key</strong> → unique identifier for the cache. (Here, OS + lock file hash).</li><li><strong>restoreKeys</strong> → fallback keys if the exact one isn’t found.</li></ul><h3>Skipping Steps on Cache Hit</h3><p>Sometimes you don’t even need to install dependencies if the cache is already restored. That’s where cacheHitVar comes in:</p><pre>variables:<br>  solution: &#39;**/WebAppTest.sln&#39;<br>  NUGET_PACKAGES: $(Pipeline.Workspace)/.nuget/packages<br>  CACHE_RESTORED: &#39;false&#39;<br><br>- task: Cache@2<br>  inputs:<br>    key: &#39;nuget | &quot;$(Agent.OS)&quot; | **/packages.lock.json,!**/bin/**,!**/obj/**&#39;<br>    restoreKeys: |<br>       nuget | &quot;$(Agent.OS)&quot;<br>    path: $(NUGET_PACKAGES)<br>    cacheHitVar: CACHE_RESTORED<br>  displayName: Cache NuGet packages<br><br>- task: NuGetCommand@2<br>  inputs:<br>    restoreSolution: &#39;$(solution)&#39;<br>  condition: ne(variables.CACHE_RESTORED, &#39;true&#39;)</pre><p>If the cache is hit, CACHE_RESTORED is set to <strong>true</strong>, and the NuGet restore step is skipped, saving time.</p><h3>Performance Comparison 📊</h3><p>Here’s a practical benchmark:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*KJG9XrjGdS-AqeRMbnaPLQ.jpeg" /></figure><p>As seen, the first cached run may take slightly longer, but from the second run onward, pipelines are <strong>noticeably faster</strong>.</p><h3>Things to Keep in Mind 📝</h3><ul><li>Works in <strong>CI and deployment jobs</strong>, not in classic release jobs.</li><li>Choose your cache key wisely → if your dependency file changes, the cache will be invalidated.</li><li>Best for projects with <strong>large, frequently reused dependencies</strong>.</li></ul><h3>Conclusion 🎯</h3><p>Azure Pipelines caching is a simple but powerful optimization that can help you <strong>save time and resources</strong>. For teams running pipelines multiple times a day, the cumulative savings are huge.</p><p>👉 Want to master Azure Pipelines with real-world examples?<br>Enroll in my course:<br><a href="https://www.udemy.com/course/azure-devops-pipelines-from-zero-to-hero/?referralCode=D7883D594345D9D64EA3"><strong>Azure DevOps Pipelines from Zero to Hero</strong></a></p><p>What’s your experience with caching in pipelines? Do you use it regularly, or is it still something on your backlog? Share your thoughts in the comments!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=810493e0f8ff" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Azure Artifacts vs Build Artifacts vs Pipeline Artifacts: The Real Differences Explained]]></title>
            <link>https://medium.com/@mohammad.osamaa25/azure-artifacts-vs-build-artifacts-vs-pipeline-artifacts-the-real-differences-explained-ef84b7d80c6f?source=rss-c24c01fd6fca------2</link>
            <guid isPermaLink="false">https://medium.com/p/ef84b7d80c6f</guid>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[azure-devops]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <dc:creator><![CDATA[Mohammad Osama]]></dc:creator>
            <pubDate>Tue, 16 Sep 2025 09:50:51 GMT</pubDate>
            <atom:updated>2025-09-16T09:50:51.477Z</atom:updated>
            <content:encoded><![CDATA[<p>When working with <strong>Azure DevOps</strong>, one of the most common points of confusion is the use of the word <em>artifacts</em>.<br>I often see engineers asking: <em>What’s the difference between Build Artifacts, Pipeline Artifacts, and Azure Artifacts?</em><br>They sound the same, but they serve <strong>very different purposes</strong>.</p><p>This post breaks it all down so you can clearly understand when to use each one.</p><h3>What is an Artifact in Azure DevOps?</h3><p>At its core, an <strong>artifact</strong> is just a set of files your build or pipeline produces and may need later.</p><ul><li>It could be DLLs compiled from your C# app.</li><li>The dist/ folder of your Node.js project.</li><li>Or even logs/output you want to download and inspect later.</li></ul><p>Artifacts exist so your builds and releases can <strong>reuse and share results</strong> efficiently.</p><p>👉 Let’s now explore the three flavors of artifacts in Azure DevOps.</p><h3>Build Artifacts</h3><p>Build Artifacts are the <strong>classic artifact storage mechanism</strong> in Azure DevOps.</p><ul><li>Available in both <strong>Classic UI Pipelines</strong> and <strong>YAML Pipelines</strong>.</li><li>Published with the Publish Build Artifacts task.</li><li>Can be downloaded with the Download Build Artifact task.</li><li>Useful for consumption across different jobs, pipelines, or release pipelines.</li><li>Stored in Azure DevOps cloud (or optionally a file share).</li></ul><p>📌 Downsides:<br>They are relatively <strong>slower to upload and download</strong>, especially with large files.</p><p>👉Here’s how Build Artifacts appear inside the Azure DevOps UI, where you can even explore their content.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*15AflE5HpiCBoKHeRycPQw.jpeg" /></figure><h3>Pipeline Artifacts</h3><p>Pipeline Artifacts are the <strong>modern replacement</strong> for Build Artifacts.</p><ul><li>Available only in <strong>YAML Pipelines</strong>.</li><li>Published with Publish Pipeline Artifact or the publish keyword.</li><li>Downloaded with Download Pipeline Artifact or automatically in deployment jobs.</li><li>Designed for <strong>speed</strong> — faster uploads and downloads due to optimized storage.</li><li>Initially limited, but now fully supported across pipelines and releases.</li></ul><p>📌 Downsides:</p><ul><li>Cannot download only part of the artifact (unlike Build Artifacts).</li><li>YAML-only, so if you’re still using Classic Pipelines, you can’t leverage them.</li></ul><h3>Azure Artifacts</h3><p>Now, here’s where things get interesting.<br>Despite the similar name, <strong>Azure Artifacts</strong> is a completely different service.</p><ul><li>It’s a <strong>package repository</strong>, like Artifactory, Nexus, or GitHub Packages.</li><li>Supports multiple package types: <strong>NuGet, npm, Python, Maven, Universal Packages</strong>.</li><li>Unlike Build/Pipeline Artifacts, these packages are <strong>independent of pipelines</strong>.</li><li>Ideal for <strong>sharing packages across teams, organizations, or publicly</strong>.</li></ul><p>📌 Pricing:</p><ul><li>First <strong>2 GB free per organization</strong>.</li><li>After that, you need a billing setup for additional storage.</li></ul><p>👉 Here’s the Azure Artifacts pricing and package type support screen from the DevOps portal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/1*tHIh8ujFnvEOxNac-AC4Pw.jpeg" /></figure><h3>Recap: Which Should You Use?</h3><ul><li><strong>Build Artifacts</strong> → Use only if you’re stuck with <strong>Classic Pipelines</strong>.</li><li><strong>Pipeline Artifacts</strong> → Use for all <strong>YAML Pipelines</strong>. They’re faster and the modern approach.</li><li><strong>Azure Artifacts</strong> → Use for <strong>package management</strong> when sharing across teams or projects.</li></ul><h3>Final Thoughts</h3><p>Artifacts in Azure DevOps may sound confusing at first, but once you separate the concepts, the picture becomes much clearer:</p><ul><li>Build Artifacts and Pipeline Artifacts → store files tied to pipeline runs.</li><li>Azure Artifacts → manage reusable packages across teams.</li></ul><p>If you want to <strong>master pipelines from the ground up</strong>, including artifacts, I cover everything step-by-step in my Udemy course:</p><p>🎓 <a href="https://www.udemy.com/course/azure-devops-pipelines-from-zero-to-hero/?referralCode=D7883D594345D9D64EA3">Azure DevOps Pipelines from Zero to Hero</a></p><p>💬 Do you use Build Artifacts, Pipeline Artifacts, or Azure Artifacts in your daily DevOps work? Drop a comment below — I’d love to hear how different teams approach it. 🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ef84b7d80c6f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Azure DevOps Classic Pipelines vs YAML Pipelines: Which One Should You Choose?]]></title>
            <link>https://medium.com/@mohammad.osamaa25/azure-devops-classic-pipelines-vs-yaml-pipelines-which-one-should-you-choose-230955901558?source=rss-c24c01fd6fca------2</link>
            <guid isPermaLink="false">https://medium.com/p/230955901558</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[azure-devops]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Mohammad Osama]]></dc:creator>
            <pubDate>Tue, 16 Sep 2025 07:58:48 GMT</pubDate>
            <atom:updated>2025-09-16T07:58:48.400Z</atom:updated>
            <content:encoded><![CDATA[<p>When it comes to Continuous Integration and Continuous Delivery (CI/CD), <strong>Azure DevOps</strong> stands out as one of the most versatile tools available today. Unlike its competitors such as <strong>GitHub Actions</strong> or <strong>GitLab CI</strong>, Azure DevOps provides developers and enterprises with <strong>two distinct ways to build pipelines</strong>:</p><ol><li><strong>Classic Pipelines</strong> — a visual, GUI-based editor for creating build and release pipelines.</li><li><strong>YAML Pipelines</strong> — configuration-as-code pipelines defined in YAML files stored in your repository.</li></ol><p>Both options are still supported, but Microsoft’s current strategy clearly favors <strong>YAML pipelines</strong>, aligning with the industry’s best practices of “configuration as code.”</p><h3>Classic Pipelines: The GUI Approach</h3><p>Classic pipelines in Azure DevOps allow you to <strong>drag, drop, and configure tasks</strong> in a graphical interface. This makes them beginner-friendly and ideal for teams who want to quickly build pipelines without deep knowledge of YAML syntax.</p><p>👉 Here’s how the <strong>Classic Pipeline GUI editor</strong> looks in Azure DevOps:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SxM4TSp1kQkahLlNw3MxjA.png" /></figure><p>✅ Advantages:</p><ul><li>Easy for newcomers — no YAML learning curve.</li><li>GUI provides clarity for non-technical stakeholders.</li><li>Great for simple projects or one-off builds.</li></ul><p>❌ Drawbacks:</p><ul><li>Limited in automation and version control.</li><li>Harder to track changes or collaborate via pull requests.</li><li>Microsoft now disables them <strong>by default</strong> in new projects (you can re-enable them in Project Settings).</li></ul><h3>YAML Pipelines: Configuration as Code</h3><p>YAML pipelines represent the modern approach to CI/CD. They are <strong>code-driven</strong>, stored directly in your repository, and benefit from version control, auditing, and easier automation.</p><p>✅ Advantages:</p><ul><li>Treat pipelines like code (audit history, pull requests, reviews).</li><li>Easier automation and reuse through templates.</li><li>Microsoft is actively investing in YAML improvements.</li></ul><p>❌ Drawbacks:</p><ul><li>Learning curve for YAML syntax.</li><li>More complex for beginners compared to GUI pipelines.</li></ul><h3>Microsoft’s Direction</h3><p>Microsoft has made their position clear: <strong>YAML pipelines are the future.</strong></p><ul><li>Classic build and release pipelines are now <strong>disabled by default</strong> for new projects.</li><li>If you still want to use them, you’ll need to explicitly enable the option in your project settings.</li></ul><p>👉 This is where you can <strong>re-enable Classic Pipelines</strong> if needed: use them, but new projects should default to YAML.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Pu2TQaZAjp4nBHAF99gKnw.jpeg" /></figure><h3>Final Thoughts</h3><p>So, which one is better?</p><p>👉 If you’re <strong>just starting out</strong> and want quick pipelines, Classic can still be useful.<br> 👉 If you’re working in <strong>modern DevOps teams</strong>, YAML pipelines are the way forward.</p><p>To really understand both worlds — and learn how to implement <strong>Classic and YAML pipelines step by step</strong> with real-world examples — I’ve built a <strong>comprehensive Udemy course</strong>:</p><p>🎓 <a href="https://www.udemy.com/course/azure-devops-pipelines-from-zero-to-hero/?referralCode=D7883D594345D9D64EA3"><strong>Azure DevOps Pipelines from Zero to Hero</strong></a></p><p>In this course, you’ll:</p><ul><li>Learn Classic and YAML pipelines hands-on.</li><li>Automate builds, tests, and deployments.</li><li>Gain the skills needed to work in modern DevOps teams.</li></ul><p>Check it out today and start mastering <strong>Azure DevOps Pipelines</strong>! 🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=230955901558" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>