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

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                # Pipeline schedules API > 原文:[https://docs.gitlab.com/ee/api/pipeline_schedules.html](https://docs.gitlab.com/ee/api/pipeline_schedules.html) * [Get all pipeline schedules](#get-all-pipeline-schedules) * [Get a single pipeline schedule](#get-a-single-pipeline-schedule) * [Create a new pipeline schedule](#create-a-new-pipeline-schedule) * [Edit a pipeline schedule](#edit-a-pipeline-schedule) * [Take ownership of a pipeline schedule](#take-ownership-of-a-pipeline-schedule) * [Delete a pipeline schedule](#delete-a-pipeline-schedule) * [Run a scheduled pipeline immediately](#run-a-scheduled-pipeline-immediately) * [Pipeline schedule variables](#pipeline-schedule-variables) * [Create a new pipeline schedule variable](#create-a-new-pipeline-schedule-variable) * [Edit a pipeline schedule variable](#edit-a-pipeline-schedule-variable) * [Delete a pipeline schedule variable](#delete-a-pipeline-schedule-variable) # Pipeline schedules API[](#pipeline-schedules-api "Permalink") 您可以閱讀有關[管道計劃的](../ci/pipelines/schedules.html)更多信息. ## Get all pipeline schedules[](#get-all-pipeline-schedules "Permalink") 獲取項目的管道時間表的列表. ``` GET /projects/:id/pipeline_schedules ``` | Attribute | Type | required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.html#namespaced-path-encoding) owned by the authenticated user | | `scope` | string | no | 管道計劃的范圍,其中之一: `active` , `inactive` | ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/29/pipeline_schedules" ``` ``` [ { "id": 13, "description": "Test schedule pipeline", "ref": "master", "cron": "* * * * *", "cron_timezone": "Asia/Tokyo", "next_run_at": "2017-05-19T13:41:00.000Z", "active": true, "created_at": "2017-05-19T13:31:08.849Z", "updated_at": "2017-05-19T13:40:17.727Z", "owner": { "name": "Administrator", "username": "root", "id": 1, "state": "active", "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", "web_url": "https://gitlab.example.com/root" } } ] ``` ## Get a single pipeline schedule[](#get-a-single-pipeline-schedule "Permalink") 獲取項目的管道計劃. ``` GET /projects/:id/pipeline_schedules/:pipeline_schedule_id ``` | Attribute | Type | required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 經過身份驗證的用戶擁有[的項目](README.html#namespaced-path-encoding)的 ID 或[URL 編碼路徑](README.html#namespaced-path-encoding) | | `pipeline_schedule_id` | integer | yes | 管道時間表 ID | ``` curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/29/pipeline_schedules/13" ``` ``` { "id": 13, "description": "Test schedule pipeline", "ref": "master", "cron": "* * * * *", "cron_timezone": "Asia/Tokyo", "next_run_at": "2017-05-19T13:41:00.000Z", "active": true, "created_at": "2017-05-19T13:31:08.849Z", "updated_at": "2017-05-19T13:40:17.727Z", "last_pipeline": { "id": 332, "sha": "0e788619d0b5ec17388dffb973ecd505946156db", "ref": "master", "status": "pending" }, "owner": { "name": "Administrator", "username": "root", "id": 1, "state": "active", "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", "web_url": "https://gitlab.example.com/root" }, "variables": [ { "key": "TEST_VARIABLE_1", "variable_type": "env_var", "value": "TEST_1" } ] } ``` ## Create a new pipeline schedule[](#create-a-new-pipeline-schedule "Permalink") 創建一個新的項目管道計劃. ``` POST /projects/:id/pipeline_schedules ``` | Attribute | Type | required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 經過身份驗證的用戶擁有[的項目](README.html#namespaced-path-encoding)的 ID 或[URL 編碼路徑](README.html#namespaced-path-encoding) | | `description` | string | yes | 管道進度表的描述 | | `ref` | string | yes | 分支/標簽名稱將被觸發 | | `cron` | string | yes | cron(例如`0 1 * * *` )( [Cron 語法](https://en.wikipedia.org/wiki/Cron) ) | | `cron_timezone` | string | no | `ActiveSupport::TimeZone`支持的時`ActiveSupport::TimeZone` (例如`Pacific Time (US & Canada)` )(默認值: `'UTC'` ) | | `active` | boolean | no | 激活管道計劃. 如果設置為 false,則管道調度最初將被停用(默認值: `true` ) | ``` curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --form description="Build packages" --form ref="master" --form cron="0 1 * * 5" --form cron_timezone="UTC" --form active="true" "https://gitlab.example.com/api/v4/projects/29/pipeline_schedules" ``` ``` { "id": 14, "description": "Build packages", "ref": "master", "cron": "0 1 * * 5", "cron_timezone": "UTC", "next_run_at": "2017-05-26T01:00:00.000Z", "active": true, "created_at": "2017-05-19T13:43:08.169Z", "updated_at": "2017-05-19T13:43:08.169Z", "last_pipeline": null, "owner": { "name": "Administrator", "username": "root", "id": 1, "state": "active", "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", "web_url": "https://gitlab.example.com/root" } } ``` ## Edit a pipeline schedule[](#edit-a-pipeline-schedule "Permalink") 更新項目的管道計劃. 更新完成后,將自動重新安排. ``` PUT /projects/:id/pipeline_schedules/:pipeline_schedule_id ``` | Attribute | Type | required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 經過身份驗證的用戶擁有[的項目](README.html#namespaced-path-encoding)的 ID 或[URL 編碼路徑](README.html#namespaced-path-encoding) | | `pipeline_schedule_id` | integer | yes | 管道時間表 ID | | `description` | string | no | 管道進度表的描述 | | `ref` | string | no | 分支/標簽名稱將被觸發 | | `cron` | string | no | cron(例如`0 1 * * *` )( [Cron 語法](https://en.wikipedia.org/wiki/Cron) ) | | `cron_timezone` | string | no | `ActiveSupport::TimeZone` (例如`Pacific Time (US & Canada)` )或`TZInfo::Timezone` (例如`America/Los_Angeles` )支持的`TZInfo::Timezone` | | `active` | boolean | no | 激活管道計劃. 如果設置為 false,則管道計劃將首先停用. | ``` curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" --form cron="0 2 * * *" "https://gitlab.example.com/api/v4/projects/29/pipeline_schedules/13" ``` ``` { "id": 13, "description": "Test schedule pipeline", "ref": "master", "cron": "0 2 * * *", "cron_timezone": "Asia/Tokyo", "next_run_at": "2017-05-19T17:00:00.000Z", "active": true, "created_at": "2017-05-19T13:31:08.849Z", "updated_at": "2017-05-19T13:44:16.135Z", "last_pipeline": { "id": 332, "sha": "0e788619d0b5ec17388dffb973ecd505946156db", "ref": "master", "status": "pending" }, "owner": { "name": "Administrator", "username": "root", "id": 1, "state": "active", "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", "web_url": "https://gitlab.example.com/root" } } ``` ## Take ownership of a pipeline schedule[](#take-ownership-of-a-pipeline-schedule "Permalink") 更新項目的管道計劃的所有者. ``` POST /projects/:id/pipeline_schedules/:pipeline_schedule_id/take_ownership ``` | Attribute | Type | required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 經過身份驗證的用戶擁有[的項目](README.html#namespaced-path-encoding)的 ID 或[URL 編碼路徑](README.html#namespaced-path-encoding) | | `pipeline_schedule_id` | integer | yes | 管道時間表 ID | ``` curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/29/pipeline_schedules/13/take_ownership" ``` ``` { "id": 13, "description": "Test schedule pipeline", "ref": "master", "cron": "0 2 * * *", "cron_timezone": "Asia/Tokyo", "next_run_at": "2017-05-19T17:00:00.000Z", "active": true, "created_at": "2017-05-19T13:31:08.849Z", "updated_at": "2017-05-19T13:46:37.468Z", "last_pipeline": { "id": 332, "sha": "0e788619d0b5ec17388dffb973ecd505946156db", "ref": "master", "status": "pending" }, "owner": { "name": "shinya", "username": "maeda", "id": 50, "state": "active", "avatar_url": "http://www.gravatar.com/avatar/8ca0a796a679c292e3a11da50f99e801?s=80&d=identicon", "web_url": "https://gitlab.example.com/maeda" } } ``` ## Delete a pipeline schedule[](#delete-a-pipeline-schedule "Permalink") 刪除項目的管道計劃. ``` DELETE /projects/:id/pipeline_schedules/:pipeline_schedule_id ``` | Attribute | Type | required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 經過身份驗證的用戶擁有[的項目](README.html#namespaced-path-encoding)的 ID 或[URL 編碼路徑](README.html#namespaced-path-encoding) | | `pipeline_schedule_id` | integer | yes | 管道時間表 ID | ``` curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/29/pipeline_schedules/13" ``` ``` { "id": 13, "description": "Test schedule pipeline", "ref": "master", "cron": "0 2 * * *", "cron_timezone": "Asia/Tokyo", "next_run_at": "2017-05-19T17:00:00.000Z", "active": true, "created_at": "2017-05-19T13:31:08.849Z", "updated_at": "2017-05-19T13:46:37.468Z", "last_pipeline": { "id": 332, "sha": "0e788619d0b5ec17388dffb973ecd505946156db", "ref": "master", "status": "pending" }, "owner": { "name": "shinya", "username": "maeda", "id": 50, "state": "active", "avatar_url": "http://www.gravatar.com/avatar/8ca0a796a679c292e3a11da50f99e801?s=80&d=identicon", "web_url": "https://gitlab.example.com/maeda" } } ``` ## Run a scheduled pipeline immediately[](#run-a-scheduled-pipeline-immediately "Permalink") 在 GitLab 12.8 中[引入](https://gitlab.com/gitlab-org/gitlab/-/issues/201786) . 觸發一個新的計劃管道,該管道將立即運行. 該管道的下一個計劃運行不受影響. ``` POST /projects/:id/pipeline_schedules/:pipeline_schedule_id/play ``` | Attribute | Type | required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 經過身份驗證的用戶擁有[的項目](README.html#namespaced-path-encoding)的 ID 或[URL 編碼路徑](README.html#namespaced-path-encoding) | | `pipeline_schedule_id` | integer | yes | 管道時間表 ID | 請求示例: ``` curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/42/pipeline_schedules/1/play" ``` 響應示例: ``` { "message": "201 Created" } ``` ## Pipeline schedule variables[](#pipeline-schedule-variables "Permalink") 在 GitLab 10.0 中[引入](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/34518) . ## Create a new pipeline schedule variable[](#create-a-new-pipeline-schedule-variable "Permalink") 創建管道計劃的新變量. ``` POST /projects/:id/pipeline_schedules/:pipeline_schedule_id/variables ``` | Attribute | Type | required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 經過身份驗證的用戶擁有[的項目](README.html#namespaced-path-encoding)的 ID 或[URL 編碼路徑](README.html#namespaced-path-encoding) | | `pipeline_schedule_id` | integer | yes | 管道時間表 ID | | `key` | string | yes | 變量的`key` ; 不得超過 255 個字符; 僅允許`AZ` , `az` , `0-9`和`_` | | `value` | string | yes | 變量的`value` | | `variable_type` | string | no | 變量的類型. 可用類型為: `env_var` (默認)和`file` | ``` curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" --form "key=NEW_VARIABLE" --form "value=new value" "https://gitlab.example.com/api/v4/projects/29/pipeline_schedules/13/variables" ``` ``` { "key": "NEW_VARIABLE", "variable_type": "env_var", "value": "new value" } ``` ## Edit a pipeline schedule variable[](#edit-a-pipeline-schedule-variable "Permalink") 更新管道計劃的變量. ``` PUT /projects/:id/pipeline_schedules/:pipeline_schedule_id/variables/:key ``` | Attribute | Type | required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 經過身份驗證的用戶擁有[的項目](README.html#namespaced-path-encoding)的 ID 或[URL 編碼路徑](README.html#namespaced-path-encoding) | | `pipeline_schedule_id` | integer | yes | 管道時間表 ID | | `key` | string | yes | 變量的`key` | | `value` | string | yes | 變量的`value` | | `variable_type` | string | no | 變量的類型. 可用類型為: `env_var` (默認)和`file` | ``` curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" --form "value=updated value" "https://gitlab.example.com/api/v4/projects/29/pipeline_schedules/13/variables/NEW_VARIABLE" ``` ``` { "key": "NEW_VARIABLE", "value": "updated value" "variable_type": "env_var", } ``` ## Delete a pipeline schedule variable[](#delete-a-pipeline-schedule-variable "Permalink") 刪除管道計劃的變量. ``` DELETE /projects/:id/pipeline_schedules/:pipeline_schedule_id/variables/:key ``` | Attribute | Type | required | Description | | --- | --- | --- | --- | | `id` | integer/string | yes | 經過身份驗證的用戶擁有[的項目](README.html#namespaced-path-encoding)的 ID 或[URL 編碼路徑](README.html#namespaced-path-encoding) | | `pipeline_schedule_id` | integer | yes | 管道時間表 ID | | `key` | string | yes | 變量的`key` | ``` curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/29/pipeline_schedules/13/variables/NEW_VARIABLE" ``` ``` { "key": "NEW_VARIABLE", "value": "updated value" } ```
                  <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>

                              哎呀哎呀视频在线观看