[英]How to integrate maven with slack?
我想在构建阶段向通道/用户发送特定的松弛消息。 我知道我可以创建一个maven插件,也许已经有了一个?
是我自己做的: https : //github.com/moacyrricardo/maven-slack
使用此插件,您只需添加webhook即可放松并使用url发布消息。
要使用它,请将's3 wagon extension'添加到您的pom.xml:
<build>
<extensions>
<extension>
<groupId>org.springframework.build.aws</groupId>
<artifactId>org.springframework.build.aws.maven</artifactId>
<version>3.0.0.RELEASE</version>
</extension>
</extensions>
</build>
然后插件回购:
<pluginRepository>
<id>s3-moarepo</id>
<url>s3://moarepo/release</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>s3-moarepo-snapshot</id>
<url>s3://moarepo/snapshot</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
最后你可以使用它
<plugin>
<groupId>br.com.kibutx</groupId>
<artifactId>slack-maven-plugin</artifactId>
<version>1.0.0-SNAPSHOT</version>
<executions>
<execution>
<id>MSG inicio deploy</id>
<phase>validate</phase>
<goals>
<goal>slackmessage</goal>
</goals>
<configuration>
<apiHash>hash1/hash2/hash3</apiHash>
<channel>@devmate</channel>
<message>Short message</message>
<fields>
<field>
<value>Field 1 value</value>
</field>
</fields>
</configuration>
</execution>
</executions>
</plugin>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.