<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                # Directed Acyclic Graph > 原文:[https://docs.gitlab.com/ee/ci/directed_acyclic_graph/](https://docs.gitlab.com/ee/ci/directed_acyclic_graph/) * [Use cases](#use-cases) * [Usage](#usage) * [Limitations](#limitations) * [DAG Visualization](#dag-visualization) * [Enable or disable DAG Visualization](#enable-or-disable-dag-visualization-core-only) # Directed Acyclic Graph[](#directed-acyclic-graph "Permalink") 版本歷史 * 在 GitLab 12.2 中[引入](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/47063) . * 在 GitLab 12.10 中[已刪除功能標記](https://gitlab.com/gitlab-org/gitlab/-/issues/206902) . 可以在 CI / CD 管道的上下文中使用有[向無環圖,](https://www.techopedia.com/definition/5739/directed-acyclic-graph-dag)以建立作業之間的關系,從而以最快的方式執行,而不管如何設置階段. 例如,您可能擁有特定的工具或單獨的網站,這些網站是作為主項目的一部分而構建的. 使用 DAG,您可以指定這些作業之間的關系,然后 GitLab 將盡快執行作業,而不是等待每個階段完成. 與其他針對 CI / CD 的 DAG 解決方案不同,GitLab 不需要您選擇其中一個. 您可以在單個管道中實現 DAG 和傳統的基于階段的操作的混合組合. 配置非常簡單,只需一個關鍵字即可為任何作業啟用該功能. 考慮如下的 monorepo: ``` ./service_a ./service_b ./service_c ./service_d ``` 它具有如下所示的管道: | build | test | deploy | | --- | --- | --- | | build_a | test_a | deploy_a | | build_b | test_b | deploy_b | | build_c | test_c | deploy_c | | build_d | test_d | deploy_d | 使用 DAG,您可以將`_a`作業與`_b`作業彼此關聯,即使服務`a`構建時間很長,服務`b`也不會等待它,并且會盡快完成. 在這個非常相同的管道中, `_c`和`_d`可以單獨放置,并且可以像任何普通的 GitLab 管道一樣以分段的順序一起運行. ## Use cases[](#use-cases "Permalink") DAG 可以幫助解決 CI / CD 管道中作業之間的幾種不同類型的關系. 最典型的情況是,當作業需要展開或展開和/或合并回去時(鉆石相關性),這可以解決. 當您處理多平臺構建或復雜的依賴關系網時,例如在操作系統構建或可獨立部署但相關的微服務的復雜部署圖中,可能會發生這種情況. 此外,DAG 可以幫助提高管道的總體速度,并有助于提供快速反饋. 通過創建不會相互阻塞的依賴關系,您的管道將盡可能快地運行,而不管管道的階段如何,從而確保開發人員可以盡快獲得輸出(包括錯誤). ## Usage[](#usage "Permalink") 使用[`needs:`關鍵字](../yaml/README.html#needs)定義作業之間的關系. 請注意, `needs:`也可與[parallel](../yaml/README.html#parallel)關鍵字一起使用,從而為管道內的[并行化](../yaml/README.html#parallel)提供了強大的選項. ## Limitations[](#limitations "Permalink") 有向無環圖是一個復雜的功能,從最初的 MVC 開始,您可能需要解決某些用例. 想要查詢更多的信息: * [`needs` requirements and limitations](../yaml/README.html#requirements-and-limitations). * 相關的史詩[跟蹤計劃的改進](https://gitlab.com/groups/gitlab-org/-/epics/1716) . ## DAG Visualization[](#dag-visualization "Permalink") 版本歷史 * 在 GitLab 13.1 中作為[Beta 功能](https://about.gitlab.com/handbook/product/#beta) [引入](https://gitlab.com/gitlab-org/gitlab/-/issues/215517) . * 它部署在功能標記后面,默認情況下處于禁用狀態. * [默認情況下](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/36802)在 13.2 中[啟用](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/36802) . * 在 GitLab.com 上啟用了它. * 對于 GitLab 自我管理的實例,GitLab 管理員可以選擇[禁用它](#enable-or-disable-dag-visualization-core-only) . 通過 DAG 可視化,可以更輕松地可視化 DAG 中依賴作業之間的關系. 此圖將顯示管道中需要或其他作業需要的所有作業. 沒有關系的作業不會顯示在該視圖中. [![DAG visualization example](https://img.kancloud.cn/b9/5d/b95d5e48ff3805ad9458f5d871557fb1_1025x480.png)](img/dag_graph_example_v13_1.png) 單擊節點將突出顯示其依賴的所有作業路徑. [![DAG visualization with path highlight](https://img.kancloud.cn/3d/fe/3dfede1cdd17f2351047cb2a79372043_1025x481.png)](img/dag_graph_example_clicked_v13_1.png) ### Enable or disable DAG Visualization[](#enable-or-disable-dag-visualization-core-only "Permalink") DAG 可視化正在開發中,但已作為 Beta 功能提供,因此用戶可以檢查其限制和用途. 它部署在**默認情況下啟用**的功能標志的后面. [有權訪問 GitLab Rails 控制臺的 GitLab 管理員](../../administration/feature_flags.html)可以選擇為您的實例禁用它: ``` # Instance-wide Feature.disable(:dag_pipeline_tab) # or by project Feature.disable(:dag_pipeline_tab, Project.find(<project id>)) ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看