查看jenkins内置变量:
1.新建一个job;
2.构建-增加构建步骤-执行shell;
3.点击 可用的环境变量列表 即可查看
如WORKSPACE : 作为工作空间分配给构建目录的绝对路径
jenkins每创建一个任务,都会为这个任务产生一个工作空间,jenkins工作空间在服务器中的路径为 /root/.jenkins/workspace
例如任务名称为 python_proj,则它的工作空间为: /root/.jenkins/workspace/python_proj
使用jenkins内置变量:
示例:${变量名}