<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>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                # Merge when pipeline succeeds > 原文:[https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html) * [How it works](#how-it-works) * [Only allow merge requests to be merged if the pipeline succeeds](#only-allow-merge-requests-to-be-merged-if-the-pipeline-succeeds) * [Limitations](#limitations) * [Skipped pipelines](#skipped-pipelines) * [From the command line](#from-the-command-line) # Merge when pipeline succeeds[](#merge-when-pipeline-succeeds "Permalink") 在查看看起來準備合并但仍在運行管道的合并請求時,可以將其設置為在管道成功時自動合并. 這樣,您不必等待管道完成,而不必記住手動合并請求. [![Enable](https://img.kancloud.cn/1e/c0/1ec02d19a85a0e2519cb5f3f270380ba_958x223.png)](img/merge_when_pipeline_succeeds_enable.png) ## How it works[](#how-it-works "Permalink") 當您單擊"管道成功時合并"時,合并請求的狀態將更新以顯示即將進行的合并. 如果您不能等待管道成功,則可以**立即**在主按鈕右側的下拉菜單中選擇" **合并"** . 合并請求的作者和具有開發人員權限的項目成員可以在管道完成之前的任何時間取消自動合并. [![Status](https://img.kancloud.cn/4d/2e/4d2e798068175ffd9d8ad9182d247327_970x324.png)](img/merge_when_pipeline_succeeds_status.png) 管道成功后,合并請求將自動合并. 當管道失敗時,作者有機會重試任何失敗的作業,或推送新的提交以修復失敗. 重試作業并第二次嘗試成功后,合并請求將自動合并. 當使用新提交更新合并請求時,自動合并將被取消以允許查看新更改. ## Only allow merge requests to be merged if the pipeline succeeds[](#only-allow-merge-requests-to-be-merged-if-the-pipeline-succeeds "Permalink") 如果合并請求的管道未成功或存在要解析的線程,則可以阻止合并請求. 這對兩個都適用: * GitLab CI / CD 管道 * 管道從[外部 CI 集成](../integrations/overview.html#integrations-listing)運行 因此, [禁用 GitLab CI / CD 管道](../../../ci/enable_or_disable_ci.html)不會禁用此功能,因為可以將外部 CI 提供程序的管道與該功能一起使用. 要啟用它,您必須: 1. 導航到項目的**"設置">"常規"**頁面. 2. 展開**合并請求**部分. 3. 在" **合并檢查"**小節中,選中" **管道必須成功"**復選框. 4. 按**保存**使更改生效. This setting also prevents merge requests from being merged if there is no pipeline. ### Limitations[](#limitations "Permalink") 啟用此設置后,如果沒有管道,將阻止合并請求. 這可能與[`only/except`](../../../ci/yaml/README.html#onlyexcept-advanced)使用[`only/except`](../../../ci/yaml/README.html#onlyexcept-advanced)或[`rules`](../../../ci/yaml/README.html#rules)且不生成任何管道的某些用例相沖突. 您應該確保[始終有一個管道](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/54226)并且該[管道](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/54226)是成功的. 如果為單個合并請求觸發了分支管道和合并請求管道,則僅檢查*合并請求管道*的成功或失敗. 如果合并請求管道配置的工作少于分支管道,則它可能允許失敗測試的代碼被合并: ``` branch-pipeline-job: rules: - if: '$CI_PIPELINE_SOURCE == "push"' script: - echo "Code testing scripts here, for example." merge-request-pipeline-job: rules: - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' script: - echo "No tests run, but this pipeline always succeeds and enables merge." - echo true ``` 您應該避免這樣的配置,并盡可能使用分支( `push` )管道或合并請求管道. 有關在單個合并請求中避免使用兩個管道的詳細信息,請參見[`rules`文檔](../../../ci/yaml/README.html#differences-between-rules-and-onlyexcept) . ### Skipped pipelines[](#skipped-pipelines "Permalink") 在 GitLab 13.1 中[引入](https://gitlab.com/gitlab-org/gitlab/-/issues/211482) . 選中" **管道必須成功"**復選框時, [跳過的管道會](../../../ci/yaml/README.html#skip-pipeline)阻止合并請求被合并. 更改此行為: 1. 導航到項目的**"設置">"常規"**頁面. 2. 展開**合并請求**部分. 3. 在" **合并檢查"**小節中,確保已選中" **管道必須成功"** . 4. 在" **合并檢查"**小節中,選中" **跳過的管道被視為成功"**復選框. 5. 按**保存**使更改生效. ## From the command line[](#from-the-command-line "Permalink") 當從命令行進行[推送](../push_options.html)時,當管道成功請求合并請求時,可以使用" [推送選項"](../push_options.html)啟用合并.
                  <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>

                              哎呀哎呀视频在线观看