Ok so I apparently did not have the build notifier plugin installed so that
was a huge issue right there. Now I get the following error:

Notification update failed for plugin: slack.notifier05 Mar, 2019 at
15:49:10 Local Time

Interaction with plugin with id 'slack.notifier' implementing
'notification' extension failed while requesting for 'stage-status'.
Reason: [javax/xml/bind/DatatypeConverter]


and here is the message from the go-server.log


2019-03-05 15:49:10,541 WARN  [184@MessageListener for
PluginNotificationMessageListener] PluginNotificationMessageListener:63 -
Notification update failed for plugin: slack.notifier

java.lang.RuntimeException: Interaction with plugin with id
'slack.notifier' implementing 'notification' extension failed while
requesting for 'stage-status'. Reason: [javax/xml/bind/DatatypeConverter]

at
com.thoughtworks.go.plugin.access.PluginRequestHelper.submitRequest(PluginRequestHelper.java:57)

at
com.thoughtworks.go.plugin.access.notification.NotificationExtension.notify(NotificationExtension.java:91)

at
com.thoughtworks.go.server.messaging.notifications.PluginNotificationMessageListener.onMessage(PluginNotificationMessageListener.java:45)

at
com.thoughtworks.go.server.messaging.notifications.PluginNotificationMessageListener.onMessage(PluginNotificationMessageListener.java:30)

at
com.thoughtworks.go.server.messaging.activemq.JMSMessageListenerAdapter.runImpl(JMSMessageListenerAdapter.java:73)

at
com.thoughtworks.go.server.messaging.activemq.JMSMessageListenerAdapter.run(JMSMessageListenerAdapter.java:53)

at java.base/java.lang.Thread.run(Thread.java:834)

Caused by: java.lang.RuntimeException: javax/xml/bind/DatatypeConverter

at
com.thoughtworks.go.plugin.infra.FelixGoPluginOSGiFramework.executeActionOnTheService(FelixGoPluginOSGiFramework.java:231)

at
com.thoughtworks.go.plugin.infra.FelixGoPluginOSGiFramework.doOn(FelixGoPluginOSGiFramework.java:202)

at
com.thoughtworks.go.plugin.infra.DefaultPluginManager.submitTo(DefaultPluginManager.java:140)

at
com.thoughtworks.go.plugin.access.PluginRequestHelper.submitRequest(PluginRequestHelper.java:48)

... 6 common frames omitted

Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter

at in.ashwanthkumar.gocd.slack.jsonapi.Server.getUrl(Server.java:55)

at
in.ashwanthkumar.gocd.slack.jsonapi.Server.getPipelineHistory(Server.java:71)

at
in.ashwanthkumar.gocd.slack.GoNotificationMessage.fetchRecentPipelineHistory(GoNotificationMessage.java:139)

at
in.ashwanthkumar.gocd.slack.GoNotificationMessage.tryToFixStageResult(GoNotificationMessage.java:178)

at
in.ashwanthkumar.gocd.slack.PipelineListener.notify(PipelineListener.java:20)

at
in.ashwanthkumar.gocd.slack.GoNotificationPlugin.handleStageNotification(GoNotificationPlugin.java:153)

at
in.ashwanthkumar.gocd.slack.GoNotificationPlugin.handle(GoNotificationPlugin.java:93)

at
com.thoughtworks.go.plugin.infra.DefaultPluginManager.lambda$submitTo$0(DefaultPluginManager.java:143)

at
com.thoughtworks.go.plugin.infra.FelixGoPluginOSGiFramework.executeActionOnTheService(FelixGoPluginOSGiFramework.java:225)

... 9 common frames omitted

Caused by: java.lang.ClassNotFoundException:
javax.xml.bind.DatatypeConverter not found by slack.notifier [6]

at
org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1639)

at
org.apache.felix.framework.BundleWiringImpl.access$200(BundleWiringImpl.java:80)

at
org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2053)

at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)

... 18 common frames omitted


On Tue, Mar 5, 2019 at 2:50 PM James Wright <jmswrigh...@gmail.com> wrote:

> 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> 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.
>>> 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.
>

-- 
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