簡體   English   中英

無法構建 Jenkins 腳本

[英]Unable to build Jenkins script

我有 selenium/python 框架,我想推送並與 jenkins 一起使用。

但是,在嘗試構建腳本時出現以下錯誤:

Started by user Dusan Kovacevic
Running as SYSTEM
Building in workspace /Users/dusandev/.jenkins/workspace/SeleniumBase
The recommended git tool is: NONE
using credential somecredentials
> git rev-parse --resolve-git-dir 
/Users/dusandev/.jenkins/workspace/SeleniumBase/.git # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url https://github.com/StreamFlow-Finance/automated-web- 
tests.git # timeout=10
Fetching upstream changes from https://github.com/StreamFlow-Finance/automated-web- 
tests.git
> git --version # timeout=10
> git --version # 'git version 2.34.1'
using GIT_ASKPASS to set credentials 
> git fetch --tags --force --progress -- https://github.com/StreamFlow- 
Finance/automated-web-tests.git +refs/heads/*:refs/remotes/origin/* # timeout=10
> git rev-parse refs/remotes/origin/main^{commit} # timeout=10
Checking out Revision 82fe529ff81267aebb97098fb92e4401abfe0462 
(refs/remotes/origin/main)
> git config core.sparsecheckout # timeout=10
> git checkout -f 82fe529ff81267aebb97098fb92e4401abfe0462 # timeout=10
Commit message: "Add files via upload"
> git rev-list --no-walk 82fe529ff81267aebb97098fb92e4401abfe0462 # timeout=10
[SeleniumBase] $ /bin/sh -xe 
/var/folders/nb/qbb9ctrn3rb68w54m_yyyqhh0000gn/T/shiningpanda17442261483823605080.sh
+ python -m venv env
+ call ./env/Scripts/activate.bat
/var/folders/nb/qbb9ctrn3rb68w54m_yyyqhh0000gn/T/shiningpanda17442261483823605080.sh: 
line 3: call: command not found
Build step 'Custom Python Builder' marked build as failure
Finished: FAILURE

這是我在 Jenkins 中的構建命令下的內容:

python -m venv env
call ./env/Scripts/activate.bat
pip install -r requirements.txt
sbase install chromedriver latest
pytest --headless

我要做的是設置遠程測試功能。 其他隊友可以隨時運行測試。

感謝您提供任何幫助,並在此先感謝您。

也許為了從 Jenkins 腳本中調用 a.bat 文件,您需要像下面這樣編寫它。

start cmd.exe /c ./env/Scripts/activate.bat

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM