chaoz的杂货铺

生命有息、学无止境、折腾不止

0%

jenkins-jcli

jcli 笔记

特性

易于维护的 jcli 配置文件
支持管理多个 Jenkins
插件管理(列表、搜索、安装、上传)
任务管理(搜索、构建、日志)
在浏览器中打开 Jenkins
重启 Jenkins
支持连接代理

安装

你可以从 jenkins-cli 的代码仓库中克隆 jcli(Go语言开发)。目前,我们支持三个主流的操作 系统平台: MacOS、Linux、和 Windows。

MacOS
你可以使用 brew 安装 jcli。

1
2
3
brew tap jenkins-zh/jcli
brew install jcli
Linux

在 Linux 下安装也是非常的简单。你只需要执行下面的命令即可:

1
2
curl -L https://github.com/jenkins-zh/jenkins-cli/releases/latest/download/jcli-linux-amd64.tar.gz|tar xzv
sudo mv jcli /usr/local/bin/

Windows
你可以点击下载链接到最新的版本。 然后,下载 tar 文件,把解压后的 jcli 拷贝到系统目录下。

开始使用

你安装好 jcli 后,可以通过下面的命令生成一个配置样本:

1
2
3
4
5
6
7
8
9
10
$ jcli config generate
current: yourServer
jenkins_servers:
- name: yourServer
url: http://localhost:8080/jenkins
username: admin
token: 111e3a2f0231198855dceaff96f20540a9
proxy: ""
proxyAuth: ""
# Goto 'http://localhost:8080/jenkins/me/configure', then you can generate your token.

在大多数情况下,你应该只需要修改三个字段,包括:url、username 和 token。好的,我相信你已经准备好了。 然后,就可以通过下面的命令来检查你的 Jenkins 中是否安装了 github 插件:

jcli plugin list --filter name=github

下面是详细命令说明。

command

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
jcli [Command] [Flags]        # 文档中 [command] 为必须含有命令,[flags] 为参数

Available Commands:
config 配置相关
center 管理和更新中心
completion Genereate bash completion scripts ???????
config Manage the config of jcli 配置管理jcli的配置
crumb Print crumbIssuer of Jenkins 停止job
doc Generate document for all jcl commands 生成说明文档
help Help about any command 帮助
job Print the job of your Jenkins job 管理
open Open your Jenkins with a browse 应该就是浏览器打开,没用
plugin Manage the plugins of Jenkins 管理插件
queue Manage the queue of your Jenkins 管理队列
restart Restart your Jenkins 重启
user Print the user of your Jenkins 用户管理


Global Flags:
--configFile string 备用配置文件
--debug 将输出打印到 debug.html
-j, --jenkins string 选择要控制的 jenkins 服务器
-v, --version 打印 Jenkins CLI

example:
全局可用参数:
[root@VM_89_116_centos ~]# jcli -j ex2
Jenkins CLI (jcli) manage your Jenkins
Current Jenkins is: ex2

[root@VM_89_116_centos ~]# jcli -v
Jenkins CLI (jcli) manage your Jenkins
Version: v0.0.22
Commit: eade6aa

config

1
2
3
4
5
6
7
8
9
10
命令参数说明:

# jcli config [command][Flags]

add 添加一个配置项
edit 修改一个配置项
generate 生成一个配置文件做参考
list 列出所有的配置项
remove 移除一个配置项
select 选择一个配置项
generate
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
[root@VM_89_116_centos ~]# jcli config generate

生成的默认配置文件:

current: yourServer
language: ""
jenkins_servers:
- name: yourServer
url: http://localhost:8080/jenkins
username: admin
token: 111e3a2f0231198855dceaff96f20540a9
proxy: ""
proxyAuth: ""
description: ""
preHooks: []
postHooks: []
pluginSuites: []

# Language context is accept-language for HTTP header, It contains zh-CN/zh-TW/en/en-US/ja and so on
# Goto 'http://localhost:8080/jenkins/me/configure', then you can generate your token.

