我托管了我的source code on github,并在每次签入时添加了一个触发器。当触发器被触发时,Cirrus-CI build tool开始构建我的组件。要实现这一点,必须正确设置github,并且每个组件都必须有一个有效的.cirrus.yml
文件,该文件负责构建设置。
如何更改我的配置文件,以便在构建失败时收到通知?
这是我的.cirrus.yml
文件:
container:
image: maven:latest
build_task:
build_script: mvn clean compile test sonar:sonar
是的,它是相当短的,并且在Cirrus-CI帮助页面上是explanations concering email notification和writing conditional tasks,但是我不知道如何才能获得构建结果并在该上创建条件。
发布于 2019-05-09 19:25:00
解决方案很简单,可以是:
container:
image: maven:latest
build_task:
build_script: mvn clean compile test sonar:sonar
on_failure:
mail_script: mvn postman:send-mail
这需要pom.xml
中的postman mail plugin。
https://stackoverflow.com/questions/56035830
复制相似问题