jenkin报C:\Program Files (x86)\Jenkins\workspace\python_test>exit 1 Build step '执行 Windows 批处理命令' ?

65 篇文章 37 订阅 ¥9.90 ¥99.00

jenkin报如下错误:

原因:jenkins执行命令,会把命令生成一个批处理文件执行,而pybot命令对于批处理来说是外部命令,所以要加call表示调用。而jenkins执行windows命令,若退出代码不为0 ,则jenkins会将构建标记为失败,所以需要加上exit 0表示执行完成退出

解决方法:构建命令在pybot前面加上call,最后加上exit 0

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
<properties> <hudson.security.AuthorizationMatrixProperty> <inheritanceStrategy class="org.jenkinsci.plugins.matrixauth.inheritance.InheritParentStrategy"/> <permission>USER:hudson.model.Item.Read:anonymous</permission> </hudson.security.AuthorizationMatrixProperty> <jenkins.model.BuildDiscarderProperty> <strategy class="hudson.tasks.LogRotator"> <daysToKeep>90</daysToKeep> <numToKeep>-1</numToKeep> <artifactDaysToKeep>30</artifactDaysToKeep> <artifactNumToKeep>-1</artifactNumToKeep> </strategy> </jenkins.model.BuildDiscarderProperty> <com.dabsquared.gitlabjenkins.connection.GitLabConnectionProperty plugin="[email protected]"> <gitLabConnection>src.ift.run</gitLabConnection> <jobCredentialId/> <useAlternativeCredential>false</useAlternativeCredential> </com.dabsquared.gitlabjenkins.connection.GitLabConnectionProperty> <com.sonyericsson.rebuild.RebuildSettings plugin="rebuild@1.34"> <autoRebuild>false</autoRebuild> <rebuildDisabled>false</rebuildDisabled> </com.sonyericsson.rebuild.RebuildSettings> <hudson.plugins.throttleconcurrents.ThrottleJobProperty plugin="[email protected]"> <maxConcurrentPerNode>3</maxConcurrentPerNode> <maxConcurrentTotal>0</maxConcurrentTotal> <categories class="java.util.concurrent.CopyOnWriteArrayList"/> <throttleEnabled>true</throttleEnabled> <throttleOption>project</throttleOption> <limitOneJobWithMatchingParams>false</limitOneJobWithMatchingParams> <paramsToUseForLimit/> <configVersion>1</configVersion> </hudson.plugins.throttleconcurrents.ThrottleJobProperty> <jenkins.branch.RateLimitBranchProperty_-JobPropertyImpl plugin="[email protected]_188a_562481"> <durationName>hour</durationName> <count>40</count> <userBoost>true</userBoost> </jenkins.branch.RateLimitBranchProperty_-JobPropertyImpl> </properties> 这是jenkin中 job定义中的一段,请解释这一段的含义
07-14
这段代码是 Jenkins Job 配置文件中的一部分,定义了一些与该 Job 相关的属性和插件配置。 让我们逐个解释每个属性的含义: 1. `<hudson.security.AuthorizationMatrixProperty>`:定义了 Jenkins 的权限矩阵属性,指定了该 Job 的权限设置。在这里,`<permission>` 元素指定了匿名用户对该 Job 的读取权限。 2. `<jenkins.model.BuildDiscarderProperty>`:定义了构建丢弃策略属性,该属性决定了构建历史的保留和丢弃规则。在这里,使用了 `<strategy>` 元素指定了构建日志保留的天数和数量限制。 3. `<com.dabsquared.gitlabjenkins.connection.GitLabConnectionProperty>`:定义了 GitLab 插件的连接属性,用于与 GitLab 服务器进行集成。在这里,`<gitLabConnection>` 元素指定了 GitLab 服务器的地址。 4. `<com.sonyericsson.rebuild.RebuildSettings>`:定义了重新构建插件的设置属性,用于允许或禁止重新构建 Job。在这里,`<autoRebuild>` 元素指定了是否自动重新构建。 5. `<hudson.plugins.throttleconcurrents.ThrottleJobProperty>`:定义了并发限制属性,用于限制并发执行 Job 的数量。在这里,`<maxConcurrentPerNode>` 元素指定了每个节点上允许的最大并发数量。 6. `<jenkins.branch.RateLimitBranchProperty_-JobPropertyImpl>`:定义了分支限制属性,用于限制 Job 分支的创建频率。在这里,`<durationName>` 元素指定了限制时间间隔的单位,`<count>` 元素指定了该时间间隔内允许的分支创建数量。 这些属性和插件配置可以根据你的需求进行修改和调整,以满足特定的工作流程和业务要求。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

熊猫_water

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值