![](/img/trans.png)
[英]At next new agent in the same Jenkins Pipeline, how to get customized environment variable in last ended agent (using AWS Code commit Jenkins project)
[英]How to write a pipeline script for building the project in AWS?
我对 AWS 部分非常陌生,我想构建和部署我的项目,因为我在 jenkins 中选择管道脚本我正在编写一些构建脚本,我在控制台上遇到这样的错误
Started by user saitarun
Running in Durability level: MAX_SURVIVABILITY
[Pipeline] Start of Pipeline
[Pipeline] node
Running on Jenkins in /var/lib/jenkins/workspace/sample_pipelinejob
[Pipeline] {
[Pipeline] stage
[Pipeline] { (clone repository and clean project)
[Pipeline] sh
+ git clone https://github.com/saitarun135/ADDRESS_BOOK
/var/lib/jenkins/workspace/sample_pipelinejob@tmp/durable-8b9fc0cc/script.sh: line 1: git: command not found
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: script returned exit code 127
Finished: FAILURE
如何安装 git
如果您的主 Jenkins 实例和 Jenkins 代理之间的git
安装路径不同,您需要在节点配置中的代理级别指定该路径。
(图片来自“ cloudbees Using PATH in the Git Configuration / In the node configuration ”)
您可能需要在该实例上安装 Git: sudo yum install git
错误信息
git: command not found
显示git
未安装在您的Jenkins
机器上或git
不在您的PATH
变量中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.