1、构建项目

2、勾选‘参数化构建过程’,选择对应参数类型(如字符参数)

Jenkins参数化构建过程中python脚本中参数的传递

3、选择构建步骤

Jenkins参数化构建过程中python脚本中参数的传递

4、保存项目

5、python脚本中引用参数

1)引入包 

import os

2)调用参数

Jenkins参数化构建过程中python脚本中参数的传递

3)构建项目

Jenkins参数化构建过程中python脚本中参数的传递

构建成功!!

Jenkins参数化构建过程中python脚本中参数的传递

相关文章:

  • 2022-12-23
  • 2021-05-07
  • 2021-05-22
  • 2021-11-29
  • 2021-09-04
猜你喜欢
  • 2021-11-25
  • 2021-06-16
  • 2022-01-20
  • 2021-05-07
  • 2021-09-04
相关资源
相似解决方案