[{"data":1,"prerenderedAt":821},["ShallowReactive",2],{"/en-us/blog/align-engineering-security-appsec-tests-in-ci":3,"navigation-en-us":45,"banner-en-us":455,"footer-en-us":465,"blog-post-authors-en-us-Joni Klippert":704,"blog-related-posts-en-us-align-engineering-security-appsec-tests-in-ci":718,"blog-promotions-en-us":759,"next-steps-en-us":811},{"id":4,"title":5,"authorSlugs":6,"authors":8,"body":10,"category":11,"categorySlug":11,"config":12,"content":16,"date":20,"description":17,"extension":28,"externalUrl":29,"featured":14,"heroImage":19,"isFeatured":14,"meta":30,"navigation":31,"path":32,"publishedDate":20,"rawbody":33,"seo":34,"slug":13,"stem":39,"tagSlugs":40,"tags":43,"template":15,"updatedDate":29,"__hash__":44},"blogPosts/en-us/blog/align-engineering-security-appsec-tests-in-ci.yml","How developer-centric AppSec testing can dramatically change your DevOps team",[7],"joni-klippert",[9],"Joni Klippert","\n\nSoftware development has accelerated dramatically over the past decade. As [DevOps](/topics/devops/) became pervasive, companies went from shipping software monthly to shipping software to production frequently throughout the day. This happened as engineering teams took ownership of the deployment, performance, and resilience of their software.\n\nAnd it has paid off. Companies that have adopted DevOps are deploying software significantly faster, ultimately driving business value as innovation is more rapidly delivered to customers.\n\nSecurity, however, did not keep up. Security teams typically fell into one of two positions - the blocker of frequent deployments or the team perpetually bringing up issues in last month’s work. The need for a shift in the security model is widely known. It was the subject of the [2019 Black Hat Conference keynote](https://www.blackhat.com/us-19/briefings/schedule/index.html#every-security-team-is-a-software-team-now-17280), stats from GitLab’s [2020 Global DevSecOps Survey](https://about.gitlab.com/resources/downloads/2020-devsecops-report.pdf) make this obvious, and we’ve [shared our opinions](https://www.stackhawk.com/blog/application-security-is-broken/) at StackHawk.\n\nI believe there is a solution (or at least a *huge* step in the right direction)... developer-centric [application security](/topics/devsecops/) tooling in the CI pipeline.\n\n## The CI pipeline aligns engineering and security\n\nWhile some in the industry have been debating the term DevSecOps, leading companies have started adopting developer-first security tooling that brings alignment through the CI pipeline. Instrumented correctly, it ensures that security bugs are caught before they hit production and that the fix cycle is drastically shortened.\n\nThe legacy model has security teams running application security tests against production environments. These sort of checks are great if they are your backstop. But if this is the primary way of assessing your application’s security posture, you need to catch up with modern engineering practices.\n\nModern teams are running checks on each microservice that makes up the customer facing application, catching bugs in pipeline, and equipping developers with the information to self serve fixes and triage issues. Fix times are significantly shorter, as developers are still in the context of the code they were working on. By testing microservices vs. the end state application, the underlying bugs are much easier to find and fix. And with developer-centric tooling, developers can fix bugs themselves instead of cycling through siloed internal processes. This structure better aligns each function with their best skill sets. Engineers know the application the best and are most equipped to fix, and security teams are able to focus on strategy instead of Jira ticket creation.\n\nThe key is to get the instrumentation right (read: don’t break the build for stupid stuff).\n\n## Application security tests in CI\n\nThat sounds great in theory, but what does it look like in practice? Getting started is actually more simple than it seems. We suggest adding three application security tests to start:\n\n## Software composition analysis (SCA)\n\nSCA identifies the open source dependencies in your code base and compares that against a database of known security vulnerabilities. Some tools automatically create pull requests to patch outdated libraries. Open source use is exponentially growing, especially with chained dependencies. SCA is incredibly important, but also can be noisy with non-exploitable findings.\n\nSome of the leading vendors in the space are [GitLab](/) and [Snyk](https://snyk.io/), with up and comers like [FOSSA](https://fossa.com/) also worth paying attention to.\n\n## Dynamic application security testing (DAST)\n\nDAST runs security tests against your running application, from localhost to CI to production. The beauty of DAST is that it most closely resembles what an attacker would see, by attacking your running application and reducing false positives. The two things to be sure of as you start testing with DAST is that your scanner is finding all of your paths and API endpoints and that it is able to scan as an authenticated user.\n\nGitLab provides DAST checks for Ultimate tier customers. If you want more robust scanning options and additional functionality to manage and fix bugs, [StackHawk](https://www.stackhawk.com) is the only place to turn (obviously I’m biased here). Other solutions include legacy vendors such as [Rapid7](https://www.rapid7.com/) or open source leader [ZAP](https://www.zaproxy.org/).\n\n## Secrets detection\n\nFinally, you’ll want to ensure that you have detection for leaked secrets in code. This tooling looks for credentials, keys, or other secrets that may have unintentionally been committed to the code base by developers. GitLab includes [secret detection](https://docs.gitlab.com/user/application_security/secret_detection/) in their GitLab Ultimate security tooling.\n\n## Getting started\n\nOftentimes, the thought of adding application security tests to the development workflow feels insurmountable. With a long list of priorities, engineering leadership will sometimes put this off. The reality, however, is that it is not that hard.\n\nAt StackHawk, we see many customers completing their first successful scans within 15 minutes of sign up and instrumentation in CI is literally as easy as adding [a few lines of YAML](https://docs.stackhawk.com/continuous-integration/) to your build.\n\nHere is our recommended playbook of how to get started with AppSec in CI. While this is specific to StackHawk, the principles can be applied to other tools as well.\n\n### Step 1: local testing and config\nAfter signing up and grabbing your API key, start iterating on [configuration](https://docs.stackhawk.com/hawkscan/configuration/) while testing against your application on localhost. This allows you to quickly adjust config and get successful authenticated scans running.\n\n### Step 2: non-blocking CI instrumentation\nAfter you’ve ironed out the configuration locally, add the test to your CI pipeline. At this point, it is strongly recommended to instrument as a non-blocking test so that you can triage any existing findings and smooth out any kinks.\n\n#### Step 3: bug triage - fix critical issues in flight, backlog and discuss the rest\nAfter your first non-blocking CI run, start triaging any initial findings. Any bugs marked as High criticality should likely be fixed with some sense of urgency. Lows and Mediums should be triaged depending on your application and the bugs, either quickly addressed or added to a backlog for review. Existing findings should not be the blocker for you instrumenting checks to ensure that new bugs don’t get shipped to production.\n\n#### Step 4: switch to blocking tests\nAfter ironing out config locally and in CI, and then triaging initial findings, it is time to finalize the roll out. Switch the StackHawk test to blocking mode to ensure that new security bugs don’t hit production. You can set the scanner to break on High or Medium and High, which depends on your business and the nature of the application. With this in place, you can be confident that production-ready applications have been scanned for security.\n\n## Cultural shifts: it is more than CI\nThe CI pipeline is the natural hingepoint to start aligning engineering and security. A cultural shift, however, is absolutely needed. (If you're doubtful about this, here's a frank look at why [dev and sec don't get along](/blog/developer-security-divide/).) Modern engineering teams recognize that delivering a secure application is part of quality engineering. Engineers aren’t comfortable shipping applications with UI bugs, and they shouldn’t accept security holes either.\n\nSecurity, on the other hand, needs to shift from the blocker to speedy development and to the enabler of safety in an environment of high speed delivery. Modern security engineers are ensuring that their teams are working with safe-by-default frameworks, are equipped with developer-centric tooling, and that there are proper integration tests for business logic that can’t be tested by external tooling.\n\nWhile there is significant catch up needed, it is encouraging to see the leading software teams out there testing application security on every build.\n\n## Dig deeper\n\nTo learn more about adding AppSec tests to your CI build, join me at my [How Security Belongs in DevOps](https://sched.co/dUWD) talk at GitLab Commit on August 26th. You can also always sign up for a [free StackHawk trial or demo](https://www.stackhawk.com) or talk to your GitLab sales representative about the security features in GitLab Ultimate. And for the best of both worlds, check out more details on running [automated security testing with StackHawk in GitLab](https://docs.stackhawk.com/continuous-integration/gitlab.html).\n\n_Joni Klippert is founder & CEO of StackHawk, a software-as-a-service company built to help developers find and fix security vulnerabilities in their code. Joni has been building software for developers for more than 10 years, previously serving as VP Product, VictorOps from seed stage to acquisition by Splunk. Joni is a Colorado native and holds an MBA from the University of Colorado. She currently lives in Denver with her fiance Jason and Whippet \"Q\"._\n\nCover image by [Adi Goldstein](https://unsplash.com/@adigold1) on [Unsplash](https://unsplash.com)\n\n\n\n\n","engineering",{"slug":13,"featured":14,"template":15},"align-engineering-security-appsec-tests-in-ci",false,"BlogPost",{"title":5,"description":17,"authors":18,"heroImage":19,"date":20,"body":10,"category":11,"tags":21},"Find and fix security bugs faster by implementing developer-centric application security testing in the CI pipeline. And the bonus? Engineering and security will finally be better aligned.",[9],"https://res.cloudinary.com/about-gitlab-com/image/upload/v1749681513/Blog/Hero%20Images/stackhawk.jpg","2020-08-21",[22,23,24,25,26,27],"CI/CD","collaboration","DevOps","security","testing","workflow","yml",null,{},true,"/en-us/blog/align-engineering-security-appsec-tests-in-ci","seo:\n  title: >-\n    How Developer-Centric AppSec Testing Transforms DevOps Teams\n  description: >-\n    Find and fix security bugs faster by implementing developer-centric\n    application security testing in the CI pipeline. And the bonus? Engineering\n    and security will finally be better aligned.\n  ogTitle: >-\n    How Developer-Centric AppSec Testing Transforms DevOps Teams\n  ogDescription: >-\n    Find and fix security bugs faster by implementing developer-centric\n    application security testing in the CI pipeline. And the bonus? Engineering\n    and security will finally be better aligned.\n  noIndex: false\n  ogImage: >-\n    https://res.cloudinary.com/about-gitlab-com/image/upload/v1749681513/Blog/Hero%20Images/stackhawk.jpg\n  ogUrl: https://about.gitlab.com/blog/align-engineering-security-appsec-tests-in-ci\n  ogSiteName: https://about.gitlab.com\n  ogType: article\n  canonicalUrls: https://about.gitlab.com/blog/align-engineering-security-appsec-tests-in-ci\ncontent:\n  title: >-\n    How developer-centric AppSec testing can dramatically change your DevOps team\n  description: >-\n    Find and fix security bugs faster by implementing developer-centric\n    application security testing in the CI pipeline. And the bonus? Engineering\n    and security will finally be better aligned.\n  authors:\n    - Joni Klippert\n  heroImage: >-\n    https://res.cloudinary.com/about-gitlab-com/image/upload/v1749681513/Blog/Hero%20Images/stackhawk.jpg\n  date: '2020-08-21'\n  body: >+\n\n\n    Software development has accelerated dramatically over the past decade. As\n    [DevOps](/topics/devops/) became pervasive, companies went from shipping\n    software monthly to shipping software to production frequently throughout\n    the day. This happened as engineering teams took ownership of the\n    deployment, performance, and resilience of their software.\n\n\n    And it has paid off. Companies that have adopted DevOps are deploying\n    software significantly faster, ultimately driving business value as\n    innovation is more rapidly delivered to customers.\n\n\n    Security, however, did not keep up. Security teams typically fell into one\n    of two positions - the blocker of frequent deployments or the team\n    perpetually bringing up issues in last month’s work. The need for a shift in\n    the security model is widely known. It was the subject of the [2019 Black\n    Hat Conference\n    keynote](https://www.blackhat.com/us-19/briefings/schedule/index.html#every-security-team-is-a-software-team-now-17280),\n    stats from GitLab’s [2020 Global DevSecOps\n    Survey](https://about.gitlab.com/resources/downloads/2020-devsecops-report.pdf)\n    make this obvious, and we’ve [shared our\n    opinions](https://www.stackhawk.com/blog/application-security-is-broken/) at\n    StackHawk.\n\n\n    I believe there is a solution (or at least a *huge* step in the right\n    direction)... developer-centric [application security](/topics/devsecops/)\n    tooling in the CI pipeline.\n\n\n    ## The CI pipeline aligns engineering and security\n\n\n    While some in the industry have been debating the term DevSecOps, leading\n    companies have started adopting developer-first security tooling that brings\n    alignment through the CI pipeline. Instrumented correctly, it ensures that\n    security bugs are caught before they hit production and that the fix cycle\n    is drastically shortened.\n\n\n    The legacy model has security teams running application security tests\n    against production environments. These sort of checks are great if they are\n    your backstop. But if this is the primary way of assessing your\n    application’s security posture, you need to catch up with modern engineering\n    practices.\n\n\n    Modern teams are running checks on each microservice that makes up the\n    customer facing application, catching bugs in pipeline, and equipping\n    developers with the information to self serve fixes and triage issues. Fix\n    times are significantly shorter, as developers are still in the context of\n    the code they were working on. By testing microservices vs. the end state\n    application, the underlying bugs are much easier to find and fix. And with\n    developer-centric tooling, developers can fix bugs themselves instead of\n    cycling through siloed internal processes. This structure better aligns each\n    function with their best skill sets. Engineers know the application the best\n    and are most equipped to fix, and security teams are able to focus on\n    strategy instead of Jira ticket creation.\n\n\n    The key is to get the instrumentation right (read: don’t break the build for\n    stupid stuff).\n\n\n    ## Application security tests in CI\n\n\n    That sounds great in theory, but what does it look like in practice? Getting\n    started is actually more simple than it seems. We suggest adding three\n    application security tests to start:\n\n\n    ## Software composition analysis (SCA)\n\n\n    SCA identifies the open source dependencies in your code base and compares\n    that against a database of known security vulnerabilities. Some tools\n    automatically create pull requests to patch outdated libraries. Open source\n    use is exponentially growing, especially with chained dependencies. SCA is\n    incredibly important, but also can be noisy with non-exploitable findings.\n\n\n    Some of the leading vendors in the space are [GitLab](/) and\n    [Snyk](https://snyk.io/), with up and comers like\n    [FOSSA](https://fossa.com/) also worth paying attention to.\n\n\n    ## Dynamic application security testing (DAST)\n\n\n    DAST runs security tests against your running application, from localhost to\n    CI to production. The beauty of DAST is that it most closely resembles what\n    an attacker would see, by attacking your running application and reducing\n    false positives. The two things to be sure of as you start testing with DAST\n    is that your scanner is finding all of your paths and API endpoints and that\n    it is able to scan as an authenticated user.\n\n\n    GitLab provides DAST checks for Ultimate tier customers. If you want more\n    robust scanning options and additional functionality to manage and fix bugs,\n    [StackHawk](https://www.stackhawk.com) is the only place to turn (obviously\n    I’m biased here). Other solutions include legacy vendors such as\n    [Rapid7](https://www.rapid7.com/) or open source leader\n    [ZAP](https://www.zaproxy.org/).\n\n\n    ## Secrets detection\n\n\n    Finally, you’ll want to ensure that you have detection for leaked secrets in\n    code. This tooling looks for credentials, keys, or other secrets that may\n    have unintentionally been committed to the code base by developers. GitLab\n    includes [secret\n    detection](https://docs.gitlab.com/user/application_security/secret_detection/)\n    in their GitLab Ultimate security tooling.\n\n\n    ## Getting started\n\n\n    Oftentimes, the thought of adding application security tests to the\n    development workflow feels insurmountable. With a long list of priorities,\n    engineering leadership will sometimes put this off. The reality, however, is\n    that it is not that hard.\n\n\n    At StackHawk, we see many customers completing their first successful scans\n    within 15 minutes of sign up and instrumentation in CI is literally as easy\n    as adding [a few lines of\n    YAML](https://docs.stackhawk.com/continuous-integration/) to your build.\n\n\n    Here is our recommended playbook of how to get started with AppSec in CI.\n    While this is specific to StackHawk, the principles can be applied to other\n    tools as well.\n\n\n    ### Step 1: local testing and config\n\n    After signing up and grabbing your API key, start iterating on\n    [configuration](https://docs.stackhawk.com/hawkscan/configuration/) while\n    testing against your application on localhost. This allows you to quickly\n    adjust config and get successful authenticated scans running.\n\n\n    ### Step 2: non-blocking CI instrumentation\n\n    After you’ve ironed out the configuration locally, add the test to your CI\n    pipeline. At this point, it is strongly recommended to instrument as a\n    non-blocking test so that you can triage any existing findings and smooth\n    out any kinks.\n\n\n    #### Step 3: bug triage - fix critical issues in flight, backlog and discuss\n    the rest\n\n    After your first non-blocking CI run, start triaging any initial findings.\n    Any bugs marked as High criticality should likely be fixed with some sense\n    of urgency. Lows and Mediums should be triaged depending on your application\n    and the bugs, either quickly addressed or added to a backlog for review.\n    Existing findings should not be the blocker for you instrumenting checks to\n    ensure that new bugs don’t get shipped to production.\n\n\n    #### Step 4: switch to blocking tests\n\n    After ironing out config locally and in CI, and then triaging initial\n    findings, it is time to finalize the roll out. Switch the StackHawk test to\n    blocking mode to ensure that new security bugs don’t hit production. You can\n    set the scanner to break on High or Medium and High, which depends on your\n    business and the nature of the application. With this in place, you can be\n    confident that production-ready applications have been scanned for security.\n\n\n    ## Cultural shifts: it is more than CI\n\n    The CI pipeline is the natural hingepoint to start aligning engineering and\n    security. A cultural shift, however, is absolutely needed. (If you're\n    doubtful about this, here's a frank look at why [dev and sec don't get\n    along](/blog/developer-security-divide/).) Modern engineering teams\n    recognize that delivering a secure application is part of quality\n    engineering. Engineers aren’t comfortable shipping applications with UI\n    bugs, and they shouldn’t accept security holes either.\n\n\n    Security, on the other hand, needs to shift from the blocker to speedy\n    development and to the enabler of safety in an environment of high speed\n    delivery. Modern security engineers are ensuring that their teams are\n    working with safe-by-default frameworks, are equipped with developer-centric\n    tooling, and that there are proper integration tests for business logic that\n    can’t be tested by external tooling.\n\n\n    While there is significant catch up needed, it is encouraging to see the\n    leading software teams out there testing application security on every\n    build.\n\n\n    ## Dig deeper\n\n\n    To learn more about adding AppSec tests to your CI build, join me at my [How\n    Security Belongs in DevOps](https://sched.co/dUWD) talk at GitLab Commit on\n    August 26th. You can also always sign up for a [free StackHawk trial or\n    demo](https://www.stackhawk.com) or talk to your GitLab sales representative\n    about the security features in GitLab Ultimate. And for the best of both\n    worlds, check out more details on running [automated security testing with\n    StackHawk in\n    GitLab](https://docs.stackhawk.com/continuous-integration/gitlab.html).\n\n\n    _Joni Klippert is founder & CEO of StackHawk, a software-as-a-service\n    company built to help developers find and fix security vulnerabilities in\n    their code. Joni has been building software for developers for more than 10\n    years, previously serving as VP Product, VictorOps from seed stage to\n    acquisition by Splunk. Joni is a Colorado native and holds an MBA from the\n    University of Colorado. She currently lives in Denver with her fiance Jason\n    and Whippet \"Q\"._\n\n\n    Cover image by [Adi Goldstein](https://unsplash.com/@adigold1) on\n    [Unsplash](https://unsplash.com)\n\n\n\n\n  category: engineering\n  tags:\n    - CI/CD\n    - collaboration\n    - DevOps\n    - security\n    - testing\n    - workflow\nconfig:\n  slug: align-engineering-security-appsec-tests-in-ci\n  featured: false\n  template: BlogPost\n",{"title":35,"description":17,"ogTitle":35,"ogDescription":17,"noIndex":14,"ogImage":19,"ogUrl":36,"ogSiteName":37,"ogType":38,"canonicalUrls":36},"How Developer-Centric AppSec Testing Transforms DevOps Teams","https://about.gitlab.com/blog/align-engineering-security-appsec-tests-in-ci","https://about.gitlab.com","article","en-us/blog/align-engineering-security-appsec-tests-in-ci",[41,23,42,25,26,27],"cicd","devops",[22,23,24,25,26,27],"Bd68kNwUyk5Wu9Df4izl0dh3wJBfe-i0oFCMLmcYJrI",{"data":46},{"logo":47,"freeTrial":52,"sales":57,"login":62,"items":67,"search":375,"minimal":406,"duo":425,"switchNav":434,"pricingDeployment":445},{"config":48},{"href":49,"dataGaName":50,"dataGaLocation":51},"/","gitlab logo","header",{"text":53,"config":54},"Get free trial",{"href":55,"dataGaName":56,"dataGaLocation":51},"https://gitlab.com/-/trial_registrations/new?glm_source=about.gitlab.com&glm_content=default-saas-trial/","free trial",{"text":58,"config":59},"Talk to sales",{"href":60,"dataGaName":61,"dataGaLocation":51},"/sales/","sales",{"text":63,"config":64},"Sign in",{"href":65,"dataGaName":66,"dataGaLocation":51},"https://gitlab.com/users/sign_in/","sign in",[68,95,189,194,296,356],{"text":69,"config":70,"cards":72},"Platform",{"dataNavLevelOne":71},"platform",[73,79,87],{"title":69,"description":74,"link":75},"The intelligent orchestration platform for DevSecOps",{"text":76,"config":77},"Explore our Platform",{"href":78,"dataGaName":71,"dataGaLocation":51},"/platform/",{"title":80,"description":81,"link":82},"GitLab Duo Agent Platform","Agentic AI for the entire software lifecycle",{"text":83,"config":84},"Meet GitLab Duo",{"href":85,"dataGaName":86,"dataGaLocation":51},"/gitlab-duo-agent-platform/","gitlab duo agent platform",{"title":88,"description":89,"link":90},"Why GitLab","See the top reasons enterprises choose GitLab",{"text":91,"config":92},"Learn more",{"href":93,"dataGaName":94,"dataGaLocation":51},"/why-gitlab/","why gitlab",{"text":96,"left":31,"config":97,"link":99,"lists":103,"footer":171},"Product",{"dataNavLevelOne":98},"solutions",{"text":100,"config":101},"View all Solutions",{"href":102,"dataGaName":98,"dataGaLocation":51},"/solutions/",[104,127,150],{"title":105,"description":106,"link":107,"items":112},"Automation","CI/CD and automation to accelerate deployment",{"config":108},{"icon":109,"href":110,"dataGaName":111,"dataGaLocation":51},"AutomatedCodeAlt","/solutions/delivery-automation/","automated software delivery",[113,116,119,123],{"text":22,"config":114},{"href":115,"dataGaLocation":51,"dataGaName":22},"/solutions/continuous-integration/",{"text":80,"config":117},{"href":85,"dataGaLocation":51,"dataGaName":118},"gitlab duo agent platform - product menu",{"text":120,"config":121},"Source Code Management",{"href":122,"dataGaLocation":51,"dataGaName":120},"/solutions/source-code-management/",{"text":124,"config":125},"Automated Software Delivery",{"href":110,"dataGaLocation":51,"dataGaName":126},"Automated software delivery",{"title":128,"description":129,"link":130,"items":135},"Security","Deliver code faster without compromising security",{"config":131},{"href":132,"dataGaName":133,"dataGaLocation":51,"icon":134},"/solutions/application-security-testing/","security and compliance","ShieldCheckLight",[136,140,145],{"text":137,"config":138},"Application Security Testing",{"href":132,"dataGaName":139,"dataGaLocation":51},"Application security testing",{"text":141,"config":142},"Software Supply Chain Security",{"href":143,"dataGaLocation":51,"dataGaName":144},"/solutions/supply-chain/","Software supply chain security",{"text":146,"config":147},"Software Compliance",{"href":148,"dataGaName":149,"dataGaLocation":51},"/solutions/software-compliance/","software compliance",{"title":151,"link":152,"items":157},"Measurement",{"config":153},{"icon":154,"href":155,"dataGaName":156,"dataGaLocation":51},"DigitalTransformation","/solutions/visibility-measurement/","visibility and measurement",[158,162,166],{"text":159,"config":160},"Visibility & Measurement",{"href":155,"dataGaLocation":51,"dataGaName":161},"Visibility and Measurement",{"text":163,"config":164},"Value Stream Management",{"href":165,"dataGaLocation":51,"dataGaName":163},"/solutions/value-stream-management/",{"text":167,"config":168},"Analytics & Insights",{"href":169,"dataGaLocation":51,"dataGaName":170},"/solutions/analytics-and-insights/","Analytics and insights",{"title":172,"items":173},"GitLab for",[174,179,184],{"text":175,"config":176},"Enterprise",{"href":177,"dataGaLocation":51,"dataGaName":178},"/enterprise/","enterprise",{"text":180,"config":181},"Small Business",{"href":182,"dataGaLocation":51,"dataGaName":183},"/small-business/","small business",{"text":185,"config":186},"Public Sector",{"href":187,"dataGaLocation":51,"dataGaName":188},"/solutions/public-sector/","public sector",{"text":190,"config":191},"Pricing",{"href":192,"dataGaName":193,"dataGaLocation":51,"dataNavLevelOne":193},"/pricing/","pricing",{"text":195,"config":196,"link":198,"lists":202,"feature":287},"Resources",{"dataNavLevelOne":197},"resources",{"text":199,"config":200},"View all resources",{"href":201,"dataGaName":197,"dataGaLocation":51},"/resources/",[203,236,259],{"title":204,"items":205},"Getting started",[206,211,216,221,226,231],{"text":207,"config":208},"Install",{"href":209,"dataGaName":210,"dataGaLocation":51},"/install/","install",{"text":212,"config":213},"Quick start guides",{"href":214,"dataGaName":215,"dataGaLocation":51},"/get-started/","quick setup checklists",{"text":217,"config":218},"Learn",{"href":219,"dataGaLocation":51,"dataGaName":220},"https://university.gitlab.com/","learn",{"text":222,"config":223},"Product documentation",{"href":224,"dataGaName":225,"dataGaLocation":51},"https://docs.gitlab.com/","product documentation",{"text":227,"config":228},"Best practice videos",{"href":229,"dataGaName":230,"dataGaLocation":51},"/getting-started-videos/","best practice videos",{"text":232,"config":233},"Integrations",{"href":234,"dataGaName":235,"dataGaLocation":51},"/integrations/","integrations",{"title":237,"items":238},"Discover",[239,244,249,254],{"text":240,"config":241},"Customer success stories",{"href":242,"dataGaName":243,"dataGaLocation":51},"/customers/","customer success stories",{"text":245,"config":246},"Blog",{"href":247,"dataGaName":248,"dataGaLocation":51},"/blog/","blog",{"text":250,"config":251},"The Source",{"href":252,"dataGaName":253,"dataGaLocation":51},"/the-source/","the source",{"text":255,"config":256},"Remote",{"href":257,"dataGaName":258,"dataGaLocation":51},"https://handbook.gitlab.com/handbook/company/culture/all-remote/","remote",{"title":260,"items":261},"Connect",[262,267,272,277,282],{"text":263,"config":264},"GitLab Services",{"href":265,"dataGaName":266,"dataGaLocation":51},"/services/","services",{"text":268,"config":269},"Community",{"href":270,"dataGaName":271,"dataGaLocation":51},"/community/","community",{"text":273,"config":274},"Forum",{"href":275,"dataGaName":276,"dataGaLocation":51},"https://forum.gitlab.com/","forum",{"text":278,"config":279},"Events",{"href":280,"dataGaName":281,"dataGaLocation":51},"/events/","events",{"text":283,"config":284},"Partners",{"href":285,"dataGaName":286,"dataGaLocation":51},"/partners/","partners",{"textColor":288,"title":289,"text":290,"link":291},"#000","What’s new in GitLab","Stay updated with our latest features and improvements.",{"text":292,"config":293},"Read the latest",{"href":294,"dataGaName":295,"dataGaLocation":51},"/releases/whats-new/","whats new",{"text":297,"config":298,"lists":300},"Company",{"dataNavLevelOne":299},"company",[301],{"items":302},[303,308,314,316,321,326,331,336,341,346,351],{"text":304,"config":305},"About",{"href":306,"dataGaName":307,"dataGaLocation":51},"/company/","about",{"text":309,"config":310,"footerGa":313},"Jobs",{"href":311,"dataGaName":312,"dataGaLocation":51},"/jobs/","jobs",{"dataGaName":312},{"text":278,"config":315},{"href":280,"dataGaName":281,"dataGaLocation":51},{"text":317,"config":318},"Leadership",{"href":319,"dataGaName":320,"dataGaLocation":51},"/company/team/e-group/","leadership",{"text":322,"config":323},"Team",{"href":324,"dataGaName":325,"dataGaLocation":51},"/company/team/","team",{"text":327,"config":328},"Handbook",{"href":329,"dataGaName":330,"dataGaLocation":51},"https://handbook.gitlab.com/","handbook",{"text":332,"config":333},"Investor relations",{"href":334,"dataGaName":335,"dataGaLocation":51},"https://ir.gitlab.com/","investor relations",{"text":337,"config":338},"Trust Center",{"href":339,"dataGaName":340,"dataGaLocation":51},"/security/","trust center",{"text":342,"config":343},"AI Transparency Center",{"href":344,"dataGaName":345,"dataGaLocation":51},"/ai-transparency-center/","ai transparency center",{"text":347,"config":348},"Newsletter",{"href":349,"dataGaName":350,"dataGaLocation":51},"/company/contact/#contact-forms","newsletter",{"text":352,"config":353},"Press",{"href":354,"dataGaName":355,"dataGaLocation":51},"/press/","press",{"text":357,"config":358,"lists":359},"Contact us",{"dataNavLevelOne":299},[360],{"items":361},[362,365,370],{"text":58,"config":363},{"href":60,"dataGaName":364,"dataGaLocation":51},"talk to sales",{"text":366,"config":367},"Support portal",{"href":368,"dataGaName":369,"dataGaLocation":51},"https://support.gitlab.com","support portal",{"text":371,"config":372},"Customer portal",{"href":373,"dataGaName":374,"dataGaLocation":51},"https://customers.gitlab.com/customers/sign_in/","customer portal",{"close":376,"login":377,"suggestions":384},"Close",{"text":378,"link":379},"To search repositories and projects, login to",{"text":380,"config":381},"gitlab.com",{"href":65,"dataGaName":382,"dataGaLocation":383},"search login","search",{"text":385,"default":386},"Suggestions",[387,389,393,395,399,403],{"text":80,"config":388},{"href":85,"dataGaName":80,"dataGaLocation":383},{"text":390,"config":391},"Code Suggestions (AI)",{"href":392,"dataGaName":390,"dataGaLocation":383},"/solutions/code-suggestions/",{"text":22,"config":394},{"href":115,"dataGaName":22,"dataGaLocation":383},{"text":396,"config":397},"GitLab on AWS",{"href":398,"dataGaName":396,"dataGaLocation":383},"/partners/technology-partners/aws/",{"text":400,"config":401},"GitLab on Google Cloud",{"href":402,"dataGaName":400,"dataGaLocation":383},"/partners/technology-partners/google-cloud-platform/",{"text":404,"config":405},"Why GitLab?",{"href":93,"dataGaName":404,"dataGaLocation":383},{"freeTrial":407,"mobileIcon":412,"desktopIcon":417,"secondaryButton":420},{"text":408,"config":409},"Start free trial",{"href":410,"dataGaName":56,"dataGaLocation":411},"https://gitlab.com/-/trials/new/","nav",{"altText":413,"config":414},"Gitlab Icon",{"src":415,"dataGaName":416,"dataGaLocation":411},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1758203874/jypbw1jx72aexsoohd7x.svg","gitlab icon",{"altText":413,"config":418},{"src":419,"dataGaName":416,"dataGaLocation":411},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1758203875/gs4c8p8opsgvflgkswz9.svg",{"text":421,"config":422},"Get Started",{"href":423,"dataGaName":424,"dataGaLocation":411},"https://gitlab.com/-/trial_registrations/new?glm_source=about.gitlab.com/get-started/","get started",{"freeTrial":426,"mobileIcon":430,"desktopIcon":432},{"text":427,"config":428},"Learn more about GitLab Duo",{"href":85,"dataGaName":429,"dataGaLocation":411},"gitlab duo",{"altText":413,"config":431},{"src":415,"dataGaName":416,"dataGaLocation":411},{"altText":413,"config":433},{"src":419,"dataGaName":416,"dataGaLocation":411},{"button":435,"mobileIcon":440,"desktopIcon":442},{"text":436,"config":437},"/switch",{"href":438,"dataGaName":439,"dataGaLocation":411},"#contact","switch",{"altText":413,"config":441},{"src":415,"dataGaName":416,"dataGaLocation":411},{"altText":413,"config":443},{"src":444,"dataGaName":416,"dataGaLocation":411},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1773335277/ohhpiuoxoldryzrnhfrh.png",{"freeTrial":446,"mobileIcon":451,"desktopIcon":453},{"text":447,"config":448},"Back to pricing",{"href":192,"dataGaName":449,"dataGaLocation":411,"icon":450},"back to pricing","GoBack",{"altText":413,"config":452},{"src":415,"dataGaName":416,"dataGaLocation":411},{"altText":413,"config":454},{"src":419,"dataGaName":416,"dataGaLocation":411},{"title":456,"button":457,"config":462},"See how agentic AI transforms software delivery",{"text":458,"config":459},"Watch GitLab Transcend now",{"href":460,"dataGaName":461,"dataGaLocation":51},"/events/transcend/virtual/","transcend event",{"layout":463,"icon":464,"disabled":31},"release","AiStar",{"data":466},{"text":467,"source":468,"edit":474,"contribute":479,"config":484,"items":489,"minimal":693},"Git is a trademark of Software Freedom Conservancy and our use of 'GitLab' is under license",{"text":469,"config":470},"View page source",{"href":471,"dataGaName":472,"dataGaLocation":473},"https://gitlab.com/gitlab-com/marketing/digital-experience/about-gitlab-com/","page source","footer",{"text":475,"config":476},"Edit this page",{"href":477,"dataGaName":478,"dataGaLocation":473},"https://gitlab.com/gitlab-com/marketing/digital-experience/about-gitlab-com/-/blob/main/content/","web ide",{"text":480,"config":481},"Please contribute",{"href":482,"dataGaName":483,"dataGaLocation":473},"https://gitlab.com/gitlab-com/marketing/digital-experience/about-gitlab-com/-/blob/main/CONTRIBUTING.md/","please contribute",{"twitter":485,"facebook":486,"youtube":487,"linkedin":488},"https://twitter.com/gitlab","https://www.facebook.com/gitlab","https://www.youtube.com/channel/UCnMGQ8QHMAnVIsI3xJrihhg","https://www.linkedin.com/company/gitlab-com",[490,537,588,632,659],{"title":190,"links":491,"subMenu":506},[492,496,501],{"text":493,"config":494},"View plans",{"href":192,"dataGaName":495,"dataGaLocation":473},"view plans",{"text":497,"config":498},"Why Premium?",{"href":499,"dataGaName":500,"dataGaLocation":473},"/pricing/premium/","why premium",{"text":502,"config":503},"Why Ultimate?",{"href":504,"dataGaName":505,"dataGaLocation":473},"/pricing/ultimate/","why ultimate",[507],{"title":508,"links":509},"Contact Us",[510,513,515,517,522,527,532],{"text":511,"config":512},"Contact sales",{"href":60,"dataGaName":61,"dataGaLocation":473},{"text":366,"config":514},{"href":368,"dataGaName":369,"dataGaLocation":473},{"text":371,"config":516},{"href":373,"dataGaName":374,"dataGaLocation":473},{"text":518,"config":519},"Status",{"href":520,"dataGaName":521,"dataGaLocation":473},"https://status.gitlab.com/","status",{"text":523,"config":524},"Terms of use",{"href":525,"dataGaName":526,"dataGaLocation":473},"/terms/","terms of use",{"text":528,"config":529},"Privacy statement",{"href":530,"dataGaName":531,"dataGaLocation":473},"/privacy/","privacy statement",{"text":533,"config":534},"Cookie preferences",{"dataGaName":535,"dataGaLocation":473,"id":536,"isOneTrustButton":31},"cookie preferences","ot-sdk-btn",{"title":96,"links":538,"subMenu":547},[539,543],{"text":540,"config":541},"DevSecOps platform",{"href":78,"dataGaName":542,"dataGaLocation":473},"devsecops platform",{"text":544,"config":545},"AI-Assisted Development",{"href":85,"dataGaName":546,"dataGaLocation":473},"ai-assisted development",[548],{"title":549,"links":550},"Topics",[551,555,560,563,568,573,578,583],{"text":552,"config":553},"CICD",{"href":554,"dataGaName":41,"dataGaLocation":473},"/topics/ci-cd/",{"text":556,"config":557},"GitOps",{"href":558,"dataGaName":559,"dataGaLocation":473},"/topics/gitops/","gitops",{"text":24,"config":561},{"href":562,"dataGaName":42,"dataGaLocation":473},"/topics/devops/",{"text":564,"config":565},"Version Control",{"href":566,"dataGaName":567,"dataGaLocation":473},"/topics/version-control/","version control",{"text":569,"config":570},"DevSecOps",{"href":571,"dataGaName":572,"dataGaLocation":473},"/topics/devsecops/","devsecops",{"text":574,"config":575},"Cloud Native",{"href":576,"dataGaName":577,"dataGaLocation":473},"/topics/cloud-native/","cloud native",{"text":579,"config":580},"AI for Coding",{"href":581,"dataGaName":582,"dataGaLocation":473},"/topics/devops/ai-for-coding/","ai for coding",{"text":584,"config":585},"Agentic AI",{"href":586,"dataGaName":587,"dataGaLocation":473},"/topics/agentic-ai/","agentic ai",{"title":589,"links":590},"Solutions",[591,593,595,600,604,607,611,614,616,619,622,627],{"text":137,"config":592},{"href":132,"dataGaName":137,"dataGaLocation":473},{"text":126,"config":594},{"href":110,"dataGaName":111,"dataGaLocation":473},{"text":596,"config":597},"Agile development",{"href":598,"dataGaName":599,"dataGaLocation":473},"/solutions/agile-delivery/","agile delivery",{"text":601,"config":602},"SCM",{"href":122,"dataGaName":603,"dataGaLocation":473},"source code management",{"text":552,"config":605},{"href":115,"dataGaName":606,"dataGaLocation":473},"continuous integration & delivery",{"text":608,"config":609},"Value stream management",{"href":165,"dataGaName":610,"dataGaLocation":473},"value stream management",{"text":556,"config":612},{"href":613,"dataGaName":559,"dataGaLocation":473},"/solutions/gitops/",{"text":175,"config":615},{"href":177,"dataGaName":178,"dataGaLocation":473},{"text":617,"config":618},"Small business",{"href":182,"dataGaName":183,"dataGaLocation":473},{"text":620,"config":621},"Public sector",{"href":187,"dataGaName":188,"dataGaLocation":473},{"text":623,"config":624},"Education",{"href":625,"dataGaName":626,"dataGaLocation":473},"/solutions/education/","education",{"text":628,"config":629},"Financial services",{"href":630,"dataGaName":631,"dataGaLocation":473},"/solutions/finance/","financial services",{"title":195,"links":633},[634,636,638,640,643,645,647,649,651,653,655,657],{"text":207,"config":635},{"href":209,"dataGaName":210,"dataGaLocation":473},{"text":212,"config":637},{"href":214,"dataGaName":215,"dataGaLocation":473},{"text":217,"config":639},{"href":219,"dataGaName":220,"dataGaLocation":473},{"text":222,"config":641},{"href":224,"dataGaName":642,"dataGaLocation":473},"docs",{"text":245,"config":644},{"href":247,"dataGaName":248,"dataGaLocation":473},{"text":240,"config":646},{"href":242,"dataGaName":243,"dataGaLocation":473},{"text":255,"config":648},{"href":257,"dataGaName":258,"dataGaLocation":473},{"text":263,"config":650},{"href":265,"dataGaName":266,"dataGaLocation":473},{"text":268,"config":652},{"href":270,"dataGaName":271,"dataGaLocation":473},{"text":273,"config":654},{"href":275,"dataGaName":276,"dataGaLocation":473},{"text":278,"config":656},{"href":280,"dataGaName":281,"dataGaLocation":473},{"text":283,"config":658},{"href":285,"dataGaName":286,"dataGaLocation":473},{"title":297,"links":660},[661,663,665,667,669,671,673,677,682,684,686,688],{"text":304,"config":662},{"href":306,"dataGaName":299,"dataGaLocation":473},{"text":309,"config":664},{"href":311,"dataGaName":312,"dataGaLocation":473},{"text":317,"config":666},{"href":319,"dataGaName":320,"dataGaLocation":473},{"text":322,"config":668},{"href":324,"dataGaName":325,"dataGaLocation":473},{"text":327,"config":670},{"href":329,"dataGaName":330,"dataGaLocation":473},{"text":332,"config":672},{"href":334,"dataGaName":335,"dataGaLocation":473},{"text":674,"config":675},"Sustainability",{"href":676,"dataGaName":674,"dataGaLocation":473},"/sustainability/",{"text":678,"config":679},"Diversity, inclusion and belonging (DIB)",{"href":680,"dataGaName":681,"dataGaLocation":473},"/diversity-inclusion-belonging/","Diversity, inclusion and belonging",{"text":337,"config":683},{"href":339,"dataGaName":340,"dataGaLocation":473},{"text":347,"config":685},{"href":349,"dataGaName":350,"dataGaLocation":473},{"text":352,"config":687},{"href":354,"dataGaName":355,"dataGaLocation":473},{"text":689,"config":690},"Modern Slavery Transparency Statement",{"href":691,"dataGaName":692,"dataGaLocation":473},"https://handbook.gitlab.com/handbook/legal/modern-slavery-act-transparency-statement/","modern slavery transparency statement",{"items":694},[695,698,701],{"text":696,"config":697},"Terms",{"href":525,"dataGaName":526,"dataGaLocation":473},{"text":699,"config":700},"Cookies",{"dataGaName":535,"dataGaLocation":473,"id":536,"isOneTrustButton":31},{"text":702,"config":703},"Privacy",{"href":530,"dataGaName":531,"dataGaLocation":473},[705],{"id":706,"title":9,"body":29,"config":707,"content":709,"description":29,"extension":28,"meta":713,"navigation":31,"path":714,"seo":715,"stem":716,"__hash__":717},"blogAuthors/en-us/blog/authors/joni-klippert.yml",{"template":708},"BlogAuthor",{"name":9,"config":710},{"headshot":711,"ctfId":712},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1749659488/Blog/Author%20Headshots/gitlab-logo-extra-whitespace.png","Joni-Klippert",{},"/en-us/blog/authors/joni-klippert",{},"en-us/blog/authors/joni-klippert","FR-wbcZjgNkmvOT4704POmDg5loLWGkTQsLagRuo0YM",[719,733,747],{"content":720,"config":731},{"title":721,"description":722,"authors":723,"heroImage":725,"date":726,"body":727,"category":11,"tags":728},"How to build CI/CD observability at scale","This practical guide to GitLab pipeline analytics helps self-managed users gain operational insights using Prometheus and Grafana.",[724],"Paul Meresanu","https://res.cloudinary.com/about-gitlab-com/image/upload/v1774465167/n5hlvrsrheadeccyr1oz.png","2026-04-28","CI/CD optimization starts with visibility. Building a successful DevOps platform at enterprise scale **should include** understanding pipeline performance, job execution patterns, and quantifiable operational insights — especially for organizations running GitLab self-managed instances.\n\nTo help GitLab customers maximize their platform investments, we developed the GitLab CI/CD Observability solution as part of our Platform Excellence program, which transforms raw pipeline metrics into actionable operational insights.\n\nA leading financial services organization partnered with GitLab's customer success architect to gain visibility into their GitLab self-managed deployment. Together, we implemented a containerized observability solution combining the open-source gitlab-ci-pipelines-exporter with enterprise-grade Prometheus and Grafana infrastructure.\n\nIn this article, you'll learn the challenges they faced managing pipelines at scale and how GitLab CI/CD Observability addressed them with a practical, end-to-end implementation.\n\n## The challenge: Measuring CI/CD performance\nBefore implementing any observability solution, define your measurement landscape:\n*   **What metrics matter?** Pipeline duration, job success rates, queue times, runner utilization\n*   **Who needs visibility?** Developers, DevOps engineers, platform teams, leadership\n*   **What decisions will this drive?** Infrastructure investment, bottleneck remediation, capacity planning\n\n## Solution architecture: A full set of dashboards for observability\nOnce deployed, the observability stack provides a set of Grafana dashboards that give real-time and historical visibility into your CI/CD platform. A typical deployment includes:\n*   **Pipeline Overview Dashboard:** A top-level view showing total pipeline runs, success/failure rates over time (as stacked bar or time-series charts), and average pipeline duration trends. Panels use color-coded status indicators (green for success, red for failure, amber for cancelled) so platform teams can spot degradation at a glance.\n*   **Job Performance Dashboard:** Drill-down panels showing individual job duration distributions (histogram), the top 10 slowest jobs by average duration, and job failure heatmaps by project and stage. This is where teams identify specific bottleneck jobs worth optimizing.\n*   **Runner & Infrastructure Dashboard:** Combines Node Exporter host metrics (CPU, memory, disk) with pipeline queue-time data to correlate infrastructure saturation with pipeline wait times. Useful for capacity planning decisions such as scaling runner pools or upgrading instance sizes.\n*   **Deployment Frequency Dashboard:** Tracks deployment count and deployment duration over time per environment, aligned with DORA metrics. Helps engineering leadership assess delivery throughput and environment drift (commits behind main).\n\nEach dashboard is provisioned automatically via Grafana's file-based provisioning, so it deploys consistently across environments. The dashboards can be further customized with Grafana variables to filter by project, ref/branch, or time range.\n\n![Solution architecture](https://res.cloudinary.com/about-gitlab-com/image/upload/v1777382608/Blog/Imported/blog-building-ci-cd-observability-stack-for-gitlab-self-managed/image1.png)\n\nThe solution requires two exporters:\n*   **Pipeline Exporter:** Collects CI/CD metrics via GitLab API (pipeline duration, job status, deployments)\n*   **Node Exporter:** Collects host-level metrics (CPU, memory, disk) for infrastructure correlation\n\n**Prerequisites:**\n*   GitLab Self-Managed Version 18.1+\n*   **Container orchestration platform:** A Kubernetes cluster (recommended for enterprise deployments) or a container runtime such as Docker/Podman for smaller scale or proof-of-concept environments. The primary deployment guide below targets Kubernetes; a Docker Compose alternative is provided in the appendix for local testing and evaluation\n*   GitLab Personal Access Token (**read_api** scope)\n\n## Kubernetes deployment (recommended)\nFor enterprise environments, deploy each component as a separate Deployment within a dedicated namespace. This approach integrates with existing cluster infrastructure, secrets management, and network policies.\n\n### 1. Create namespace and secret\n```bash\nkubectl create namespace gitlab-observability\n\n# Create the GitLab token secret (see Secrets Management section below\n# for enterprise-grade approaches using external secret operators)\nkubectl create secret generic gitlab-token \\\n  --from-literal=token=glpat-xxxxxxxxxxxx \\\n  -n gitlab-observability\n```\n\n\n### 2. Deploy the Pipeline Exporter\n```yaml\n# exporter-deployment.yaml\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n  name: gitlab-ci-pipelines-exporter\n  namespace: gitlab-observability\nspec:\n  replicas: 1\n  selector:\n    matchLabels:\n      app: gitlab-ci-pipelines-exporter\n  template:\n    metadata:\n      labels:\n        app: gitlab-ci-pipelines-exporter\n    spec:\n      containers:\n        - name: exporter\n          image: mvisonneau/gitlab-ci-pipelines-exporter:latest\n          ports:\n            - containerPort: 8080\n          env:\n            - name: GCPE_GITLAB_TOKEN\n              valueFrom:\n                secretKeyRef:\n                  name: gitlab-token\n                  key: token\n            - name: GCPE_CONFIG\n              value: /etc/gcpe/config.yml\n          volumeMounts:\n            - name: config\n              mountPath: /etc/gcpe\n      volumes:\n        - name: config\n          configMap:\n            name: gcpe-config\n---\napiVersion: v1\nkind: Service\nmetadata:\n  name: gitlab-ci-pipelines-exporter\n  namespace: gitlab-observability\nspec:\n  selector:\n    app: gitlab-ci-pipelines-exporter\n  ports:\n    - port: 8080\n      targetPort: 8080\n```\n\n### 3. Deploy Node Exporter (DaemonSet)\n```yaml\n# node-exporter-daemonset.yaml\napiVersion: apps/v1\nkind: DaemonSet\nmetadata:\n  name: node-exporter\n  namespace: gitlab-observability\nspec:\n  selector:\n    matchLabels:\n      app: node-exporter\n  template:\n    metadata:\n      labels:\n        app: node-exporter\n    spec:\n      containers:\n        - name: node-exporter\n          image: prom/node-exporter:latest\n          ports:\n            - containerPort: 9100\n---\napiVersion: v1\nkind: Service\nmetadata:\n  name: node-exporter\n  namespace: gitlab-observability\nspec:\n  selector:\n    app: node-exporter\n  ports:\n    - port: 9100\n      targetPort: 9100\n```\n\n### 4. Deploy Prometheus\n```yaml\n# prometheus-deployment.yaml\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n  name: prometheus\n  namespace: gitlab-observability\nspec:\n  replicas: 1\n  selector:\n    matchLabels:\n      app: prometheus\n  template:\n    metadata:\n      labels:\n        app: prometheus\n    spec:\n      containers:\n        - name: prometheus\n          image: prom/prometheus:latest\n          ports:\n            - containerPort: 9090\n          volumeMounts:\n            - name: config\n              mountPath: /etc/prometheus\n      volumes:\n        - name: config\n          configMap:\n            name: prometheus-config\n---\napiVersion: v1\nkind: Service\nmetadata:\n  name: prometheus\n  namespace: gitlab-observability\nspec:\n  selector:\n    app: prometheus\n  ports:\n    - port: 9090\n      targetPort: 9090\n```\n\n### 5. Deploy Grafana\nThe Grafana deployment below starts with authentication disabled (`GF_AUTH_ANONYMOUS_ENABLED: true`) for initial setup convenience.\n\n**This setting allows anyone with network access to view all dashboards without logging in.** For production deployments, remove this variable or set it to false and configure a proper authentication provider (LDAP, SAML/SSO, or OAuth) to restrict access to authorized users.\n```yaml\n# grafana-deployment.yaml\napiVersion: apps/v1\nkind: Deployment\nmetadata:\n  name: grafana\n  namespace: gitlab-observability\nspec:\n  replicas: 1\n  selector:\n    matchLabels:\n      app: grafana\n  template:\n    metadata:\n      labels:\n        app: grafana\n    spec:\n      containers:\n        - name: grafana\n          image: grafana/grafana:10.0.0\n          ports:\n            - containerPort: 3000\n          env:\n            # REMOVE or set to 'false' for production.\n            # When 'true', any user with network access can\n            # view dashboards without authentication.\n            - name: GF_AUTH_ANONYMOUS_ENABLED\n              value: 'true'\n          volumeMounts:\n            - name: dashboards-provider\n              mountPath: /etc/grafana/provisioning/dashboards\n            - name: datasources\n              mountPath: /etc/grafana/provisioning/datasources\n            - name: dashboards\n              mountPath: /var/lib/grafana/dashboards\n      volumes:\n        - name: dashboards-provider\n          configMap:\n            name: grafana-dashboards-provider\n        - name: datasources\n          configMap:\n            name: grafana-datasources\n        - name: dashboards\n          configMap:\n            name: grafana-dashboards\n---\napiVersion: v1\nkind: Service\nmetadata:\n  name: grafana\n  namespace: gitlab-observability\nspec:\n  selector:\n    app: grafana\n  ports:\n    - port: 3000\n      targetPort: 3000\n```\n\n### 6. Set network policy\nRestrict inter-pod traffic to only the required communication paths:\n```yaml\n# network-policy.yaml\napiVersion: networking.k8s.io/v1\nkind: NetworkPolicy\nmetadata:\n  name: observability-policy\n  namespace: gitlab-observability\nspec:\n  podSelector: {}\n  policyTypes:\n    - Ingress\n  ingress:\n    # Prometheus scrapes exporter and node-exporter\n    - from:\n        - podSelector:\n            matchLabels:\n              app: prometheus\n      ports:\n        - port: 8080\n        - port: 9100\n    # Grafana queries Prometheus\n    - from:\n        - podSelector:\n            matchLabels:\n              app: grafana\n      ports:\n        - port: 9090\n```\n\n### 7. Validate\n```bash\nkubectl get pods -n gitlab-observability\nkubectl port-forward svc/grafana 3000:3000 -n gitlab-observability\ncurl http://localhost:3000/api/health\n```\n\n## Configuration reference\n### Exporter configuration\n```yaml\n# gitlab-ci-pipelines-exporter.yml (ConfigMap: gcpe-config)\nlog:\n  level: info\ngitlab:\n  url: https://gitlab.your-domain.com\n  maximum_requests_per_second: 10\nproject_defaults:\n  pull:\n    pipeline:\n      jobs:\n        enabled: true\nwildcards:\n  - owner:\n      name: your-group-name\n      kind: group\n    archived: false\n```\n\n### Prometheus configuration\n```yaml\n# prometheus.yml (ConfigMap: prometheus-config)\nglobal:\n  scrape_interval: 15s\nscrape_configs:\n  - job_name: 'gitlab-ci-pipelines-exporter'\n    static_configs:\n      - targets: ['gitlab-ci-pipelines-exporter:8080']\n  - job_name: 'node-exporter'\n    static_configs:\n      - targets: ['node-exporter:9100']\n```\n\n### Grafana data sources\n```yaml\n# datasources.yml (ConfigMap: grafana-datasources)\napiVersion: 1\ndatasources:\n  - name: Prometheus\n    type: prometheus\n    access: proxy\n    url: http://prometheus:9090\n    isDefault: true\n# dashboards.yml (ConfigMap: grafana-dashboards-provider)\napiVersion: 1\nproviders:\n  - name: 'default'\n    folder: 'GitLab CI/CD'\n    type: file\n    options:\n      path: /var/lib/grafana/dashboards\n```\n\n## Key metrics\n### Pipeline Exporter metrics\n| Metric | Description |\n| :---- | :---- |\n| `gitlab_ci_pipeline_duration_seconds` | Pipeline execution time |\n| `gitlab_ci_pipeline_status` | Pipeline success/failure by project |\n| `gitlab_ci_pipeline_job_duration_seconds` | Individual job execution time |\n| `gitlab_ci_pipeline_job_status` | Job success/failure status |\n| `gitlab_ci_pipeline_job_artifact_size_bytes` | Artifact storage consumption |\n| `gitlab_ci_pipeline_coverage` | Code coverage percentage |\n| `gitlab_ci_environment_deployment_count` | Deployment frequency |\n| `gitlab_ci_environment_deployment_duration_seconds` | Deployment execution time |\n| `gitlab_ci_environment_behind_commits_count` | Environment drift from main |\n\n### Node Exporter metrics\n| Metric | Description |\n| :---- | :---- |\n| `node_cpu_seconds_total` | CPU utilization |\n| `node_memory_MemAvailable_bytes` | Available memory |\n| `node_filesystem_avail_bytes` | Disk space available |\n| `node_load1` | 1-minute load average |\n\n## Troubleshooting\n### Air-gapped Grafana plugin installation\nFor offline environments, install plugins manually. Example for Kubernetes:\n```bash\n# Copy plugin zip into the Grafana pod\nkubectl cp grafana-polystat-panel-2.1.16.zip \\\n  gitlab-observability/grafana-\u003Cpod-id>:/tmp/\n# Extract plugin\nkubectl exec -it -n gitlab-observability deploy/grafana -- \\\n  sh -c \"unzip /tmp/grafana-polystat-panel-2.1.16.zip -d /var/lib/grafana/plugins/\"\n# Restart Grafana pod\nkubectl rollout restart deployment/grafana -n gitlab-observability\n# Verify installation\nkubectl exec -it -n gitlab-observability deploy/grafana -- \\\n  ls -al /var/lib/grafana/plugins/\n```\n\n## Enterprise considerations\nFor regulated industries, ensure:\n*   **Token security:** Store GitLab Personal Access Tokens in a dedicated secrets manager rather than hardcoded in ConfigMaps. Enforce token rotation policies and limit scope to **read\\_api** only.\n*   **Network segmentation:** Deploy behind a reverse proxy with TLS termination. In Kubernetes, use an Ingress controller with automated certificate provisioning.\n*   **Authentication:** Configure Grafana with your organization's identity provider (SAML, LDAP, or OAuth/OIDC) to enforce role-based access control on dashboards.\n\n## Why GitLab?\nGitLab's API-first design enables custom observability solutions that complement native capabilities like Value Stream Analytics and DORA metrics. The open architecture allows organizations to integrate proven open-source tooling — like the gitlab-ci-pipelines-exporter — directly with their existing enterprise infrastructure, without disrupting established workflows.\n\nAs your observability maturity grows, GitLab's built-in Observability capabilities provide a natural next step — offering deeper, integrated visibility without additional tooling. Learn more about what's available natively in the platform for [GitLab Observability](https://docs.gitlab.com/operations/observability/observability/).\n",[22,729,730],"product","tutorial",{"featured":14,"template":15,"slug":732},"how-to-build-ci-cd-observability-at-scale",{"content":734,"config":745},{"body":735,"title":736,"description":737,"authors":738,"heroImage":740,"date":741,"category":11,"tags":742},"Most CI/CD tools can run a build and ship a deployment. Where they diverge is what happens when your delivery needs get real: a monorepo with a dozen services, microservices spread across multiple repositories, deployments to dozens of environments, or a platform team trying to enforce standards without becoming a bottleneck.\n  \nGitLab's pipeline execution model was designed for that complexity. Parent-child pipelines, DAG execution, dynamic pipeline generation, multi-project triggers, merge request pipelines with merged results, and CI/CD Components each solve a distinct class of problems. Because they compose, understanding the full model unlocks something more than a faster pipeline. In this article, you'll learn about the five patterns where that model stands out, each mapped to a real engineering scenario with the configuration to match.\n  \nThe configs below are illustrative. The scripts use echo commands to keep the signal-to-noise ratio low. Swap them out for your actual build, test, and deploy steps and they are ready to use.\n\n\n## 1. Monorepos: Parent-child pipelines + DAG execution\n\n\nThe problem: Your monorepo has a frontend, a backend, and a docs site. Every commit triggers a full rebuild of everything, even when only a README changed.\n\n\nGitLab solves this with two complementary features: [parent-child pipelines](https://docs.gitlab.com/ci/pipelines/downstream_pipelines/#parent-child-pipelines) (which let a top-level pipeline spawn isolated sub-pipelines) and [DAG execution via `needs`](https://docs.gitlab.com/ci/yaml/#needs) (which breaks rigid stage-by-stage ordering and lets jobs start the moment their dependencies finish).\n\n\nA parent pipeline detects what changed and triggers only the relevant child pipelines:\n\n```yaml\n# .gitlab-ci.yml\nstages:\n  - trigger\n\ntrigger-services:\n  stage: trigger\n  trigger:\n    include:\n      - local: '.gitlab/ci/api-service.yml'\n      - local: '.gitlab/ci/web-service.yml'\n      - local: '.gitlab/ci/worker-service.yml'\n    strategy: depend\n```\n\n\nEach child pipeline is a fully independent pipeline with its own stages, jobs, and artifacts. The parent waits for all of them via [strategy: depend](https://docs.gitlab.com/ci/pipelines/downstream_pipelines/#wait-for-downstream-pipeline-to-complete) so you get a single green/red signal at the top level, with full drill-down into each service's pipeline. This organizational separation is the bigger win for large teams: each service owns its pipeline config, changes in one cannot break another, and the complexity stays manageable as the repo grows.\n\n\nOne thing worth knowing: when you pass [multiple files to a single `trigger: include:`](https://docs.gitlab.com/ci/pipelines/downstream_pipelines/#combine-multiple-child-pipeline-configuration-files), GitLab merges them into a single child pipeline configuration. This means jobs defined across those files share the same pipeline context and can reference each other with `needs:`, which is what makes the DAG optimization possible. If you split them into separate trigger jobs instead, each would be its own isolated pipeline and cross-file `needs:` references would not work.\n\n\nCombine this with `needs:` inside each child pipeline and you get DAG execution. Your integration tests can start the moment the build finishes, without waiting for other jobs in the same stage.\n\n```yaml\n# .gitlab/ci/api-service.yml\nstages:\n  - build\n  - test\n\nbuild-api:\n  stage: build\n  script:\n    - echo \"Building API service\"\n\ntest-api:\n  stage: test\n  needs: [build-api]\n  script:\n    - echo \"Running API tests\"\n```\n\n\nWhy it matters: Teams with large monorepos typically report significant reductions in pipeline runtime after switching to DAG execution, since jobs no longer wait on unrelated work in the same stage. Parent-child pipelines add the organizational layer that keeps the configuration maintainable as the repo and team grow.\n\n![Local downstream pipelines](https://res.cloudinary.com/about-gitlab-com/image/upload/v1775738759/Blog/Imported/hackathon-fake-blog-post-s/image3_vwj3rz.png \"Local downstream pipelines\")\n\n## 2. Microservices: Cross-repo, multi-project pipelines\n\n\nThe problem: Your frontend lives in one repo, your backend in another. When the frontend team ships a change, they have no visibility into whether it broke the backend integration and vice versa.\n\n\nGitLab's [multi-project pipelines](https://docs.gitlab.com/ci/pipelines/downstream_pipelines/#multi-project-pipelines) let one project trigger a pipeline in a completely separate project and wait for the result. The triggering project gets a linked downstream pipeline right in its own pipeline view.\n\n\nThe frontend pipeline builds an API contract artifact and publishes it, then triggers the backend pipeline. The backend fetches that artifact directly using the [Jobs API](https://docs.gitlab.com/api/jobs/#download-a-single-artifact-file-from-specific-tag-or-branch) and validates it before allowing anything to proceed. If a breaking change is detected, the backend pipeline fails and the frontend pipeline fails with it.\n\n```yaml\n# frontend repo: .gitlab-ci.yml\nstages:\n  - build\n  - test\n  - trigger-backend\n\nbuild-frontend:\n  stage: build\n  script:\n    - echo \"Building frontend and generating API contract...\"\n    - mkdir -p dist\n    - |\n      echo '{\n        \"api_version\": \"v2\",\n        \"breaking_changes\": false\n      }' > dist/api-contract.json\n    - cat dist/api-contract.json\n  artifacts:\n    paths:\n      - dist/api-contract.json\n    expire_in: 1 hour\n\ntest-frontend:\n  stage: test\n  script:\n    - echo \"All frontend tests passed!\"\n\ntrigger-backend-pipeline:\n  stage: trigger-backend\n  trigger:\n    project: my-org/backend-service\n    branch: main\n    strategy: depend\n  rules:\n    - if: $CI_COMMIT_BRANCH == \"main\"\n```\n\n```yaml\n# backend repo: .gitlab-ci.yml\nstages:\n  - build\n  - test\n\nbuild-backend:\n  stage: build\n  script:\n    - echo \"All backend tests passed!\"\n\nintegration-test:\n  stage: test\n  rules:\n    - if: $CI_PIPELINE_SOURCE == \"pipeline\"\n  script:\n    - echo \"Fetching API contract from frontend...\"\n    - |\n      curl --silent --fail \\\n        --header \"JOB-TOKEN: $CI_JOB_TOKEN\" \\\n        --output api-contract.json \\\n        \"${CI_API_V4_URL}/projects/${FRONTEND_PROJECT_ID}/jobs/artifacts/main/raw/dist/api-contract.json?job=build-frontend\"\n    - cat api-contract.json\n    - |\n      if grep -q '\"breaking_changes\": true' api-contract.json; then\n        echo \"FAIL: Breaking API changes detected - backend integration blocked!\"\n        exit 1\n      fi\n      echo \"PASS: API contract is compatible!\"\n```\n\n\nA few things worth noting in this config. The `integration-test` job uses `$CI_PIPELINE_SOURCE == \"pipeline\"` to ensure it only runs when triggered by an upstream pipeline, not on a standalone push to the backend repo. The frontend project ID is referenced via `$FRONTEND_PROJECT_ID`, which should be set as a [CI/CD variable](https://docs.gitlab.com/ci/variables/) in the backend project settings to avoid hardcoding it.\n\n\nWhy it matters: Cross-service breakage that previously surfaced in production gets caught in the pipeline instead. The dependency between services stops being invisible and becomes something teams can see, track, and act on.\n\n\n![Cross-project pipelines](https://res.cloudinary.com/about-gitlab-com/image/upload/v1775738762/Blog/Imported/hackathon-fake-blog-post-s/image4_h6mfsb.png \"Cross-project pipelines\")\n\n\n## 3. Multi-tenant / matrix deployments: Dynamic child pipelines\n\n\nThe problem: You deploy the same application to 15 customer environments, or three cloud regions, or dev/staging/prod. Updating a deploy stage across all of them one by one is the kind of work that leads to configuration drift. Writing a separate pipeline for each environment is unmaintainable from day one.\n\n\nGitLab's [dynamic child pipelines](https://docs.gitlab.com/ci/pipelines/downstream_pipelines/#dynamic-child-pipelines) let you generate a pipeline at runtime. A job runs a script that produces a YAML file, and that YAML becomes the pipeline for the next stage. The pipeline structure itself becomes data.\n\n\n```yaml\n# .gitlab-ci.yml\nstages:\n  - generate\n  - trigger-environments\n\ngenerate-config:\n  stage: generate\n  script:\n    - |\n      # ENVIRONMENTS can be passed as a CI variable or read from a config file.\n      # Default to dev, staging, prod if not set.\n      ENVIRONMENTS=${ENVIRONMENTS:-\"dev staging prod\"}\n      for ENV in $ENVIRONMENTS; do\n        cat > ${ENV}-pipeline.yml \u003C\u003C EOF\n      stages:\n        - deploy\n        - verify\n      deploy-${ENV}:\n        stage: deploy\n        script:\n          - echo \"Deploying to ${ENV} environment\"\n      verify-${ENV}:\n        stage: verify\n        script:\n          - echo \"Running smoke tests on ${ENV}\"\n      EOF\n      done\n  artifacts:\n    paths:\n      - \"*.yml\"\n    exclude:\n      - \".gitlab-ci.yml\"\n\n.trigger-template:\n  stage: trigger-environments\n  trigger:\n    strategy: depend\n\ntrigger-dev:\n  extends: .trigger-template\n  trigger:\n    include:\n      - artifact: dev-pipeline.yml\n        job: generate-config\n\ntrigger-staging:\n  extends: .trigger-template\n  needs: [trigger-dev]\n  trigger:\n    include:\n      - artifact: staging-pipeline.yml\n        job: generate-config\n\ntrigger-prod:\n  extends: .trigger-template\n  needs: [trigger-staging]\n  trigger:\n    include:\n      - artifact: prod-pipeline.yml\n        job: generate-config\n  when: manual\n```\n\n\nThe generation script loops over an `ENVIRONMENTS` variable rather than hardcoding each environment separately. Pass in a different list via a CI variable or read it from a config file and the pipeline adapts without touching the YAML. The trigger jobs use [extends:](https://docs.gitlab.com/ci/yaml/#extends) to inherit shared configuration from `.trigger-template`, so `strategy: depend` is defined once rather than repeated on every trigger job. Add a new environment by updating the variable, not by duplicating pipeline config. Add [when: manual](https://docs.gitlab.com/ci/yaml/#when) to the production trigger and you get a promotion gate baked right into the pipeline graph.\n\n\nWhy it matters: SaaS companies and platform teams use this pattern to manage dozens of environments without duplicating pipeline logic. The pipeline structure itself stays lean as the deployment matrix grows.\n\n\n![Dynamic pipeline](https://res.cloudinary.com/about-gitlab-com/image/upload/v1775738765/Blog/Imported/hackathon-fake-blog-post-s/image7_wr0kx2.png \"Dynamic pipeline\")\n\n\n## 4. MR-first delivery: Merge request pipelines, merged results, and workflow routing\n\n\nThe problem: Your pipeline runs on every push to every branch. Expensive tests run on feature branches that will never merge. Meanwhile, you have no guarantee that what you tested is actually what will land on `main` after a merge.\n\n\nGitLab has three interlocking features that solve this together:\n\n\n*   [Merge request pipelines](https://docs.gitlab.com/ci/pipelines/merge_request_pipelines/) run only when a merge request exists, not on every branch push. This alone eliminates a significant amount of wasted compute.\n\n*   [Merged results pipelines](https://docs.gitlab.com/ci/pipelines/merged_results_pipelines/) go further. GitLab creates a temporary merge commit (your branch plus the current target branch) and runs the pipeline against that. You are testing what will actually exist after the merge, not just your branch in isolation.\n\n*   [Workflow rules](https://docs.gitlab.com/ci/yaml/workflow/) let you define exactly which pipeline type runs under which conditions and suppress everything else. The `$CI_OPEN_MERGE_REQUESTS` guard below prevents duplicate pipelines firing for both a branch and its open MR simultaneously.\n\n\nWith those three working together, here is what a tiered pipeline looks like:\n\n```yaml\n# .gitlab-ci.yml\nworkflow:\n  rules:\n    - if: $CI_PIPELINE_SOURCE == \"merge_request_event\"\n    - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS\n      when: never\n    - if: $CI_COMMIT_BRANCH\n    - if: $CI_PIPELINE_SOURCE == \"schedule\"\n\nstages:\n  - fast-checks\n  - expensive-tests\n  - deploy\n\nlint-code:\n  stage: fast-checks\n  script:\n    - echo \"Running linter\"\n  rules:\n    - if: $CI_PIPELINE_SOURCE == \"push\"\n    - if: $CI_PIPELINE_SOURCE == \"merge_request_event\"\n    - if: $CI_COMMIT_BRANCH == \"main\"\n\nunit-tests:\n  stage: fast-checks\n  script:\n    - echo \"Running unit tests\"\n  rules:\n    - if: $CI_PIPELINE_SOURCE == \"push\"\n    - if: $CI_PIPELINE_SOURCE == \"merge_request_event\"\n    - if: $CI_COMMIT_BRANCH == \"main\"\n\nintegration-tests:\n  stage: expensive-tests\n  script:\n    - echo \"Running integration tests (15 min)\"\n  rules:\n    - if: $CI_PIPELINE_SOURCE == \"merge_request_event\"\n    - if: $CI_COMMIT_BRANCH == \"main\"\n\ne2e-tests:\n  stage: expensive-tests\n  script:\n    - echo \"Running E2E tests (30 min)\"\n  rules:\n    - if: $CI_PIPELINE_SOURCE == \"merge_request_event\"\n    - if: $CI_COMMIT_BRANCH == \"main\"\n\nnightly-comprehensive-scan:\n  stage: expensive-tests\n  script:\n    - echo \"Running full nightly suite (2 hours)\"\n  rules:\n    - if: $CI_PIPELINE_SOURCE == \"schedule\"\n\ndeploy-production:\n  stage: deploy\n  script:\n    - echo \"Deploying to production\"\n  rules:\n    - if: $CI_COMMIT_BRANCH == \"main\"\n      when: manual\n```\n\nWith this setup, the pipeline behaves differently depending on context. A push to a feature branch with no open MR runs lint and unit tests only. Once an MR is opened, the workflow rules switch from a branch pipeline to an MR pipeline, and the full integration and E2E suite runs against the merged result. Merging to `main` queues a manual production deployment. A nightly schedule runs the comprehensive scan once, not on every commit.\n\n\nWhy it matters: Teams routinely cut CI costs significantly with this pattern, not by running fewer tests, but by running the right tests at the right time. Merged results pipelines catch the class of bugs that only appear after a merge, before they ever reach `main`.\n\n\n![Conditional pipelines (within a branch with no MR)](https://res.cloudinary.com/about-gitlab-com/image/upload/v1775738768/Blog/Imported/hackathon-fake-blog-post-s/image6_dnfcny.png \"Conditional pipelines (within a branch with no MR)\")\n\n\n\n![Conditional pipelines (within an MR)](https://res.cloudinary.com/about-gitlab-com/image/upload/v1775738772/Blog/Imported/hackathon-fake-blog-post-s/image1_wyiafu.png \"Conditional pipelines (within an MR)\")\n\n\n\n![Conditional pipelines (on the main branch)](https://res.cloudinary.com/about-gitlab-com/image/upload/v1775738774/Blog/Imported/hackathon-fake-blog-post-s/image5_r6lkfd.png \"Conditional pipelines (on the main branch)\")\n\n## 5. Governed pipelines: CI/CD Components\n\n\nThe problem: Your platform team has defined the right way to build, test, and deploy. But every team has their own `.gitlab-ci.yml` with subtle variations. Security scanning gets skipped. Deployment standards drift. Audits are painful.\n\n\nGitLab [CI/CD Components](https://docs.gitlab.com/ci/components/) let platform teams publish versioned, reusable pipeline building blocks. Application teams consume them with a single `include:` line and optional inputs — no copy-paste, no drift. Components are discoverable through the [CI/CD Catalog](https://docs.gitlab.com/ci/components/#cicd-catalog), which means teams can find and adopt approved building blocks without needing to go through the platform team directly.\n\n\nHere is a component definition from a shared library:\n\n```yaml\n# templates/deploy.yml\nspec:\n  inputs:\n    stage:\n      default: deploy\n    environment:\n      default: production\n---\ndeploy-job:\n  stage: $[[ inputs.stage ]]\n  script:\n    - echo \"Deploying $APP_NAME to $[[ inputs.environment ]]\"\n    - echo \"Deploy URL: $DEPLOY_URL\"\n  environment:\n    name: $[[ inputs.environment ]]\n```\nAnd here is how an application team consumes it:\n\n```yaml\n# Application repo: .gitlab-ci.yml\nvariables:\n  APP_NAME: \"my-awesome-app\"\n  DEPLOY_URL: \"https://api.example.com\"\n\ninclude:\n  - component: gitlab.com/my-org/component-library/build@v1.0.6\n  - component: gitlab.com/my-org/component-library/test@v1.0.6\n  - component: gitlab.com/my-org/component-library/deploy@v1.0.6\n    inputs:\n      environment: staging\n\nstages:\n  - build\n  - test\n  - deploy\n```\n\nThree lines of `include:` replace hundreds of lines of duplicated YAML. The platform team can push a security fix to `v1.0.7` and teams opt in on their own schedule — or the platform team can pin everyone to a minimum version. Either way, one change propagates everywhere instead of needing to be applied repo by repo.\n\n\nPair this with [resource groups](https://docs.gitlab.com/ci/resource_groups/) to prevent concurrent deployments to the same environment, and [protected environments](https://docs.gitlab.com/ci/environments/protected_environments/) to enforce approval gates - and you have a governed delivery platform where compliance is the default, not the exception.\n\n\nWhy it matters: This is the pattern that makes GitLab CI/CD scale across hundreds of teams. Platform engineering teams enforce compliance without becoming a bottleneck. Application teams get a fast path to a working pipeline without reinventing the wheel.\n\n\n![Component pipeline (imported jobs)](https://res.cloudinary.com/about-gitlab-com/image/upload/v1775738776/Blog/Imported/hackathon-fake-blog-post-s/image2_pizuxd.png \"Component pipeline (imported jobs)\")\n\n## Putting it all together\n\nNone of these features exist in isolation. The reason GitLab's pipeline model is worth understanding deeply is that these primitives compose:\n\n*   A monorepo uses parent-child pipelines, and each child uses DAG execution\n\n*   A microservices platform uses multi-project pipelines, and each project uses MR pipelines with merged results\n\n*   A governed platform uses CI/CD components to standardize the patterns above across every team\n\n\nMost teams discover one of these features when they hit a specific pain point. The ones who invest in understanding the full model end up with a delivery system that actually reflects how their engineering organization works, not a pipeline that fights it.\n\n## Other patterns worth exploring\n\n\nThe five patterns above cover the most common structural pain points, but GitLab's pipeline model goes further. A few others worth looking into as your needs grow:\n\n\n*   [Review apps with dynamic environments](https://docs.gitlab.com/ci/environments/) let you spin up a live preview for every feature branch and tear it down automatically when the MR closes. Useful for teams doing frontend work or API changes that need stakeholder sign-off before merging.\n\n*   [Caching and artifact strategies](https://docs.gitlab.com/ci/caching/) are often the fastest way to cut pipeline runtime after the structural work is done. Structuring `cache:` keys around dependency lockfiles and being deliberate about what gets passed between jobs with [artifacts:](https://docs.gitlab.com/ci/yaml/#artifacts) can make a significant difference without changing your pipeline shape at all.\n\n*   [Scheduled and API-triggered pipelines](https://docs.gitlab.com/ci/pipelines/schedules/) are worth knowing about because not everything should run on a code push. Nightly security scans, compliance reports, and release automation are better modeled as scheduled or [API-triggered](https://docs.gitlab.com/ci/triggers/) pipelines with `$CI_PIPELINE_SOURCE` routing the right jobs for each context.\n\n## How to get started\n\nModern software delivery is complex. Teams are managing monorepos with dozens of services, coordinating across multiple repositories, deploying to many environments at once, and trying to keep standards consistent as organizations grow. GitLab's pipeline model was built with all of that in mind.\n\nWhat makes it worth investing time in is how well the pieces fit together. Parent-child pipelines bring structure to large codebases. Multi-project pipelines make cross-team dependencies visible and testable. Dynamic pipelines turn environment management into something that scales gracefully. MR-first delivery with merged results ensures confidence at every step of the review process. And CI/CD Components give platform teams a way to share best practices across an entire organization without becoming a bottleneck.\n\nEach of these features is powerful on its own, and even more so when combined. GitLab gives you the building blocks to design a delivery system that fits how your team actually works, and grows with you as your needs evolve.\n\n> [Start a free trial of GitLab Ultimate](https://about.gitlab.com/free-trial/) to use pipeline logic today.\n\n## Read more\n\n*   [Variable and artifact sharing in GitLab parent-child pipelines](https://about.gitlab.com/blog/variable-and-artifact-sharing-in-gitlab-parent-child-pipelines/)\n*   [CI/CD inputs: Secure and preferred method to pass parameters to a pipeline](https://about.gitlab.com/blog/ci-cd-inputs-secure-and-preferred-method-to-pass-parameters-to-a-pipeline/)\n*   [Tutorial: How to set up your first GitLab CI/CD component](https://about.gitlab.com/blog/tutorial-how-to-set-up-your-first-gitlab-ci-cd-component/)\n*   [How to include file references in your CI/CD components](https://about.gitlab.com/blog/how-to-include-file-references-in-your-ci-cd-components/)\n*   [FAQ: GitLab CI/CD Catalog](https://about.gitlab.com/blog/faq-gitlab-ci-cd-catalog/)\n*   [Building a GitLab CI/CD pipeline for a monorepo the easy way](https://about.gitlab.com/blog/building-a-gitlab-ci-cd-pipeline-for-a-monorepo-the-easy-way/)\n*   [A CI/CD component builder's journey](https://about.gitlab.com/blog/a-ci-component-builders-journey/)\n*   [CI/CD Catalog goes GA: No more building pipelines from scratch](https://about.gitlab.com/blog/ci-cd-catalog-goes-ga-no-more-building-pipelines-from-scratch/)","5 ways GitLab pipeline logic solves real engineering problems","Learn how to scale CI/CD with composable patterns for monorepos, microservices, environments, and governance.",[739],"Omid Khan","https://res.cloudinary.com/about-gitlab-com/image/upload/v1772721753/frfsm1qfscwrmsyzj1qn.png","2026-04-09",[22,743,730,744],"DevOps platform","features",{"featured":31,"template":15,"slug":746},"5-ways-gitlab-pipeline-logic-solves-real-engineering-problems",{"content":748,"config":757},{"title":749,"description":750,"authors":751,"heroImage":753,"date":754,"body":755,"category":11,"tags":756},"How to use GitLab Container Virtual Registry with Docker Hardened Images","Learn how to simplify container image management with this step-by-step guide.",[752],"Tim Rizzi","https://res.cloudinary.com/about-gitlab-com/image/upload/v1772111172/mwhgbjawn62kymfwrhle.png","2026-03-12","If you're a platform engineer, you've probably had this conversation:\n  \n*\"Security says we need to use hardened base images.\"*\n\n*\"Great, where do I configure credentials for yet another registry?\"*\n\n*\"Also, how do we make sure everyone actually uses them?\"*\n\nOr this one:\n\n*\"Why are our builds so slow?\"*\n\n*\"We're pulling the same 500MB image from Docker Hub in every single job.\"*\n\n*\"Can't we just cache these somewhere?\"*\n\nI've been working on [Container Virtual Registry](https://docs.gitlab.com/user/packages/virtual_registry/container/) at GitLab specifically to solve these problems. It's a pull-through cache that sits in front of your upstream registries — Docker Hub, dhi.io (Docker Hardened Images), MCR, and Quay — and gives your teams a single endpoint to pull from. Images get cached on the first pull. Subsequent pulls come from the cache. Your developers don't need to know or care which upstream a particular image came from.\n\nThis article shows you how to set up Container Virtual Registry, specifically with Docker Hardened Images in mind, since that's a combination that makes a lot of sense for teams concerned about security and not making their developers' lives harder.\n\n## What problem are we actually solving?\n\nThe Platform teams I usually talk to manage container images across three to five registries:\n\n* **Docker Hub** for most base images\n* **dhi.io** for Docker Hardened Images (security-conscious workloads)\n* **MCR** for .NET and Azure tooling\n* **Quay.io** for Red Hat ecosystem stuff\n* **Internal registries** for proprietary images\n\nEach one has its own:\n\n* Authentication mechanism\n* Network latency characteristics\n* Way of organizing image paths\n\nYour CI/CD configs end up littered with registry-specific logic. Credential management becomes a project unto itself. And every pipeline job pulls the same base images over the network, even though they haven't changed in weeks.\n\nContainer Virtual Registry consolidates this. One registry URL. One authentication flow (GitLab's). Cached images are served from GitLab's infrastructure rather than traversing the internet each time.\n\n## How it works\n\nThe model is straightforward:\n\n```text\nYour pipeline pulls:\n  gitlab.com/virtual_registries/container/1000016/python:3.13\n\nVirtual registry checks:\n  1. Do I have this cached? → Return it\n  2. No? → Fetch from upstream, cache it, return it\n\n```\n\nYou configure upstreams in priority order. When a pull request comes in, the virtual registry checks each upstream until it finds the image. The result gets cached for a configurable period (default 24 hours).\n\n```text\n┌─────────────────────────────────────────────────────────┐\n│                    CI/CD Pipeline                       │\n│                          │                              │\n│                          ▼                              │\n│   gitlab.com/virtual_registries/container/\u003Cid>/image   │\n└─────────────────────────────────────────────────────────┘\n                           │\n                           ▼\n┌─────────────────────────────────────────────────────────┐\n│            Container Virtual Registry                   │\n│                                                         │\n│  Upstream 1: Docker Hub ────────────────┐               │\n│  Upstream 2: dhi.io (Hardened) ────────┐│               │\n│  Upstream 3: MCR ─────────────────────┐││               │\n│  Upstream 4: Quay.io ────────────────┐│││               │\n│                                      ││││               │\n│                    ┌─────────────────┴┴┴┴──┐            │\n│                    │        Cache          │            │\n│                    │  (manifests + layers) │            │\n│                    └───────────────────────┘            │\n└─────────────────────────────────────────────────────────┘\n```\n\n## Why this matters for Docker Hardened Images\n\n[Docker Hardened Images](https://docs.docker.com/dhi/) are great because of the minimal attack surface, near-zero CVEs, proper software bills of materials (SBOMs), and SLSA provenance. If you're evaluating base images for security-sensitive workloads, they should be on your list.\n\nBut adopting them creates the same operational friction as any new registry:\n\n* **Credential distribution**: You need to get Docker credentials to every system that pulls images from dhi.io.\n* **CI/CD changes**: Every pipeline needs to be updated to authenticate with dhi.io.\n* **Developer friction**: People need to remember to use the hardened variants.\n* **Visibility gap**: It's difficult to tell if teams are actually using hardened images vs. regular ones.\n\nVirtual registry addresses each of these:\n\n**Single credential**: Teams authenticate to GitLab. The virtual registry handles upstream authentication. You configure Docker credentials once, at the registry level, and they apply to all pulls.\n\n**No CI/CD changes per-team**: Point pipelines at your virtual registry. Done. The upstream configuration is centralized.\n\n**Gradual adoption**: Since images get cached with their full path, you can see in the cache what's being pulled. If someone's pulling `library/python:3.11` instead of the hardened variant, you'll know.\n\n**Audit trail**: The cache shows you exactly which images are in active use. Useful for compliance, useful for understanding what your fleet actually depends on.\n\n## Setting it up\n\nHere's a real setup using the Python client from this demo project.\n\n### Create the virtual registry\n\n```python\nfrom virtual_registry_client import VirtualRegistryClient\n\nclient = VirtualRegistryClient()\n\nregistry = client.create_virtual_registry(\n    group_id=\"785414\",  # Your top-level group ID\n    name=\"platform-images\",\n    description=\"Cached container images for platform teams\"\n)\n\nprint(f\"Registry ID: {registry['id']}\")\n# You'll need this ID for the pull URL\n```\n\n### Add Docker Hub as an upstream\n\nFor official images like Alpine, Python, etc.:\n\n```python\ndocker_upstream = client.create_upstream(\n    registry_id=registry['id'],\n    url=\"https://registry-1.docker.io\",\n    name=\"Docker Hub\",\n    cache_validity_hours=24\n)\n```\n\n### Add Docker Hardened Images (dhi.io)\n\nDocker Hardened Images are hosted on `dhi.io`, a separate registry that requires authentication:\n\n```python\ndhi_upstream = client.create_upstream(\n    registry_id=registry['id'],\n    url=\"https://dhi.io\",\n    name=\"Docker Hardened Images\",\n    username=\"your-docker-username\",\n    password=\"your-docker-access-token\",\n    cache_validity_hours=24\n)\n```\n\n### Add other upstreams\n\n```python\n# MCR for .NET teams\nclient.create_upstream(\n    registry_id=registry['id'],\n    url=\"https://mcr.microsoft.com\",\n    name=\"Microsoft Container Registry\",\n    cache_validity_hours=48\n)\n\n# Quay for Red Hat stuff\nclient.create_upstream(\n    registry_id=registry['id'],\n    url=\"https://quay.io\",\n    name=\"Quay.io\",\n    cache_validity_hours=24\n)\n```\n\n### Update your CI/CD\n\nHere's a `.gitlab-ci.yml` that pulls through the virtual registry:\n\n```yaml\nvariables:\n  VIRTUAL_REGISTRY_ID: \u003Cyour_virtual_registry_ID>\n\n  \nbuild:\n  image: docker:24\n  services:\n    - docker:24-dind\n  before_script:\n    # Authenticate to GitLab (which handles upstream auth for you)\n    - echo \"${CI_JOB_TOKEN}\" | docker login -u gitlab-ci-token --password-stdin gitlab.com\n  script:\n    # All of these go through your single virtual registry\n    \n    # Official Docker Hub images (use library/ prefix)\n    - docker pull gitlab.com/virtual_registries/container/${VIRTUAL_REGISTRY_ID}/library/alpine:latest\n    \n    # Docker Hardened Images from dhi.io (no prefix needed)\n    - docker pull gitlab.com/virtual_registries/container/${VIRTUAL_REGISTRY_ID}/python:3.13\n    \n    # .NET from MCR\n    - docker pull gitlab.com/virtual_registries/container/${VIRTUAL_REGISTRY_ID}/dotnet/sdk:8.0\n```\n\n### Image path formats\n\nDifferent registries use different path conventions:\n\n| Registry | Pull URL Example |\n|----------|------------------|\n| Docker Hub (official) | `.../library/python:3.11-slim` |\n| Docker Hardened Images (dhi.io) | `.../python:3.13` |\n| MCR | `.../dotnet/sdk:8.0` |\n| Quay.io | `.../prometheus/prometheus:latest` |\n\n### Verify it's working\n\nAfter some pulls, check your cache:\n\n```python\nupstreams = client.list_registry_upstreams(registry['id'])\nfor upstream in upstreams:\n    entries = client.list_cache_entries(upstream['id'])\n    print(f\"{upstream['name']}: {len(entries)} cached entries\")\n\n```\n\n## What the numbers look like\n\nI ran tests pulling images through the virtual registry:\n\n| Metric | Without Cache | With Warm Cache |\n|--------|---------------|-----------------|\n| Pull time (Alpine) | 10.3s | 4.2s |\n| Pull time (Python 3.13 DHI) | 11.6s | ~4s |\n| Network roundtrips to upstream | Every pull | Cache misses only |\n\n\n\n\nThe first pull is the same speed (it has to fetch from upstream). Every pull after that, for the cache validity period, comes straight from GitLab's storage. No network hop to Docker Hub, dhi.io, MCR, or wherever the image lives.\n\nFor a team running hundreds of pipeline jobs per day, that's hours of cumulative build time saved.\n\n## Practical considerations\nHere are some considerations to keep in mind:\n\n### Cache validity\n\n24 hours is the default. For security-sensitive images where you want patches quickly, consider 12 hours or less:\n\n```python\nclient.create_upstream(\n    registry_id=registry['id'],\n    url=\"https://dhi.io\",\n    name=\"Docker Hardened Images\",\n    username=\"your-username\",\n    password=\"your-token\",\n    cache_validity_hours=12\n)\n```\n\nFor stable, infrequently-updated images (like specific version tags), longer validity is fine.\n\n### Upstream priority\n\nUpstreams are checked in order. If you have images with the same name on different registries, the first matching upstream wins.\n\n### Limits\n\n* Maximum of 20 virtual registries per group\n* Maximum of 20 upstreams per virtual registry\n\n## Configuration via UI\n\nYou can also configure virtual registries and upstreams directly from the GitLab UI—no API calls required. Navigate to your group's **Settings > Packages and registries > Virtual Registry** to:\n\n* Create and manage virtual registries\n* Add, edit, and reorder upstream registries\n* View and manage the cache\n* Monitor which images are being pulled\n\n## What's next\n\nWe're actively developing:\n\n* **Allow/deny lists**: Use regex to control which images can be pulled from specific upstreams.\n\nThis is beta software. It works, people are using it in production, but we're still iterating based on feedback.\n\n## Share your feedback\n\nIf you're a platform engineer dealing with container registry sprawl, I'd like to understand your setup:\n\n* How many upstream registries are you managing?\n* What's your biggest pain point with the current state?\n* Would something like this help, and if not, what's missing?\n\nPlease share your experiences in the [Container Virtual Registry feedback issue](https://gitlab.com/gitlab-org/gitlab/-/work_items/589630).\n## Related resources\n- [New GitLab metrics and registry features help reduce CI/CD bottlenecks](https://about.gitlab.com/blog/new-gitlab-metrics-and-registry-features-help-reduce-ci-cd-bottlenecks/#container-virtual-registry)\n- [Container Virtual Registry documentation](https://docs.gitlab.com/user/packages/virtual_registry/container/)\n- [Container Virtual Registry API](https://docs.gitlab.com/api/container_virtual_registries/)",[730,729,744],{"featured":14,"template":15,"slug":758},"using-gitlab-container-virtual-registry-with-docker-hardened-images",{"promotions":760},[761,775,786,797],{"id":762,"categories":763,"header":765,"text":766,"button":767,"image":772},"ai-modernization",[764],"ai-ml","Is AI achieving its promise at scale?","Quiz will take 5 minutes or less",{"text":768,"config":769},"Get your AI maturity score",{"href":770,"dataGaName":771,"dataGaLocation":248},"/assessments/ai-modernization-assessment/","modernization assessment",{"config":773},{"src":774},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1772138786/qix0m7kwnd8x2fh1zq49.png",{"id":776,"categories":777,"header":778,"text":766,"button":779,"image":783},"devops-modernization",[729,572],"Are you just managing tools or shipping innovation?",{"text":780,"config":781},"Get your DevOps maturity score",{"href":782,"dataGaName":771,"dataGaLocation":248},"/assessments/devops-modernization-assessment/",{"config":784},{"src":785},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1772138785/eg818fmakweyuznttgid.png",{"id":787,"categories":788,"header":789,"text":766,"button":790,"image":794},"security-modernization",[25],"Are you trading speed for security?",{"text":791,"config":792},"Get your security maturity score",{"href":793,"dataGaName":771,"dataGaLocation":248},"/assessments/security-modernization-assessment/",{"config":795},{"src":796},"https://res.cloudinary.com/about-gitlab-com/image/upload/v1772138786/p4pbqd9nnjejg5ds6mdk.png",{"id":798,"paths":799,"header":802,"text":803,"button":804,"image":809},"github-azure-migration",[800,801],"migration-from-azure-devops-to-gitlab","integrating-azure-devops-scm-and-gitlab","Is your team ready for GitHub's Azure move?","GitHub is already rebuilding around Azure. Find out what it means for you.",{"text":805,"config":806},"See how GitLab compares to GitHub",{"href":807,"dataGaName":808,"dataGaLocation":248},"/compare/gitlab-vs-github/github-azure-migration/","github azure migration",{"config":810},{"src":785},{"header":812,"blurb":813,"button":814,"secondaryButton":819},"Start building faster today","See what your team can do with the intelligent orchestration platform for DevSecOps.\n",{"text":815,"config":816},"Get your free trial",{"href":817,"dataGaName":56,"dataGaLocation":818},"https://gitlab.com/-/trial_registrations/new?glm_content=default-saas-trial&glm_source=about.gitlab.com/","feature",{"text":511,"config":820},{"href":60,"dataGaName":61,"dataGaLocation":818},1777493578220]