Giter Site home page Giter Site logo

rundeck-slack-plugin's People

Contributors

lusis avatar totallyunknown avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rundeck-slack-plugin's Issues

Setting up through code

hi, I'd love to make it work through code definition, instead of using GUI to set up Slack web hook.
Is it possible?

Problem with SSL

Hi, I get error:
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Also I have installed:

# java -version
java version "1.8.0_201"
Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)
# dpkg -l | grep cert
ii  ca-certificates                     20170717~16.04.2                           all          Common CA certificates
ii  ca-certificates-java                20160321ubuntu1                            all          Common CA certificates (JKS keystore)
ii  ssl-cert                            1.0.37                                     all          simple debconf wrapper for OpenSSL

Can someone tell me what to do?

New Webhook URLs on Slack

Slack has changed Webhooks to a single URL that is pre-configured with the target channel and doesn't use tokens anymore. Therefore, this plugin does not work with newly created Webhooks on Slack. Do you plan on updating it?

notification failed

there was an error sending the message
version: rundeck-3.2.0-20191218.war

[2019-12-28 23:59:47.111] ERROR NotificationService --- [eduler_Worker-1] Error sending notification: Notification{eventTrigger='onstart', type='SlackNotification', content='{"slack_channel":"","webhook_base_url":"https://hooks.slack.com/services/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","webhook_token":""}'}: class java.lang.NullPointerException: null

java.lang.NullPointerException: null
	at com.bitplaces.rundeck.plugins.slack.SlackNotificationPlugin.postNotification(SlackNotificationPlugin.java:120)
	at com.dtolabs.rundeck.plugins.notification.NotificationPlugin$postNotification.call(Unknown Source)
	at rundeck.services.NotificationService.triggerPlugin(NotificationService.groovy:673)
	at sun.reflect.GeneratedMethodAccessor1788.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)
	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
	at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:352)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1034)
	at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:68)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:193)
	at rundeck.services.NotificationService$_triggerJobNotification_closure11.doCall(NotificationService.groovy:505)
	at sun.reflect.GeneratedMethodAccessor1757.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)
	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
	at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:264)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1034)
	at groovy.lang.Closure.call(Closure.java:418)
	at groovy.lang.Closure.call(Closure.java:434)
	at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2125)
	at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2110)
	at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2163)
	at org.codehaus.groovy.runtime.dgm$165.invoke(Unknown Source)
	at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)
	at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)
	at rundeck.services.NotificationService.triggerJobNotification(NotificationService.groovy:215)
	at sun.reflect.GeneratedMethodAccessor1583.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)
	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
	at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:352)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1034)
	at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:68)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:185)
	at rundeck.services.NotificationService$__tt__triggerJobNotification_closure15.doCall(NotificationService.groovy:126)
	at sun.reflect.GeneratedMethodAccessor1582.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)
	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
	at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:264)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1034)
	at groovy.lang.Closure.call(Closure.java:418)
	at groovy.lang.Closure.call(Closure.java:434)
	at grails.gorm.transactions.GrailsTransactionTemplate$2.doInTransaction(GrailsTransactionTemplate.groovy:94)
	at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
	at grails.gorm.transactions.GrailsTransactionTemplate.execute(GrailsTransactionTemplate.groovy:91)
	at org.grails.datastore.gorm.GormStaticApi.withTransaction(GormStaticApi.groovy:1014)
	at org.grails.datastore.gorm.GormStaticApi.withTransaction(GormStaticApi.groovy:966)
	at org.grails.datastore.gorm.GormStaticApi.withNewTransaction(GormStaticApi.groovy:927)
	at org.grails.datastore.gorm.GormEntity$Trait$Helper.withNewTransaction(GormEntity.groovy:952)
	at org.grails.datastore.gorm.GormEntity$Trait$Helper$withNewTransaction$16.call(Unknown Source)
	at rundeck.ScheduledExecution.withNewTransaction(ScheduledExecution.groovy)
	at rundeck.ScheduledExecution$withNewTransaction$24.call(Unknown Source)
	at rundeck.services.NotificationService.$tt__triggerJobNotification(NotificationService.groovy:123)
	at sun.reflect.GeneratedMethodAccessor1581.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)
	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1225)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1034)
	at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:947)
	at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:930)
	at org.codehaus.groovy.runtime.InvokerHelper.invokeMethodSafe(InvokerHelper.java:92)
	at rundeck.services.NotificationService$_triggerJobNotification_closure5.doCall(NotificationService.groovy)
	at sun.reflect.GeneratedMethodAccessor1580.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)
	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
	at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:264)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1034)
	at groovy.lang.Closure.call(Closure.java:418)
	at groovy.lang.Closure.call(Closure.java:434)
	at grails.gorm.transactions.GrailsTransactionTemplate$2.doInTransaction(GrailsTransactionTemplate.groovy:94)
	at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
	at grails.gorm.transactions.GrailsTransactionTemplate.execute(GrailsTransactionTemplate.groovy:91)
	at rundeck.services.NotificationService.triggerJobNotification(NotificationService.groovy)
	at rundeck.services.NotificationService$triggerJobNotification$0.call(Unknown Source)
	at rundeck.services.ExecutionService.$tt__executeAsyncBegin(ExecutionService.groovy:1152)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)
	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1225)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1034)
	at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:947)
	at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:930)
	at org.codehaus.groovy.runtime.InvokerHelper.invokeMethodSafe(InvokerHelper.java:92)
	at rundeck.services.ExecutionService$_executeAsyncBegin_closure20.doCall(ExecutionService.groovy)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)
	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
	at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:264)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1034)
	at groovy.lang.Closure.call(Closure.java:418)
	at groovy.lang.Closure.call(Closure.java:434)
	at grails.gorm.transactions.GrailsTransactionTemplate$2.doInTransaction(GrailsTransactionTemplate.groovy:94)
	at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
	at grails.gorm.transactions.GrailsTransactionTemplate.execute(GrailsTransactionTemplate.groovy:91)
	at rundeck.services.ExecutionService.executeAsyncBegin(ExecutionService.groovy)
	at rundeck.services.ExecutionService.executeAsyncBegin(ExecutionService.groovy)
	at rundeck.services.ExecutionService$executeAsyncBegin$23.call(Unknown Source)
	at rundeck.quartzjobs.ExecutionJob.executeCommand(ExecutionJob.groovy:364)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrap.invoke(PogoMetaMethodSite.java:190)
	at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:59)
	at rundeck.quartzjobs.ExecutionJob.execute_internal(ExecutionJob.groovy:158)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)
	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
	at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:352)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1034)
	at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:68)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:169)
	at rundeck.quartzjobs.ExecutionJob$_execute_closure1.doCall(ExecutionJob.groovy:98)
	at rundeck.quartzjobs.ExecutionJob$_execute_closure1.doCall(ExecutionJob.groovy)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)
	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
	at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:264)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1034)
	at groovy.lang.Closure.call(Closure.java:418)
	at groovy.lang.Closure.call(Closure.java:412)
	at com.codahale.metrics.Timer.time(Timer.java:99)
	at com.codahale.metrics.Timer$time$0.call(Unknown Source)
	at rundeck.quartzjobs.ExecutionJob.execute(ExecutionJob.groovy:97)
	at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)

