问题出现:

Jenkins一直都构建成功,今天突然报错:Jenkins Build step 'Execute shell' marked build as failure

问题原因:

By default Jenkins take /bin/sh -xe and this means -x will print each and every command.And the other option -e, which causes shell to stop running a script immediately when any command exits with non-zero (when any command fails) exit code.

解决办法:

通过问题原因基本确定是因为-e或者-x导致构建失败(我这边是因为-x导致磁盘空间不足),所以我们在"Execute shell"的开头加上"#!/bin/sh" 或"#!/bin/bash"就可以了。

Jenkins Build step 'Execute shell' marked build as failure的更多相关文章

  1. Build step 'Execute shell' marked build as failure解决

    今天jenkins构建时运行脚本报错如下: Build step 'Execute shell' marked build as failure 脚本没问题后来看了下原因是磁盘空间不足导致报错,清除下 ...

  2. Build step 'Execute Windows batch command' marked build as failure

    坑爹的Jenkis,在执行windows命令编译.NET项目的时候命令执行成功了,但是却还是报了这样一个错: Build step 'Execute Windows batch command' ma ...

  3. jenkins:通过execute shell启动的进程会被杀死的问题

    [问题]在jenkins中配置自动更新部署项目时,如果采取用execute shell启动/关闭tomcat,会发现可以进行关闭tomcat,但是无法启动tomcat,虽然构建会显示执行成功,但是查看 ...

  4. jenkins中通过execute shell启动的进程会被杀死的问题

    在jenkins中配置自动更新部署项目时,如果采取用execute shell启动/关闭tomcat,会发现可以进行关闭tomcat, 但是无法启动tomcat,虽然构建会显示执行成功,但是查看进程, ...

  5. Build step 'Invoke top-level Maven targets' marked build as failure Finished解决

    最近用法 jenkins部署maven项目时候,突然出现Build step 'Invoke top-level Maven targets' marked build as failure Fini ...

  6. Jenkins Docker安装及Docker build step插件部署配置

    生产部署环境:A:192.168.1.2 B:192.168.1.3  两台服务器系统均是Centos 7.3 , Docker版本都1.12.6 Jenkins安装操作步骤: 1.在A服务器上使用命 ...

  7. jenkin 不必要的Execute shell执行失败,导致jenkins都失败的解决

    问题:jenkins里配置了多个执行shell,且有后续的执行job任务.但其中一个Execute shell执行失败了导致后续的shell都不执行了 而这个失败的shell并不是一定要执行   解决 ...

  8. Pipeline build step with parameters

    build step https://jenkins.io/doc/pipeline/steps/pipeline-build-step/#build-build-a-job 一个任务的执行触发,另外 ...

  9. 使用shell脚本build并创建ipa文件(转)

    前言 由于项目引入了敏捷开发,需要每天build出一个ipa供QA测试.此前是使用Xcode先achive出一个文件,再在 organizer->achives里发布ipa,一直感觉也没啥不方便 ...

随机推荐

  1. Files的常用方法都有哪些?

    Files. exists():检测文件路径是否存在.Files. createFile():创建文件.Files. createDirectory():创建文件夹.Files. delete():删 ...

  2. 怎么理解 Redis 事务?

    1)事务是一个单独的隔离操作:事务中的所有命令都会序列化.按顺序地执行.事务在执行的过程中,不会被其他客户端发送来的命令请求所打断. 2)事务是一个原子操作:事务中的命令要么全部被执行,要么全部都不执 ...

  3. java-面向对象相关

    public class DemoMethodOverload { public static void main(String[] args) { int[] array = new int[]{1 ...

  4. memcached 最大的优势是什么?

    Memcached 最大的好处就是它带来了极佳的水平可扩展性,特别是在一个巨大的 系统中.由于客户端自己做了一次哈希,那么我们很容易增加大量 memcached 到集群中.memcached 之间没有 ...

  5. sleep 方法和 wait 方法有什么区别?

    这个问题常问,sleep 方法和 wait 方法都可以用来放弃 CPU 一定的时间,不同点 在于如果线程持有某个对象的监视器,sleep 方法不会放弃这个对象的监视器, wait 方法会放弃这个对象的 ...

  6. Python - Datetime库简介

  7. (2)_引言Introduction【论文写作】

  8. char向wchar的转换-MultiByteToWideChar

    问题产生 使用CreateFile函数,如下: CreateFile(lpcTheFile, GENERIC_READ, 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NO ...

  9. Creating a File View

    创建文件视图 为了映射一个文件的数据到进程的虚拟内存,你必须创建一个文件的视图.MapViewofFile和MapViewofFileEX使用CreateFileMapping返回的句柄,在虚拟地址空 ...

  10. 删除html标签或标签属性以及样式

    JavaScript module for stripping HTML tags and/or HTML element attributes from strings. 安装 npm instal ...