Ok I'm still doing something wrong here so let me walk through the whole 
process

1). Created a go_notify.conf file in the directory specified by the 
CRUISE_SERVER_DIR 
environment variable (I'm running Windows so it is in the C:\Program Files 
(x86)\Go Server folder)
2) Added minimal config example updated with input from Ankit so now it 
looks like this:

gocd.slack {
  login = "gocdAPI"
  password = "password"
  server-host = "http://10.32.16.225:8153/";
  api-server-host = "http://10.32.16.225:8153/";
  webhookUrl = "https://hooks.slack.com/services/...";

  # optional fields
  channel = "#gocd-testchannel"
  slackDisplayName = "goCD-Build-Bot"
  slackUserIconURL = 
"https://s3-us-west-2.amazonaws.com/slack-files2/avatars/2019-02-28/565255710470_7743251bfb8965ec5063_72.jpg";
  display-console-log-links = true
  displayMaterialChanges = true
  process-all-rules = true

}

3) Added a slack task to a pipeline specifying the webhook url, slack 
channel and the channel type as 'channel' and the run if conditions is set 
to passed and this pipeline is building without error
4) From the dashboard I trigger a build of the pipeline and when the job is 
done and has passed I have a notification in the channel but it is only the 
name and icon that I specified when I created the webhook

https://ibb.co/61wxpR9


On Monday, March 4, 2019 at 5:02:48 PM UTC-7, Ankit wrote:
>
> Hi James,
>
> By default, you should see triggered by, reason, label, console logs 
> options. In order to display the last 5 changes, you can add 
> "truncate-changes" to the go_notify.conf file.You can refer to this 
> <https://github.com/ashwanthkumar/gocd-slack-build-notifier#configuration> 
> link for all the available options.
>
> I tried below basic configuration to get the triggered by, reason, label, 
> console logs options.
>
> gocd.slack {
>   login = "someuser"
>   password = "somepassword"
>   server-host = "http://localhost:8153/";
>   api-server-host = "http://localhost:8153/";
>   webhookUrl = "https://hooks.slack.com/services /... "
>
>   # optional fields
>   channel = "@ankit"
>   slackDisplayName = "gocd-slack-bot"
>   slackUserIconURL = "http://example.com/slack-bot.png";
>   display-console-log-links = true
>   displayMaterialChanges = true
>   process-all-rules = true
> }
>
> All the other plugins are available here (https://www.gocd.org/plugins/). 
> You can try as per your environment.
>
> For the Analytics plugins, it's an enterprise add-on. You can signup for a 
> 30-day free trial here (https://www.gocd.org/analytics/).
>
> On Mon, Mar 4, 2019 at 2:05 PM James Wright <jmswr...@gmail.com 
> <javascript:>> wrote:
>
>> Hello all! I'm new to goCD but have been using cruise control .net for 
>> years and am excited to start leveraging this new tool but I do have some 
>> questions if anyone would care to help me out or point me in the right 
>> direction it would be very much appreciated.
>>
>> First off I am attempting to setup the gocd slack build notifier. I have 
>> setup the slack webhook and have the basic notification working and 
>> outputting to a channel. Now where I am lost is I would like to add the 
>> nice additional data that I see in some of the example screenshots such as 
>> the triggered by, reason, label, console logs, etc. Here is what my 
>> go_notify.conf file currently looks like (obviously with sensitive 
>> information redacted):
>>
>> gocd.slack {
>>   server-host = "gocd server url"
>>   api-server-host = "gocd server url"
>>   webhookUrl = "slack webhook"
>>
>>   # optional fields
>>   display-console-log-links = true
>>   displayMaterialChanges = true
>>   process-all-rules = false
>>   
>>   pipelines = [{
>> name = "gocd-slack-build"
>> stage = "build"
>> group = ".*"
>> state = "failed|passed"
>> webhookUrl = "slack webhook"
>>   },
>>   {
>> name = ".*"
>> stage = ".*"
>> state = "failed"
>>   }]
>>
>> }
>>
>> Does anyone see where I am going wrong as I feel I am missing something 
>> obvious.
>>
>> Finally I was also wondering if anyone had any recommendations on 'must 
>> have/highly recommended' plugins for goCD. Personally I like analytics 
>> plugins but certainly I want to hear anyone's suggestions on any helpful 
>> plugins. Thank you in advance for your time.
>>
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "go-cd" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to go-cd+un...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to go-cd+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to