The 'Options' field is not properly escaped, fails when " some_key_without_value: " is present

It seems, that when in the templates/slack-message.ftl the value ${executionData.argstring} is a
{ 'key': value, 'key2': value, "some_key_without_value": }

Options: app: promo system_version_file: stg_default version_in_system_version_file: version_unknown diff: --diff dont_enable_after_deploy: false dry_run: disable_nagios_probe: True version_override: 0.9.926 verbose: -v

a dry_run: is not empty, it contains ' ' whitespace :) yet it should be escaped...

The slack reject the output.
Is this a Slack issue, or a rundeck-slack plugin escaping issue?


2017-04-13 09:02:11,316 [quartzScheduler_Worker-7] ERROR grails.app.services.rundeck.services.NotificationService - Error sending notification: Notification{eventTrigger='onstart', type='SlackNotification', content='{"username":"Rundeck","external_template":"slack-message.ftl","room":"#rundeck","teamDomain":"x","apiAuthToken":"y","icon_url":""}'}: class com.bitplaces.rundeck.plugins.slack.SlackNotificationPluginException: Unknown status returned from Slack API: [invalid_payload].
com.bitplaces.rundeck.plugins.slack.SlackNotificationPluginException: Unknown status returned from Slack API: [invalid_payload].
        at com.bitplaces.rundeck.plugins.slack.SlackNotificationPlugin.postNotification(SlackNotificationPlugin.java:179)
        at rundeck.services.NotificationService.triggerPlugin(NotificationService.groovy:490)
        at rundeck.services.NotificationService$_triggerJobNotification_closure5.doCall(NotificationService.groovy:352)
        at rundeck.services.NotificationService.triggerJobNotification(NotificationService.groovy:147)
        at rundeck.services.NotificationService$_triggerJobNotification_closure1.doCall(NotificationService.groovy:89)
        at rundeck.services.NotificationService.triggerJobNotification(NotificationService.groovy:86)
        at rundeck.services.ExecutionService.executeAsyncBegin(ExecutionService.groovy:959)
        at rundeck.quartzjobs.ExecutionJob.executeCommand(ExecutionJob.groovy:325)
        at rundeck.quartzjobs.ExecutionJob.execute_internal(ExecutionJob.groovy:143)
        at rundeck.quartzjobs.ExecutionJob$_execute_closure1.doCall(ExecutionJob.groovy:91)
        at com.codahale.metrics.Timer.time(Timer.java:99)
        at rundeck.quartzjobs.ExecutionJob.execute(ExecutionJob.groovy:90)
        at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
        at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)

Unknown status returned from Slack API: [Payload was not valid JSON].

This plugin seemed to work for a while but it now notifications always trigger this error:

[quartzScheduler_Worker-1] ERROR grails.app.services.rundeck.services.NotificationService - Error sending notification: Notification{eventTrigger='onsuccess', type='SlackNotification', content='{"external_template":"","username":"","apiAuthToken":"XXXXXXX","icon_url":"","teamDomain":"my_team","room":""}'}: class com.bitplaces.rundeck.plugins.slack.SlackNotificationPluginException: Unknown status returned from Slack API: [Payload was not valid JSON].

It appears to be valid JSON. I'm not sure if its something I've done or if Slack is.

Problems to send notifications

was working before now, just to let you know I using behind nescaler proxy and the root certificate is on the linux machine i can browse without issues but the slack plugin just stop working

2019-05-31 12:57:07.232 ERROR --- [eduler_Worker-5] rundeck.services.NotificationService : Error sending notification: Notification{eventTrigger='onstart', type='SlackNotification', content='{"room":"#it-ops","external_template":"","teamDomain":"quantium","apiAuthToken":"T0DAHDRRC/BJESJPJBC/q0gF77k66L6CqjpucjaBojtj","icon_url":"","username":""}'}: class com.bitplaces.rundeck.plugins.slack.SlackNotificationPluginException: Error putting data to Slack URL: [sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target].

com.bitplaces.rundeck.plugins.slack.SlackNotificationPluginException: Error putting data to Slack URL: [sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target].

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.