#语言上下文是 HTTP 头的接受语言,它包含 zh-CN/zh-TW/en/en-US/ja 等
#转到“http://localhost:8080/jenkins/me/configure”,然后可以生成令牌。


配置文件参数说明:
username:你生成密匙时所登录的用户名
proxy: 代理
proxyAuth: ""
description: ""
preHooks: []
postHooks: []
pluginSuites: []
add
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Usage:
jcli config add [flags]

Flags:
-d, --description string Description of the Jenkins
-h, --help help for add
-n, --name string Name of the Jenkins
-p, --proxy string Proxy of the Jenkins
-a, --proxyAuth string ProxyAuth of the Jenkins
-t, --token string Token of the Jenkins
--url string URL of the Jenkins
-u, --username string UserName of the Jenkins

example:
增加配置两种方式:
[root@VM_89_116_centos ~]# jcli config add -n ex1 -t 11ae42858f43b1d28335067efa4aaf6ada -u admin --url=http://localhost:8080
[root@VM_89_116_centos ~]# jcli config add -n ex2
新建 ex2 文件后,通过文件编辑器对 edit 修改文件。

在大多数情况下,只需要注意四个字段,包括:name、url、username 和 token。

[root@VM_89_116_centos ~]# jcli config edit
current: yourServer
language: ""
jenkins_servers:
- name: yourServer
url: http://localhost:8080
username: admin
token: 11d61409b3a23c5a5a340eb0423b5121b4
proxy: ""
proxyAuth: ""
description: ""
- name: ex1
url: http://localhost:8080
username: admin
token: 11ae42858f43b1d28335067efa4aaf6ada
proxy: ""
proxyAuth: ""
description: ""
preHooks: []
postHooks: []
pluginSuites: []
list
1
2
3
4
5
[root@VM_89_116_centos ~]# jcli config list

number name url description
0 *yourServer http://localhost:8080
1 ex1 http://localhost:8080
edit

[root@VM_89_116_centos ~]# jcli config edit ex1

select

[root@VM_89_116_centos ~]# jcli config select ex1

remove
1
2
3
4
5
Usage:
jcli config remove [flags]

example:
[root@VM_89_116_centos ~]# jcli config remove ex1

center

控制 jenkins 的下载更新

upgrade

Upgrade your Jenkins

[root@VM_89_116_centos ~]# jcli center upgrade

download
1
2
3
4
5
6
7
8
9
10
11
12
13
Usage:
jcli center download [flags]

Flags:
-h, --help help for download
--lts If you want to download Jenkins as LTS (default true)
-o, --output string The file of output (default "jenkins.war")
--progress If you want to show the download progress (default true)

example:
[root@VM_89_116_centos ~]# jcli center download
[root@VM_89_116_centos ~]# jcli center download -o ex4.war --progress=false
重命名为ex4.war,progress 默认为 true,显示下载进度条。
watch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

Watch your update center status

Usage:
jcli center watch [flags]

Flags:
--count int Count of watch (default 9999)
计数(默认9999)
-i, --interval int Interval of watch (default 1)
间隔(默认值1)
--util-install-complete The watch will be continue util all Jenkins plugins installation is completed
监视将继续直到所有 Jenkins 插件安装完成
--util-need-restart The watch will be continue util Jenkins needs restart
启动监视将继续直到 Jenkins 需要重新启动

watch 的参数可调,调节监控间隔时间、触发条件,通常用不到。

example:
[root@VM_89_116_centos ~]# jcli center watch
Jenkins Version: 2.190.2

completion

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

Genereate bash completion scripts

Usage:
jcli completion

Examples:
# Installing bash completion on macOS using homebrew
## If running Bash 3.2 included with macOS
brew install bash-completion
## or, if running Bash 4.1+
brew install bash-completion@2
## you may need add the completion to your completion directory
jcli completion > $(brew --prefix)/etc/bash_completion.d/jcli
## If you get trouble, please visit https://github.com/jenkins-zh/jenkins-cli/issues/83.

[root@VM_89_116_centos ~]# jcli completion > $(brew --prefix)/etc/bash_completion.d/jcli

crumb

1
2
3
4
5
6
7
8
Print crumbIssuer of Jenkins

