繁体   English   中英

如何编写用于在 AWS 中构建项目的管道脚本?

[英]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安装路径不同,您需要在节点配置中的代理级别指定该路径

https://cloudbees.zendesk.com/hc/article_attachments/360065141291/db28cbd4_tool_locations.png

(图片来自“ 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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM