Continuous integration Cirrus CI在生成失败时通知电子邮件
我已经托管了我的服务器,并在每次签入时添加了一个触发器。触发触发器后,将开始构建我的组件。要实现这一点,必须正确设置github,并且每个组件必须有一个有效的Continuous integration Cirrus CI在生成失败时通知电子邮件,continuous-integration,cirrus-ci,Continuous Integration,Cirrus Ci,我已经托管了我的服务器,并在每次签入时添加了一个触发器。触发触发器后,将开始构建我的组件。要实现这一点,必须正确设置github,并且每个组件必须有一个有效的.cirrus.yml文件,该文件负责构建设置 如何更改配置文件,以便在构建失败时收到通知 这是我的.cirrus.yml文件: container: image: maven:latest build_task: build_script: mvn clean compile test sonar:sonar 是的,它很短,在
.cirrus.yml
文件,该文件负责构建设置
如何更改配置文件,以便在构建失败时收到通知
这是我的.cirrus.yml
文件:
container:
image: maven:latest
build_task:
build_script: mvn clean compile test sonar:sonar
是的,它很短,在Cirrus CI帮助页面上是,但我不知道如何获得构建结果并在此基础上创建条件。解决方案非常简单:
container:
image: maven:latest
build_task:
build_script: mvn clean compile test sonar:sonar
on_failure:
mail_script: mvn postman:send-mail
这需要在您的
pom.xml
中使用以下解决方案:
container:
image: maven:latest
build_task:
build_script: mvn clean compile test sonar:sonar
on_failure:
mail_script: mvn postman:send-mail
这需要在pom.xml
中使用