Usage:
jcli crumb

example:
[root@VM_89_116_centos ~]# jcli crumb
Jenkins-Crumb=9775c2ca9bcbac492dcb16ca2509d5b7f89bae378553d1d761865c42ec3a924c

job

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Print the job of your Jenkins

Usage:
jcli job [flags]
jcli job [command]

Available Commands:
artifact Print the artifact list of target job: 显示出目标 job 的所有制品
build Build the job of your Jenkins: 构建job
create Create a job in your Jenkins: 创造job
delete Delete a job in your Jenkins 删除job
edit Edit the job of your Jenkins 修改一个job
history Print the history of job in your Jenkins 显示出 job 历史记录
input Input a job in your Jenkins 输入一个 job
log Print the job of your Jenkins 打印 job 日志
param Get param of the job of your Jenkins 获取 job 的参数
search Print the job of your Jenkins 查询 job
stop Stop a job build in your Jenkins 停止 job
type Print the types of job which in your Jenkins 打印出 job 的类型

Flags:
-h, --help help for job
-o, --output string Format the output (default "json")
artifact (?)
1
2
3
4
5
6
7
8
9
10
Print the artifact list of target job

Usage:
jcli job artifact <jobName> [buildID] [flags]
jcli job artifact [command]

Available Commands:
download Download the artifact of target job
Flags:
-h, --help
1
2
3
4
5
6
7
8
9
10
Usage:
jcli job artifact download <jobName> [buildID] [flags]

Download the artifact of target job

Flags:
--download-dir string The directory which artifact will be downloaded
-h, --help help for download
-i, --id string ID of the job artifact
--progress Whether show the progress (default true)
build
1
2
3
4
5
6
7
8
9
10
11
12
13
Build the job of your Jenkins

Usage:
jcli job build <jobName> [flags]

Flags:
-b, --batch Batch mode, no need confirm 批处理模式,无需确认
-h, --help help for build
--param string Params of the job 作业参数
--verbose Output the verbose 详细输出

example:
[root@VM_89_116_centos ~]# jcli job build devops_ci_cd_pipline_ex1 -b --verbose
create
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Create a job in your Jenkins

Usage:
jcli job create <jobName> [flags]

Flags:
--copy string Copy an exists job
-h, --help help for create
--type string Which type do you want to create

type:
Folder
GitHub Organization
Multibranch Pipeline
Freestyle project
Maven project
Multi-configuration project
Pipeline
External Job
MultiJob Project

example:
通过复制已有任务来创建新任务
[root@VM_89_116_centos ~]# jcli job create ex4 --copy devops_ci_cd_pipline_ex1
创建新任务
[root@VM_89_116_centos ~]# jcli job create ex5
edit
1
2
3
4
5
6
7
8
9
Edit the job of your Jenkins 

Usage:
jcli job edit <jobName>

example:
[root@VM_89_116_centos ~]# jcli job edit devops_pipeline

安装 pipeline-restful-api 插件然后重启
delete
1
2
3
4
5
6
7
8
9
10
11
Delete a job in your Jenkins

Usage:
jcli job delete <jobName> [flags]

Flags:
-b, --batch Batch mode, no need confirm 不用询问确认是否创建
-h, --help help for delete

example:
[root@VM_89_116_centos ~]# jcli job delete ex5 -b
stop
1
2
3
4
5
6
7
8
9
10
11
12
Stop a job build in your Jenkins
似乎有 bug ,要触发两次才能生效。

Usage:
jcli job stop <jobName> <buildNumber> [flags]

Flags:
-b, --batch Batch mode, no need confirm 批处理模式,无需确认
-h, --help help for stop

example:
jcli job stop devops_ci_cd_pipline_ex1 37 -b
input(?)
1
2
3
4
5
6
7
8
9
Input a job in your Jenkins

Usage:
jcli job input <jobName> [buildID] [flags]

Flags:
--action string The action wether you want to process or abort.
活动处理或者终止
-h, --help help for input
history
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Print the history of job in your Jenkins
查看历史构建状态。

