Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Add slacktee tool.
Browse files Browse the repository at this point in the history
  • Loading branch information
iay committed Jul 29, 2016
1 parent f5dc2ee commit e16cf06
Show file tree
Hide file tree
Showing 2 changed files with 651 additions and 0 deletions.
43 changes: 43 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
<property name="tools.mda" value="${tools.dir}/aggregator-cli-0.9.1"/>
<property name="tools.mdnorm" value="${tools.dir}/mdnorm"/>
<property name="tools.metadatatool" value="${tools.dir}/metadatatool"/>
<property name="tools.slacktee" value="${tools.dir}/slacktee" />
<property name="tools.xmlsectool" value="${tools.dir}/xmlsectool-2.0.0/"/>
<property name="tools.xalan" value="${tools.dir}/xalan"/>

Expand Down Expand Up @@ -293,6 +294,14 @@
</scp>
</target>

<!--
****************************************************
*** ***
*** S A M L M D V E R I F I C A T I O N ***
*** ***
****************************************************
-->

<!--
Verify a metadata file held on the master distribution site.
Expand Down Expand Up @@ -637,6 +646,40 @@
</sequential>
</macrodef>

<!--
***********************************
*** ***
*** S L A C K T E E T O O L ***
*** ***
***********************************
-->

<macrodef name="SLACK.send">
<attribute name="conf" />
<attribute name="colour" />
<attribute name="message" />
<sequential>
<exec executable="bash" failonerror="true">
<arg value="-c" />
<arg value="echo -e '@{message}' | ${tools.slacktee}/bin/slacktee.sh -p --config @{conf} -a @{colour}" />
</exec>
</sequential>
</macrodef>

<!--
Send success notification to slack channel
-->
<target name="slack.notify.publication.success">
<tstamp>
<format property="DATE_UTC" pattern="yyyy-MM-dd" locale="UTC" />
</tstamp>
<tstamp>
<format property="TIME_UTC" pattern="HH:mm" locale="UTC" />
</tstamp>
<SLACK.send conf="${tools.slacktee}/conf/aggr-ant.conf" colour="good"
message="${DATE_UTC} ${TIME_UTC}: Successfully published new UKf MD Aggregates and MDQ cache." />
</target>

<!--
*****************************************
*** ***
Expand Down
Loading

0 comments on commit e16cf06

Please sign in to comment.