- 项目简介
- 安装目录
mkdir -p /opt/jenkinscli && cd /opt/jenkinscli
- JenkinsCLI下载
wget http://<your-jenkins-server>/jnlpJars/jenkins-cli.jar # <your-jenkins-server> 替换为你的 Jenkins 服务器地址
- JenkinsCLI授权
Dashboard-->Configure Global Security-->授权策略-->Anyone can do anything
- JenkinsCLI版本
java -jar /opt/jenkinscli/jenkins-cli.jar -s http://<your-jenkins-server> version # <your-jenkins-server> 替换为你的 Jenkins 服务器地址
- JenkinsCLI别名
echo -e '\nalias jenkins-cli="java -jar /opt/jenkinscli/jenkins-cli.jar -s http://<your-jenkins-server>"' >> ~/.bashrc && source ~/.bashrc # <your-jenkins-server> 替换为你的 Jenkins 服务器地址
- JenkinsCLI帮助
jenkins-cli help
- 下载插件测试
jenkins-cli install-plugin gitee:1.2.7