Usage:
jcli job history <jobName>

example:
[root@VM_89_116_centos ~]# jcli job history devops_ci_cd_pipline_ex1
number displayname building result
0 #42 false FAILURE
1 #41 true
2 #40 true
3 #39 false SUCCESS
4 #38 false ABORTED
log
1
2
3
4
5
6
7
8
9
10
11
12
查看历史构建日志信息(控制台输出信息)。
Usage:
jcli job log <jobName> [flags]

Flags:
-h, --help help for log
-s, --history int Specific build history of log (default -1) 特殊构建历史日志
-i, --interval int Interval of watch (default 1) 查看间隔
-w, --watch Watch the job logs 查看 job 日志

example:
[root@VM_89_116_centos ~]# jcli job log devops_ci_cd_pipline_ex1
1
2
3
4
5
6
7
8
9
Usage:
jcli job search [keyword] [flags]

Flags:
--all Print all items if there's no keyword
打印所有 job
-h, --help help for search
--max int The number of limitation to print (default 10)
每次打印限制个数,默认为10
type
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Print the types of job which in your Jenkins   统计 jenkins 里面的类型

Usage:
jcli job type <jobName>

example:
[root@VM_89_116_centos ~]# jcli job type devops_ci_cd_pipline_ex1
number name type
0 Freestyle project Standalone Projects
1 Maven project Standalone Projects
2 Pipeline Standalone Projects
3 External Job Standalone Projects
4 Multi-configuration project Standalone Projects
0 MultiJob Project Uncategorized
0 Folder Nested Projects
1 GitHub Organization Nested Projects
2 Multibranch Pipeline Nested Projects
param
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Get param of the job of your Jenkins
获取 job 的参数

Usage:
jcli job param <jobName> [flags]

Flags:
-h, --help help for param
--indent Output with indent 缩进输出

example:
[root@VM_89_116_centos ~]# jcli job param pipeline_cicd_ex3

[{"Description":"please give a name","name":"userName","Type":"StringParameterDefinition","value":"","DefaultParameterValue":{"Description":"","Value":"Anthony"}},{"Description":"select the version to test","name":"version","Type":"ChoiceParameterDefinition","value":"","DefaultParameterValue":{"Description":"","Value":"1.1"}},{"Description":"you is boy or not","name":"is_boy","Type":"BooleanParameterDefinition","value":"","DefaultParameterValue":{"Description":"","Value":true}}]

pipeline_cicd_ex3:


pipeline{

agent any
parameters {
string(name: 'userName', defaultValue: 'Anthony', description: 'please give a name')
choice(name: 'version', choices: ['1.1', '1.2', '1.3'], description: 'select the version to test')
booleanParam(name: 'is_boy', defaultValue: true, description: 'you is boy or not')
}
stages {
stage('test') {
steps{
script {
sh "java -version"
}
}
}
}
}

open

Open your Jenkins with a browse
(用不到)

1
2
3
4
5
6
7
8
Usage:
jcli open [flags]

Flags:
-c, --config Open the configuration page of Jenkins
-h, --help help for open
-i, --interactive Interactive mode
-n, --name string Open a specific Jenkins by name

plugin

插件管理

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Usage:
jcli plugin [command]

Available Commands:
check Checkout update center server 检查可更新
download Download the plugins 下载插件
install Install the plugins 安装插件
list Print all the plugins which are installed 打印已安装的插件
open Openout update center server 启动更新
search Print the plugins of your Jenkins 查找已安装的插件
trend Show the trend of the plugin 显示出插件趋势
uninstall Uninstall the plugins 卸载插件
upgrade Upgrade the specific plugin 更新特定的插件
upload Upload a plugin to your Jenkins 上传插件

Examples:

jcli plugin upgrade [plugin name] --filter stringArray Filter for the list, like: name=foo

upgrade
1
2
3
4
5
6
7
8
9
Upgrade the specific plugin

Usage:
jcli plugin upgrade [plugin name] [flags]

Flags:
--filter stringArray Filter for the list, like: name=foo 筛选
example:
[root@VM_89_116_centos ~]# jcli plugin upgrade pipeline-model-api
trend
1
2
3
4
5
6
7
8
9
Show the trend of the plugin

Usage:
jcli plugin trend <pluginName>

example:
[root@VM_89_116_centos ~]# jcli plugin trend pipeline-model-api
***************** 180628
***************** 179369
check
1
2
3
4
5
6
7
8
Checkout update center server

Usage:
jcli plugin check

example:
[root@VM_89_116_centos ~]# jcli plugin check -h
Checkout update center server
download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Download the plugins

Usage:
jcli plugin download <keyword> 关键字。。。。

example:
[root@VM_89_116_centos ~]# jcli plugin download pipeline-github
Start to collect plugin dependencies...
Ready to download plugins, total: 31.
Start to download plugin pipeline-github, version: 2.5, number: 0
Start to download plugin workflow-cps, version: 2.76, number: 1
Start to download plugin workflow-api, version: 2.37, number: 2
Start to download plugin workflow-step-api, version: 2.20, number: 3
Start to download plugin structs, version: 1.20, number: 4
Start to download plugin jdk-tool, version: 1.3, number: 5
Start to download plugin jaxb, version: 2.3.0.1, number: 6
Start to download plugin trilead-api, version: 1.0.5, number: 7
Start to download plugin scm-api, version: 2.6.3, number: 8
uninstall
1
2
3
4
5
6
7
Uninstall the plugins

Usage:
jcli plugin uninstall [pluginName]

example:
[root@VM_89_116_centos ~]# jcli plugin uninstall mapdb-api
install
1
2
3
4
5
6
7
8
9
10
11
12
Install the plugins

Usage:
jcli plugin install [pluginName] [flags]

Flags:
-h, --help help for install
--suite string Suite of plugins
example:
[root@VM_89_116_centos ~]# jcli plugin install pipeline-github

注意:插件安装后要重启,要重启~
search
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
[root@VM_89_116_centos ~]# jcli plugin search github
number name installed version installedVersion title
0 github-branch-source true 2.5.8 GitHub Branch Source Plugin
1 github true 1.29.5 GitHub plugin
2 github-api true 1.95 GitHub API Plugin
3 pipeline-github-lib true 1.0 Pipeline: GitHub Groovy Libraries
4 blueocean-github-pipeline false 1.19.0 GitHub Pipeline for Blue Ocean
5 disable-github-multibranch-status false 1.1 Disable GitHub Multibranch Status
6 github-autostatus false 3.6.0 Job and Stage monitoring
7 github-coverage-reporter false 1.8 GitHub Coverage Reporter
8 github-issues false 1.2.4 GitHub Issues
9 github-oauth false 0.33 GitHub Authentication
10 github-organization-folder false 1.6 GitHub Organization Folder
11 github-pr-comment-build false 2.1 GitHub PR Comment Build
12 github-pr-coverage-status false 2.1.1 GitHub Pull Request Coverage Status
13 github-pullrequest false 0.2.6
list
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
[root@VM_89_116_centos ~]# jcli plugin list
number name version update
0 mercurial 2.8 false
1 pipeline-milestone-step 1.3.1 false
2 locale 1.4 false
3 teamconcert 1.3.0 false
4 mapdb-api 1.0.9.0 false
5 throttle-concurrents 2.0.1 false
6 workflow-scm-step 2.9 false
7 tfs 5.157.0 false
8 cvs 2.14 false
9 credentials-binding 1.20 false
10 matrix-auth 2.5 false
11 pam-auth 1.6 false
12 ssh 2.6.1 false
13 emailext-template 1.1 false
14 momentjs 1.1.1 false
upload:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Upload a plugin from local filesystem or remote URL to your Jenkins

Usage:
jcli plugin upload [flags]

Aliases:
upload, up

Flags:
-h, --help help for upload
-r, --remote string Remote plugin URL
--remote-jenkins string Remote Jenkins which will find from config list
--remote-password string Password of remote plugin URL
--remote-user string User of remote plugin URL
--show-progress Whether show the upload progress (default true)
--skip-posthook Whether skip the post command hook
--skip-prehook Whether skip the previous command hook

