当前位置: 首页 > 面试题库 >

Jenkins-推送部署测试步骤失败

万开畅
2023-03-14
问题内容

我正在按照Push上的说明进行部署,以使用Jenkins测试和部署以python和Flask编写的Google App Engine应用。

测试位于应用程序的根文件夹中,该文件名为 tests.py

执行外壳步骤中的命令是

nosetests tests.py

我收到以下错误,由于我对Jenkins相当陌生,因此我不确定如何解决此问题。

Started by user User Name
Building remotely on cloud-dev-php in workspace /var/jenkins/workspace/CFC Melbourne production pipeline
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url https://source.developers.google.com/p/cfc-melbourne-website/ # timeout=10
Fetching upstream changes from https://source.developers.google.com/p/cfc-melbourne-website/
 > git --version # timeout=10
using .gitcredentials to set credentials
 > git config --local credential.helper store --file=/tmp/git7069316934747655973.credentials # timeout=10
 > git -c core.askpass=true fetch --tags --progress https://source.developers.google.com/p/cfc-melbourne-website/ +refs/heads/*:refs/remotes/origin/*
 > git config --local --remove-section credential # timeout=10
 > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
 > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision 3a8caffa38303b3ae4741aac83e6ac807077b5be (refs/remotes/origin/master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 3a8caffa38303b3ae4741aac83e6ac807077b5be
 > git rev-list 3a8caffa38303b3ae4741aac83e6ac807077b5be # timeout=10
[CFC Melbourne production pipeline] $ /bin/sh -xe /tmp/hudson3364335209750264714.sh
+ nosetests tests.py
/tmp/hudson3364335209750264714.sh: 2: /tmp/hudson3364335209750264714.sh: nosetests: not found
Build step 'Execute shell' marked build as failure
Finished: FAILURE

问题答案:

这并不是一个真正的Jenkins问题-正如构建输出所指示的那样,您的shell脚本失败了,因为它找不到nosetests可执行文件:

nosetests: not found

您确定nose已在cloud-dev- phpJenkins构建机器上安装了它吗?

如果您正在使用该即按即用映像,则应该已经安装了它-但是由于您的构建是在 PHP 构建计算机而不是 Python 计算机上运行的,因此可能并非如此。
您应该仔细检查是否已按照说明进行操作,以确保您的Python Jenkins作业在Python构建机器上运行。

如果 安装,则可能不是默认设置PATH,在这种情况下,您可以更改noseteststo
的用法/usr/local/bin/nosetests(或任何路径)。



 类似资料:
  • 问题内容: 我从bitnami-jenkins图像创建了一个新的计算引擎实例,以自动部署我的应用程序引擎应用程序。我使用以下命令来这样做: 创建机器后,我创建了一个作业来部署代码,如下所示: https://cloud.google.com/tools/cloud-repositories/docs/push-to- deploy 但是,我的工作失败,并出现以下错误: 还有其他人遇到过吗?我有一台

  • 经过几天的研究,接近自杀倾向在这里我的问题,真的真的希望我太愚蠢了,不能自己找到问题.... 安装程序: Windows7 / 专家 3.2.3 / jdk 1.7.0_60 (64 位) / 人工 3.5.0 问题: - mvn 全新安装部署 -- 干杯 j. 日志: SETTINGS.XML POM.XML http://maven.apache.org/xsd/maven-4.0.0.xsd

  • 解压下列压缩包至/tmp/redis目录,以符合上述目录结构: 部署相关组件: cd /tmp/redis/deploy ./deploy.sh 修改Master配置文件redis.conf,注释掉包含slaveof的语句。 修改Slave配置文件redis.conf,添加slaveof masterIP port,指定主从 修改三台机器的sentinel配置文件,指定主服务器的IP和端口: se

  • 我创建了新的Deploy-to-staging项目,并将其配置编辑如下: > 在构建中,选择从另一个项目复制工件选择项目工件 选择生成后操作 我怎么才能修好这个? 我的tomcat凭据位于[tomcat目录]/conf/tomcat-users.xml中,如下所示:

  • 主要内容:1. 背景研究,2. 收集数据,3. 设定业务目标,4. 构建假设,5. 创造变体/假设,6. 运行变体,7. 分析数据A/B测试包括一系列必须按顺序进行的过程,以得出一个现实的结论。 在本章中,我们将详细讨论可用于在任何网页上运行测试的A/B测试过程的步骤 - 1. 背景研究 背景研究在A/B测试中起着至关重要的作用。 第一步是找出网站的跳出率。 这可以通过几种广泛使用的背景研究工具(如Google Analytics等)的帮助完成。 2. 收集数据 来自Google Analyti

  • 问题内容: Jenkins :版本1.525 Jenkins服务器URL :http ://my.jenkins.server.com:9040 Linux Red Hat 5.3 Artifactory :免费版本 Artifactory服务器网址 :http://my.artifactory.server:8081 / Artifactory 我可以在Jenkins中成功构建并将工件上传到各自