簡體   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