Examples:
jcli plugin upload --remote https://server/sample.hpi
jcli plugin upload sample.hpi
jcli plugin upload sample.hpi --show-progress=false

queue

队列管理

list

列出所有队列

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
Usage:
jcli queue list [flags]

Flags:
-h, --help help for list
-o, --output string Format the output (default "json")

example:
[root@VM_89_116_centos ~]# jcli queue list

{
"Items": [
{
"Blocked": false,
"Buildable": true,
"ID": 122,
"Params": "",
"Pending": false,
"Stuck": false,
"URL": "queue/item/122/",
"Why": "等待下一个可用的执行器",
"BuildableStartMilliseconds": 1573714706814,
"InQueueSince": 1573714706758,
"Actions": []
},
{
"Blocked": false,
"Buildable": true,
"ID": 120,
"Params": "",
"Pending": false,
"Stuck": false,
"URL": "queue/item/120/",
"Why": "等待下一个可用的执行器",
"BuildableStartMilliseconds": 1573714673447,
"InQueueSince": 1573714673446,
"Actions": []
},
{
"Blocked": false,
"Buildable": true,
"ID": 118,
"Params": "",
"Pending": false,
"Stuck": false,
"URL": "queue/item/118/",
"Why": "等待下一个可用的执行器",
"BuildableStartMilliseconds": 1573714663446,
"InQueueSince": 1573714663418,
"Actions": []
}
]
}

cancel

取消队列

1
2
3
4
5
6
7
Usage:
jcli queue cancel <id> [flags]
Flags:
-h, --help

example:
[root@VM_89_116_centos ~]# jcli queue cancel 118

restart

重启

1
2
3
4
5
Usage:
jcli restart [flags]

Flags:
-b, --batch Batch mode, no need confirm

user

用户管理

1
2
3
4
5
6
7
8
9
10
11
12
13
Usage:
jcli user [flags]
jcli user [command]

Available Commands:
create Create a user for your Jenkins
delete Delete a user for your Jenkins
edit Edit the user of your Jenkins
token Token the user of your Jenkins

Flags:
-h, --help help for user
-o, --output string Format the output (default "json")

create
1
2
3
4
5
jcli user create <username> [password] 

example:
[root@VM_89_116_centos ~]# jcli user create admin1 admin1
create user success. Password is: admin1
delete
1
2
3
4
5
6
7
8
9
Usage:
jcli user delete <username> [flags]

Flags:
-b, --batch Batch mode, no need confirm 批处理模式,无需确认

example:
[root@VM_89_116_centos ~]# jcli user delete admin1
? Are you sure to delete user admin1 ? Yes
edit
1
2
3
4
5
6
7
Usage:
jcli user edit [flags]

Flags:
-d, --desc Edit the description

仅仅修改描述,不支持修改密码权等高级功能
token
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Usage:
jcli user token -g [flags]

Flags:
-g, --generate Generate the token
-n, --name string Name of the token

example:
[root@VM_89_116_centos ~]# jcli user token -g

{
"Status": "ok",
"Data": {
"TokenName": "jcli-Mouseflash",
"TokenUUID": "d7de368b-bb54-44a4-99ef-db1674a07e42",
"TokenValue": "1109aceacc74236930f5ef2d6372d2704e"
}
}

[root@VM_89_116_centos ~]# jcli user token -g -n 测试

{
"Status": "ok",
"Data": {
"TokenName": "测试",
"TokenUUID": "8a642d49-78ee-448a-8abc-59d29b5f4a68",
"TokenValue": "114229e08012d8b29f15d98986ef0f8f09"
}
}

问题总结

1、jcli job build devops_ci_cd_pipline_ex1 -b
不支持连续,需要等待上一条 build 完全进入 build 才会 启动下一条 build

2、不支持查看正在构建的任务清单。

3、不支持修改构建任务的配置。

4、不支持查看已经存在的用户列表

5、job create 的 type 参数不可用

喜欢这篇文章?打赏一下作者吧!

欢迎关注我的其它发布渠道