Jenkins集成Apifox

安装

1.Jenkins

在服务器上安装Jenkins,安装步骤可参考jenkins官网:安装Jenkins

2.Apifox CLI

1.安装Node.js,Apifox CLI 依赖于 Node.js >= v10。

yum install -y nodejs

2.安装npm

yum install -y npm

3.安装Apifox CLI

npm install -g apifox-cli

4.添加环境变量

[root@common-jenkins profile.d]# cd /etc/profile.d
[root@common-jenkins profile.d]# cat apifox.sh 
export PATH=$PATH:/root/.npm-global/bin
[root@common-jenkins profile.d]# source ./apifox.sh 

Jenkins 配置 NodeJS 环境

1.打开 Jenkins,安装 NodeJS 插件

2.在全局工具配置中设置 NodeJS 路径

3.任务 build 环境中设置 node

4.ApifoxCli的ToKen获取

5.Jenkins 新建一个任务,添加构建步骤- Excute shell,将 ApifoxCli 的命令拷贝进去,保存并运行即可。

6.Jenkins 报告展示

1.安装报告生成插件

2.添加模块并写上报告名字

执行构建并检查

[root@common-jenkins apifox-reports]# pwd
/server/apifox-reports
[root@common-jenkins apifox-reports]# ls
yzb.html
  • 3
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 4
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

运维小斌

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值