Jenkins pipeline macOS agent 报错:cmake: command not found 在一台 macOS 的 anget 中,我们的 pipeline 脚本一直报错:cmake: command not found,但实际系统中已经通过 brew 安装过 cmake。并且在系统中通过使用命令 cmake --version 也能显示正常版本。那是不是 cmake 所在的目录并不在 Jenkins agent 的环境变量中呢?为了验证这个问题我们在 Jenkinsfile 中增加一行打印当前环境变量信息的语句: