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

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                # Releases > 原文:[https://docs.gitlab.com/ee/user/project/releases/](https://docs.gitlab.com/ee/user/project/releases/) * [View releases](#view-releases) * [Create a release](#create-a-release) * [Schedule a future release](#schedule-a-future-release) * [Edit a release](#edit-a-release) * [Add release notes to Git tags](#add-release-notes-to-git-tags) * [Associate milestones with a release](#associate-milestones-with-a-release) * [Get notified when a release is created](#get-notified-when-a-release-is-created) * [Prevent unintentional releases by setting a deploy freeze](#prevent-unintentional-releases-by-setting-a-deploy-freeze) * [Release fields](#release-fields) * [Tag name](#tag-name) * [Release notes description](#release-notes-description) * [Release assets](#release-assets) * [Permanent links to release assets](#permanent-links-to-release-assets) * [Source code](#source-code) * [Links](#links) * [Release evidence](#release-evidence) * [Collect release evidence](#collect-release-evidence-premium-only) * [Include report artifacts as release evidence](#include-report-artifacts-as-release-evidence-ultimate-only) * [Schedule release evidence collection](#schedule-release-evidence-collection) * [Disable release evidence display](#disable-release-evidence-display-core-only) * [GitLab Releaser](#gitlab-releaser) # Releases[](#releases "Permalink") 在 GitLab 11.7 中[引入](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/41766) . 要在源代碼歷史記錄中引入檢查點,可以在發布時分配[Git 標簽](https://git-scm.com/book/en/v2/Git-Basics-Tagging) . 但是,在大多數情況下,您的用戶不僅需要原始源代碼. 他們需要 CI / CD 系統輸出的已編譯對象或其他資產. GitLab *發行版*是與代碼的發行版本相關聯的源,構建輸出,工件和其他元數據的快照. 您可以在任何分支上創建一個 GitLab 版本. 創建發行版時: * manbetx 客戶端打不開自動歸檔源代碼,并將其與版本關聯. * GitLab 會自動創建一個 JSON 文件,其中列出了發行版中的所有內容,因此您可以比較和審核發行版. 該文件稱為[發布證據](#release-evidence) . * 您可以添加發行說明以及與發行版關聯的標簽的消息. 創建發行版后,您可以將[里程碑與其關聯](#associate-milestones-with-a-release) ,并附加[發行資產](#release-assets) ,例如運行手冊或軟件包. ## View releases[](#view-releases "Permalink") 在 GitLab 12.8 中[引入](https://gitlab.com/gitlab-org/gitlab/-/issues/36667) . 要查看版本列表: * 轉到**項目概述>版本** ,或 * 在項目的概述頁面上,如果存在至少一個版本,請單擊版本數. [![Number of Releases](https://img.kancloud.cn/f1/63/f16336f915df475e08fa032072d6be11_752x172.png "Incremental counter of Releases")](img/releases_count_v13_2.png) * 在公共項目上,此數字對所有用戶可見. * 在私有項目上,具有 Reporter [權限](../../permissions.html#project-members-permissions)或更高[權限的](../../permissions.html#project-members-permissions)用戶可以看到此數字. ## Create a release[](#create-a-release "Permalink") 在 GitLab 12.9 中[引入](https://gitlab.com/gitlab-org/gitlab/-/issues/32812) . 可以在 GitLab UI 中直接創建發布. **注意:**只有具有開發者權限或更高權限的用戶才能創建發行版. 閱讀有關[釋放權限的](../../../user/permissions.html#project-members-permissions)更多信息. 您可以在用戶界面中或使用[Releases API](../../../api/releases/index.html#create-a-release)創建發布. 我們建議使用 API??添加發行說明,作為 CI / CD 發行流程中的最后步驟之一. 要通過 GitLab UI 創建新版本: 1. 導航到**項目概述>發布** ,然后單擊**新發布**按鈕. 2. 在[**標簽名稱**](#tag-name)框中,輸入一個名稱. 3. In the **從創建** list, select the branch or enter a tag or commit SHA. 4. 在" **消息"**框中,輸入與標簽關聯的消息. 5. (可選)在" [**發行說明"**](#release-notes-description)字段中,輸入發行說明. 您可以使用 Markdown 并將文件拖放到此字段. * 如果將此字段留空,則只會創建一個標簽. * 如果您填充它,將同時創建標簽和發行版. 6. Click **創建標簽**. 如果創建了發行??版,則可以在**項目概述>發行版中**對其進行查看. 如果創建了標簽,則可以在**存儲庫>標簽中**查看它. 現在,您可以編輯發布以[添加里程碑](#associate-milestones-with-a-release)和[發布資產](#release-assets) . ### Schedule a future release[](#schedule-a-future-release "Permalink") 在 GitLab 12.1 中[引入](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/38105) . 您可以使用[Releases API](../../../api/releases/index.html#upcoming-releases)提前創建發行[版](../../../api/releases/index.html#upcoming-releases) . 當您設置將來的`released_at`日期時,將在發布標簽旁邊顯示**即將發布**的發布標志. 經過`released_at`日期和時間后,會自動刪除徽章. [![An upcoming release](https://img.kancloud.cn/bc/1c/bc1ca1a269aba22120fc00ca86716e63_1974x590.png)](img/upcoming_release_v12_7.png) ## Edit a release[](#edit-a-release "Permalink") 在 GitLab 12.6 中[引入](https://gitlab.com/gitlab-org/gitlab/-/issues/26016) . 在 GitLab 12.10 中[引入](https://gitlab.com/gitlab-org/gitlab/-/issues/9427)了資產鏈接編輯. **注意:**只有具有開發者權限或更高權限的用戶才能編輯發行版. 閱讀有關[釋放權限的](../../../user/permissions.html#project-members-permissions)更多信息. 要編輯發布的詳細信息: 1. 導航到**項目概述>發布** . 2. 在您要修改的發行版的右上角,單擊" **編輯此發行版"** (鉛筆圖標). 3. 在" **編輯版本"**頁面上,更改版本的詳細信息. 4. Click **保存更改**. 您可以編輯發行標題,注釋,關聯的里程碑和資產鏈接. 要更改其他發行信息,例如標簽或發行日期,請使用[Releases API](../../../api/releases/index.html#update-a-release) . ## Add release notes to Git tags[](#add-release-notes-to-git-tags "Permalink") If you have an existing Git tag, you can add release notes to it. 您可以在用戶界面中或使用[Releases API](../../../api/releases/index.html)來執行此操作. 我們建議使用 API??添加發行說明,作為 CI / CD 發行流程中的最后步驟之一. 在界面中,要向新的 Git 標簽添加發行說明: 1. 導航到您項目的**Repository> Tags** . 2. Click **新的一天**. 3. 在**發行說明**字段中,輸入發行說明. 您可以使用 Markdown 并將文件拖放到此字段. 4. Click **創建標簽**. 在界面中,要將發行說明添加到現有的 Git 標簽: 1. 導航到您項目的**Repository> Tags** . 2. 單擊**編輯發行說明** (鉛筆圖標). 3. 在**發行說明**字段中,輸入發行說明. 您可以在此字段中使用 Markdown,并將文件拖放到該字段中. 4. Click **保存更改**. ## Associate milestones with a release[](#associate-milestones-with-a-release "Permalink") 版本歷史 * 在 GitLab 12.5 中[引入](https://gitlab.com/gitlab-org/gitlab/-/issues/29020) . * [已更新](https://gitlab.com/gitlab-org/gitlab/-/issues/39467) ,可在 GitLab 13.0 中的 UI 中編輯里程碑. 您可以將一個版本與一個或多個[項目里程碑](../milestones/index.html#project-milestones-and-group-milestones)相關聯. 您可以在用戶界面中執行此操作,也可以在對[Releases API 的](../../../api/releases/index.html#create-a-release)請求中包含一個`milestones`數組. 在用戶界面中,要將里程碑與版本關聯: 1. 導航到**項目概述>發布** . 2. 在您要修改的發行版的右上角,單擊" **編輯此發行版"** (鉛筆圖標). 3. 從" **里程碑"**列表中,選擇要關聯的每個里程碑. 您可以選擇多個里程碑. 4. Click **保存更改**. 在" **項目概述">"發布"**頁面上, **里程碑**列在頂部,以及有關里程碑問題的統計信息. [![A Release with one associated milestone](https://img.kancloud.cn/f6/37/f63752e86a25ea8bee0c2978f2715f5e_1272x369.png)](img/release_with_milestone_v12_9.png) 在" **問題">"里程碑"**頁面上,以及當您單擊此頁面上的里程碑時,也可以看到發行版本. 這是一個里程碑示例,分別沒有發布,一個發布和兩個發布. [![Milestones with and without Release associations](https://img.kancloud.cn/97/2c/972cb2c6ea118252fa447ace56bf8422_871x374.png)](img/milestone_list_with_releases_v12_5.png) ## Get notified when a release is created[](#get-notified-when-a-release-is-created "Permalink") 在 GitLab 12.4 中[引入](https://gitlab.com/gitlab-org/gitlab/-/issues/26001) . 為您的項目創建新版本時,將通過電子郵件通知您. 訂閱發布通知: 1. 導航到" **項目概述"** . 2. 單擊**通知設置** (響鈴圖標). 3. 在列表中,點擊**自定義** . 4. Select the **新品發布** check box. 5. 關閉對話框進行保存. ## Prevent unintentional releases by setting a deploy freeze[](#prevent-unintentional-releases-by-setting-a-deploy-freeze "Permalink") 在 GitLab 13.0 中[引入](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/29382) . 通過設置[*部署凍結*期,](../../../ci/environments/deployment_safety.html)可以在指定的時間內防止意外的生產發布. 凍結部署有助于減少自動化部署時的不確定性和風險. 使用" [凍結時間" API](../../../api/freeze_periods.html)設置被定義為[crontab](https://crontab.guru/)條目的`freeze_start`和`freeze_end` . 如果正在執行的作業處于凍結期,則 GitLab CI / CD 會創建一個名為`$CI_DEPLOY_FREEZE`的環境變量. 為了防止執行部署作業,請在`gitlab-ci.yaml`創建一個`rules`條目,例如: ``` deploy_to_production: stage: deploy script: deploy_to_prod.sh rules: - if: $CI_DEPLOY_FREEZE == null ``` 如果項目包含多個凍結期,則所有時期都適用. 如果它們重疊,則凍結將覆蓋整個重疊期間. 有關更多信息,請參閱[部署安全](../../../ci/environments/deployment_safety.html) . ## Release fields[](#release-fields "Permalink") 創建或編輯發行版時,以下字段可用. ### Tag name[](#tag-name "Permalink") 發行標簽名稱應包括發行版本. GitLab 在我們的發行版中使用[語義版本控制](https://semver.org/) ,我們建議您也這樣做. 使用`(Major).(Minor).(Patch)` ,如[GitLab 版本控制政策](../../../policy/maintenance.html#versioning)中所述. 例如,對于 GitLab 版本`10.5.7` : * `10`代表主要版本. 主要版本是`10.0.0` ,但通常稱為`10.0` . * `5`代表次要版本. 次要版本為`10.5.0` ,但通常稱為`10.5` . * `7`代表補丁號碼. 版本號的任何部分都可以是多個數字,例如`13.10.11` . ### Release notes description[](#release-notes-description "Permalink") 每個版本都有說明. 您可以添加任何您喜歡的文本,但是我們建議您添加一個變更日志來描述發行版本的內容. 這可以幫助用戶快速掃描您發布的每個版本之間的差異. **注意:** [Git 的標記消息](https://git-scm.com/book/en/v2/Git-Basics-Tagging)和發行說明描述無關. 說明支持[Markdown](../../markdown.html) . ### Release assets[](#release-assets "Permalink") 當前,您可以將以下類型的資產添加到每個版本: * [Source code](#source-code) * [Links](#links) manbetx 客戶端打不開將在未來支持更多的資產類型,包括諸如預裝包,合規性/安全證據或容器圖像之類的對象. #### Permanent links to release assets[](#permanent-links-to-release-assets "Permalink") 在 GitLab 12.9 中[引入](https://gitlab.com/gitlab-org/gitlab/-/issues/27300) . 與發布相關聯的資產可通過永久 URL 訪問. GitLab 將始終將此 URL 重定向到實際資產位置,因此,即使資產移動到其他位置,您也可以繼續使用相同的 URL. 這是在[鏈接創建](../../../api/releases/links.html#create-a-link)或[更新](../../../api/releases/links.html#update-a-link)期間定義的. 每個資產都有一個名稱, *實際*資產位置的 URL,以及一個可選的`filepath`參數,如果您指定它,它將創建指向發布的資產的 URL. URL 的格式為: ``` https://host/namespace/project/releases/:release/downloads/:filepath ``` 如果您對資產`v11.9.0-rc2`的發布`gitlab-org`命名空間和`gitlab-runner`項目上`gitlab.com` ,例如: ``` { "name": "linux amd64", "filepath": "/binaries/gitlab-runner-linux-amd64", "url": "https://gitlab-runner-downloads.s3.amazonaws.com/v11.9.0-rc2/binaries/gitlab-runner-linux-amd64" } ``` 該資產具有以下直接鏈接: ``` https://gitlab.com/gitlab-org/gitlab-runner/releases/v11.9.0-rc2/downloads/binaries/gitlab-runner-linux-amd64 ``` 資產的物理位置可以隨時更改,并且直接鏈接將保持不變. ### Source code[](#source-code "Permalink") GitLab 會根據給定的 Git 標簽自動生成`zip` , `tar.gz` , `tar.bz2`和`tar`歸檔的源代碼. 這些是只讀資產. ### Links[](#links "Permalink") A link is any URL which can point to whatever you like: documentation, built binaries, or other related materials. These can be both internal or external links from your GitLab instance. 鏈接的四種類型是" Runbook"," Package"," Image"和" Other". ## Release evidence[](#release-evidence "Permalink") 在 GitLab 12.6 中[引入](https://gitlab.com/gitlab-org/gitlab/-/issues/26019) . 每次創建發行版時,GitLab 都會拍攝與之相關的數據快照. 此數據保存在 JSON 文件中,稱為*發布證據* . 它包括鏈接的里程碑和問題,并且可以促進內部流程,例如外部審核. 要訪問發布證據,請在"發布"頁面上,單擊" **證據集合"**標題下列出的 JSON 文件的鏈接. 您還可以[使用 API](../../../api/releases/index.html#collect-release-evidence-premium-only)生成現有版本的版本證據. 因此,每個版本可以具有多個版本證據快照. 您可以在"發布"頁面上查看發布證據及其詳細信息. **注意:**禁用問題跟蹤器后, [將無法下載](https://gitlab.com/gitlab-org/gitlab/-/issues/208397)發布證據. 這是釋放證據對象的示例: ``` { "release": { "id": 5, "tag_name": "v4.0", "name": "New release", "project": { "id": 20, "name": "Project name", "created_at": "2019-04-14T11:12:13.940Z", "description": "Project description" }, "created_at": "2019-06-28 13:23:40 UTC", "description": "Release description", "milestones": [ { "id": 11, "title": "v4.0-rc1", "state": "closed", "due_date": "2019-05-12 12:00:00 UTC", "created_at": "2019-04-17 15:45:12 UTC", "issues": [ { "id": 82, "title": "The top-right popup is broken", "author_name": "John Doe", "author_email": "john@doe.com", "state": "closed", "due_date": "2019-05-10 12:00:00 UTC" }, { "id": 89, "title": "The title of this page is misleading", "author_name": "Jane Smith", "author_email": "jane@smith.com", "state": "closed", "due_date": "nil" } ] }, { "id": 12, "title": "v4.0-rc2", "state": "closed", "due_date": "2019-05-30 18:30:00 UTC", "created_at": "2019-04-17 15:45:12 UTC", "issues": [] } ], "report_artifacts": [ { "url":"https://gitlab.example.com/root/project-name/-/jobs/111/artifacts/download" } ] } } ``` ### Collect release evidence[](#collect-release-evidence-premium-only "Permalink") [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/199065) in [GitLab Premium](https://about.gitlab.com/pricing/) 12.10. 創建發布后,將自動收集發布證據. 要在其他任何時間啟動證據收集,請使用[API 調用](../../../api/releases/index.html#collect-release-evidence-premium-only) . 您可以為一個發布多次收集發布證據. 在"發布"頁面上可以看到證據收集快照,以及收集證據的時間戳. ### Include report artifacts as release evidence[](#include-report-artifacts-as-release-evidence-ultimate-only "Permalink") [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/32773) in [GitLab Ultimate](https://about.gitlab.com/pricing/) 13.2. 創建發布時,如果[作業工件](../../../ci/pipelines/job_artifacts.html#artifactsreports)包含在最后運行的管道中,則它們會自動作為發布證據包含在發布中. 盡管工作工件通常會過期,但發布證據中包含的工件不會過期. 要啟用作業工件收集,您需要同時指定兩個: 1. [`artifacts:paths`](../../../ci/yaml/README.html#artifactspaths) 2. [`artifacts:reports`](../../../ci/pipelines/job_artifacts.html#artifactsreports) ``` ruby: script: - gem install bundler - bundle install - bundle exec rspec --format progress --format RspecJunitFormatter --out rspec.xml artifacts: paths: - rspec.xml reports: junit: rspec.xml ``` 如果管道成功運行,則在創建發布時, `rspec.xml`文件將保存為發布證據. **注:**如果您[計劃發布證據收集](#schedule-release-evidence-collection) ,則某些[證據](#schedule-release-evidence-collection)可能在證據收集時已經過期. 為了避免這種情況,可以使用[`artifacts:expire_in`](../../../ci/yaml/README.html#artifactsexpire_in)關鍵字. 了解更多在[這個問題上](https://gitlab.com/gitlab-org/gitlab/-/issues/222351) . ### Schedule release evidence collection[](#schedule-release-evidence-collection "Permalink") 在 GitLab 12.8 中[引入](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/23697) . 在 API 中: * 如果您指定未來的`released_at`日期,則該發布將成為**即將發布的發布,**并且將在發布日期收集證據. 在此之前,您無法收集釋放證據. * 如果您使用過去的`released_at`日期,則不會收集任何證據. * 如果您未指定`released_at`日期,則在創建發布的日期收集發布證據. ### Disable release evidence display[](#disable-release-evidence-display-core-only "Permalink") `:release_evidence_collection`功能標志在 GitLab 自管理實例中默認啟用. 要關閉它,請要求具有 Rails 控制臺訪問權限的 GitLab 管理員運行以下命令: ``` Feature.disable(:release_evidence_collection) ``` **注意:**無論使用此功能標志如何,都將收集發布證據,該標志僅啟用或禁用"發布"頁面上的數據顯示. ## GitLab Releaser[](#gitlab-releaser "Permalink") 在 GitLab 12.10 中[引入](https://gitlab.com/gitlab-org/gitlab-releaser/-/merge_requests/6) . GitLab Releaser 是一個 CLI 工具,用于從命令行或 GitLab 的 CI / CD 配置文件`.gitlab-ci.yml`管理 GitLab 版本. 有了它,您可以直接通過終端創建,更新,修改和刪除發行版. 有關詳細信息,請閱讀[GitLab Releaser 文檔](https://gitlab.com/gitlab-org/gitlab-releaser/-/tree/master/docs/index.md) .
                  <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>

                              哎呀哎呀视频在线观看