IBM Cloud CLI Developer Tools (ibmcloud dev) 指令
IBM Cloud® 指令行介面包含 Developer Tools (ibmcloud dev) 指令,用來管理經典管道、Tekton 管道和工具鏈。
說明
依預設,如果未傳入任何動作或引數,或如果提供 'help' 動作,則這個指令會顯示一般「說明」文字。 顯示的一般說明包括基本引數的說明,以及可用動作的清單。
執行下列指令,以顯示一般說明資訊:
ibmcloud dev help
pipeline-get
檢視 Classic 管道的詳細資訊。
ibmcloud dev pipeline-get [PIPELINE_ID] [--output JSON]
pipeline-get 指令參數
json
- 用於以 JSON 格式輸出管道詳細資訊的參數。
- 用法:
ibmcloud dev pipeline-get [PIPELINE_ID] --output JSON
下列參數可搭配 pipeline-get 指令使用,或直接更新應用程式的 cli-config.yml 檔案。
在指令行上輸入的指令參數,其優先順序高於 cli-config.yml 配置。
trace
- 使用此參數來提供詳細輸出。
- 用法:
ibmcloud dev pipeline-get [PIPELINE_ID] --trace
pipeline-run
執行「典型」管線。
ibmcloud dev pipeline-run [PIPELINE_ID] [--stage-id stageID] [--output JSON]
pipeline-run 指令參數
下列參數可使用 pipeline-run 指令或直接更新應用程式的 cli-config.yml 檔案。
在指令行上輸入的指令參數,其優先順序高於 cli-config.yml 配置。
stage-id
- 該選用參數用於選取要執行的管線階段
- 用法:
ibmcloud dev pipeline-run [PIPELINE_ID] --stage-id [stageID]
json
- 用來以 JSON 格式輸出管道的調用詳細資訊的參數。
- 用法:
ibmcloud dev pipeline-run [PIPELINE_ID] --output JSON
trace
- 使用此參數來提供詳細輸出。
- 用法:
ibmcloud dev pipeline-run [PIPELINE_ID] --trace
pipeline-log
使用 pipeline-log 指令檢視最近的 Classic 管道日誌。
- 如果將管線 ID 指定為引數,則會顯示該管線所有階段中所有工作的所有日誌。
- 如果已移入階段 ID 旗標,則會依管線中的該階段來過濾日誌。
- 如果同時指定工作 ID 及階段 ID,則會過濾日誌,僅顯示該階段中的該工作。
- 如果同時指定工作執行 ID、階段 ID 與工作 ID,則會在所有可用日誌中搜尋與所指定工作執行 ID 相符的日誌。
用法:
ibmcloud dev pipeline-log [PIPELINE_ID] [--stage-id stageID] [--job-id jobID] [--job-exec-id jobExecutionID]
pipeline-log 指令參數
下列參數可使用 pipeline-log 指令或直接更新應用程式的 cli-config.yml 檔案。
在指令行上輸入的指令參數,其優先順序高於 cli-config.yml 配置。
job-id
- 用於根據工作 ID 過濾日誌的參數。
- 需要
stage-id旗標。 - 用法:
ibmcloud dev pipeline-log [PIPELINE_ID] --stage-id [stageID] --job-id [jobID]
job-exec-id
- 用於根據工作執行 ID 過濾日誌的參數。
- 需要
stage-id旗標。 - 需要
job-id旗標。 - 用法:
ibmcloud dev pipeline-log [PIPELINE_ID] --stage-id [stageID] --job-id [jobID] --job-exec-id [jobExecutionID]
stage-id
- 用來依階段 ID 篩選記錄的參數。
- 用法:
ibmcloud dev pipeline-log [PIPELINE_ID] --stage-id [stageID]
trace
- 使用此參數來提供詳細輸出。
- 用法:
ibmcloud dev pipeline-log [PIPELINE_ID] --trace
pipeline-open
透過 pipeline-open 指令檢視 Classic 管線的 URL。 pipeline-open 指令也會在預設瀏覽器中開啟 URL。
ibmcloud dev pipeline-open [PIPELINE_ID]
pipeline-open 指令參數
下列參數可搭配 pipeline-open 指令使用,或直接更新應用程式的 cli-config.yml 檔案。
在指令行上輸入的指令參數,其優先順序高於 cli-config.yml 配置。
trace
- 使用此參數來提供詳細輸出。
- 用法:
ibmcloud dev pipeline-open [PIPELINE_ID] --trace
Tekton-info
檢視 Tekton 管線的詳細資訊。
ibmcloud dev tekton-info [PIPELINE_ID] [--verbose][--output JSON]
tekton-info 指令參數
下列參數可與 tekton-info 指令一起使用。
verbose
- 使用此參數以 JSON 格式提供管線的所有詳細資料。
- 用法:
ibmcloud dev tekton-info [PIPELINE_ID] --verbose
json
- 用於以 JSON 格式輸出管道詳細資訊的參數。
- 用法:
ibmcloud dev tekton-info [PIPELINE_ID] --output JSON
trace
- 使用此參數來提供詳細輸出。
- 用法:
ibmcloud dev tekton-info [PIPELINE_ID] --trace
泰克頓記錄
使用 tekton-logs 指令來檢視最近的 Tekton 管線執行日誌。
- 管線執行 ID 是必要的引數。
- 如果將作業名稱指定為引數,則只會擷取此作業的日誌。
用法:
ibmcloud dev tekton-logs [PIPELINE_ID] --run-id [pipelinerunID] [--task-name taskName] [--output JSON]
tekton-logs 指令參數
下列參數可與 tekton-logs 指令一起使用。
run-id (必要)
- 標識日誌檢索的管道運行的參數。
- 用法:
ibmcloud dev tekton-logs [PIPELINE_ID] --run-id [pipelinerunID]
task-name
- 用來依管線執行作業名稱過濾日誌的參數。
- 用法:
ibmcloud dev tekton-logs [PIPELINE_ID] --run-id [pipelinerunID] --task-name [taskName]
json
- 用於以 JSON 格式輸出日誌詳細資訊的參數。
- 用法:
ibmcloud dev tekton-logs [PIPELINE_ID] --run-id [pipelinerunID] --output JSON
trace
- 使用此參數來提供詳細輸出。
- 用法:
ibmcloud dev tekton-logs [PIPELINE_ID] --run-id [pipelinerunID] --trace
tekton-pipeline-cancel
取消進行中的 Tekton 管線執行。
ibmcloud dev tekton-pipeline-cancel [PIPELINE_ID] --run-id [pipelinerunID] [--trace]`
tekton-pipeline-cancel 指令參數
下列參數可與 tekton-pipeline-cancel 指令一起使用。
run-id (必要)
- 標識要取消的管道運行的參數。
- 用法:
ibmcloud dev tekton-pipeline-cancel [PIPELINE_ID] --run-id [pipelinerunID]
trace
- 使用此參數來提供詳細輸出。
- 用法:
ibmcloud dev tekton-pipeline-cancel [PIPELINE_ID] --run-id [pipelinerunID] --trace
特克頓-皮佩利訥倫
檢視 Tekton 管線執行的詳細資料,或使用 ls 參數來列出管線的所有管線執行。
用法:
ibmcloud dev tekton-pipelinerun [PIPELINE_ID] --run-id [pipelinerunID] [--output JSON]
ibmcloud dev tekton-pipelinerun ls [PIPELINE_ID]
tekton-pipelinerun 指令參數
下列參數可與 tekton-pipelinerun 指令一起使用。
run-id (必要)
- 識別要擷取之管線執行的參數。
- 用法:
ibmcloud dev tekton-pipelinerun [PIPELINE_ID] --run-id [pipelinerunID]
json
- 用於以 JSON 格式輸出管道執行詳細資訊的參數。
- 用法:
ibmcloud dev tekton-pipelinerun [PIPELINE_ID] --run-id [pipelinerunID] --output JSON
trace
- 使用此參數來提供詳細輸出。
- 用法:
ibmcloud dev tekton-pipelinerun [PIPELINE_ID] --run-id [pipelinerunID] --trace
特克頓-皮佩利訥倫
檢視 Tekton 管線的管線執行清單。
用法:
ibmcloud dev tekton-pipelineruns [PIPELINE_ID] [--output JSON]
tekton-pipelineruns 指令參數
下列參數可與 tekton-pipelineruns 指令一起使用。
json
- 用於以 JSON 格式輸出管道執行的參數。
- 用法:
ibmcloud dev tekton-pipelineruns [PIPELINE_ID] --output JSON
trace
- 使用此參數來提供詳細輸出。
- 用法:
ibmcloud dev tekton-pipelineruns [PIPELINE_ID] --trace
Tekton 觸發程式
執行 Tekton 管線。
用法:
ibmcloud dev tekton-trigger PIPELINE_ID --trigger-name triggerName [--description "a description"] [--trigger-properties propertiesJSON] [--secure-trigger-properties securePropertiesJSON] [--trigger-headers headerJSON] [--trigger-body bodyJSON] [--output JSON]
tekton-trigger 指令參數
下列參數可與 tekton-trigger 指令一起使用。
trigger-name (必要)
- 使用此參數來指出要執行的觸發程式。
- 用法:
ibmcloud dev tekton-trigger PIPELINE_ID --trigger-name triggerName
description(選用)
- 選用。 使用此參數指定已建立的 Tekton pipelineRun 的描述。
- 用法:
ibmcloud dev tekton-trigger PIPELINE_ID --trigger-name triggerName --description "My description"
trigger-properties(選用)
- 選用。 使用此參數來置換或附加至已定義的觸發程式內容。 例如,
'{"pipeline-debug":"true"}'。 - 用法:
ibmcloud dev tekton-trigger PIPELINE_ID --trigger-name triggerName --trigger-properties propertiesJSON
secure-trigger-properties(選用)
- 選用。 使用此參數來置換或附加至已定義的觸發程式內容,其值應該隱藏在後續輸出中的點或星號後面。 例如:
'{"deployer-api-key":"s0mEThING_v3Ry_s3CReT"}' - 用法:
ibmcloud dev tekton-trigger PIPELINE_ID --trigger-name triggerName --secure-trigger-properties securePropertiesJSON
trigger-headers(選用)
- 選用。 使用此參數來指定 Tekton pipelineRun的 triggerBinding 中使用的標頭。 例如,
'{"source":"cli","flag":"enable"}'。 - 用法:
ibmcloud dev tekton-trigger PIPELINE_ID --trigger-name triggerName --trigger-headers headerJSON
trigger-body(選用)
- 選用。 使用此參數來指定 Tekton pipelineRun的 triggerBinding 中使用的主體。 例如,
'{"message":"hello world","flag":"enable"}'。 - 用法:
ibmcloud dev tekton-trigger PIPELINE_ID --trigger-name triggerName --trigger-body bodyJSON
json
- 使用此參數以 JSON 格式輸出觸發程式結果。
- 用法:
ibmcloud dev tekton-trigger PIPELINE_ID --trigger-name triggerName --output JSON
trace
- 使用此參數來提供詳細輸出。
- 用法:
ibmcloud dev tekton-trigger PIPELINE_ID --trigger-name triggerName --trace
toolchain-delete
刪除工具鏈。 如果未提供工具鏈名稱,您可以從清單選取。 工具鏈的清單取決於現行目標資源群組和地區。
在 IBMCLOUD API Key 中可找到目標資源群組。 如需相關資訊,請參閱設定或檢視目標帳戶、地區或資源群組。
ibmcloud dev toolchain-delete [toolchainName] [--force,-f]
toolchain-delete 指令參數
下列參數可使用 toolchain-delete 指令或直接更新應用程式的 cli-config.yml 檔案。
在指令行上輸入的指令參數,其優先順序高於 cli-config.yml 配置。
force
- 用於跳過刪除工具鏈的提示確認的參數。
- 用法:
ibmcloud dev toolchain-delete [toolchainName] --force
trace
- 使用此參數來提供詳細輸出。
- 用法:
ibmcloud dev toolchain-delete [toolchainName] --trace
toolchain-get
檢視工具鏈的詳細資料。 如果未提供工具鏈名稱,您可以從清單選取。
使用 IBMCLOUD API Key 中的目標資源群組。 如需相關資訊,請參閱設定或檢視目標帳戶、地區或資源群組。
ibmcloud dev toolchain-get [toolchainName] [--output JSON]
toolchain-get 指令參數
下列參數可使用 toolchain-get 指令或直接更新應用程式的 cli-config.yml 檔案。
在指令行上輸入的指令參數,其優先順序高於 cli-config.yml 配置。
json
- 用於以 JSON 格式輸出工具鏈詳細資訊的參數。
- 用法:
ibmcloud dev toolchain-get [toolchainName] --output JSON
trace
- 使用此參數來提供詳細輸出。
- 用法:
ibmcloud dev toolchain-get [toolchainName] --trace
toolchain-open
透過 toolchain-open 指令可檢視工具鏈的 URL。 toolchain-open 指令也會在預設瀏覽器中開啟 URL。 如果未提供工具鏈名稱,則會提供工具鏈清單以供選取。
ibmcloud dev toolchain-open [toolchainName]
toolchain-open 指令參數
下列參數可搭配 toolchain-open 指令使用,或直接更新應用程式的 cli-config.yml 檔案。
在指令行上輸入的指令參數,其優先順序高於 cli-config.yml 配置。
trace
- 使用此參數來提供詳細輸出。
- 用法:
ibmcloud dev toolchain-open [toolchainName] --trace
toolchains
檢視現行資源群組中工具鏈的清單。
使用 IBMCLOUD API Key 中的目標資源群組。 如需相關資訊,請參閱設定或檢視目標帳戶、地區或資源群組。
ibmcloud dev toolchains [--output JSON]
toolchains 指令參數
下列參數可使用 toolchains 指令或直接更新應用程式的 cli-config.yml 檔案。
在指令行上輸入的指令參數,其優先順序高於 cli-config.yml 配置。
json
- 用於以 JSON 格式輸出工具鏈的參數。
- 用法:
ibmcloud dev toolchains --output JSON
trace
- 使用此參數來提供詳細輸出。
- 用法:
ibmcloud dev toolchains --trace