Giter Site home page Giter Site logo

jenkinsci / hipchat-plugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jlewallen/jenkins-hipchat-plugin

54.0 105.0 85.0 344 KB

HipChat notification plugin for Jenkins

Home Page: https://plugins.jenkins.io/hipchat/

Java 94.21% HTML 5.79%

hipchat-plugin's Introduction

HipChat plugin for Jenkins

A Jenkins plugin that sends notifications to HipChat chat rooms for build events.

Features

  • Supports both v1 and v2 API (v1 API support to be removed in next major version)
  • Can send notifications for the following build statuses
  • Build Started
  • Build Aborted
  • Build Failed
  • Not Built (e.g. when an earlier stage prevented a multi-stage build to finish)
  • Build Successful
  • Build Unstable (e.g. tests failed, but compilation was successful)
  • Back To Normal (e.g. when the current build was successful, but the previous wasn't for some reason)
  • The room name can be parameterized
  • Supports different notification modes for matrix builds
  • Can be used from pipeline builds to send notifications
  • Supports HipChat card notifications

Configuration

The plugin allows two levels of configuration, each explained in the below sections. The assumption should be that if a project level setting can not be found, the plugin will fall back to the global configuration.

Global configuration

These settings can be found under Manage Jenkins -> Configure System and look for Global HipChat Notifier Settings. The settings listed here are:

  • HipChat Server Host: The hostname (and optionally the port number) for the HipChat server in use. Note that the server will always be accessed via HTTPS. Defaults to api.hipchat.com for cloud installations. The plugin will only connect to the server using TLS protocol, access via SSL protocol is disabled.
  • Use v2 API: Whether to use HipChat v2 API when interacting with the HipChat server. Note: that support for v1 version of the API is going to be removed in the next major version.
  • Credentials: The 'secret text' kind of credential to be used when accessing HipChat REST endpoints. When using v2 API, the Credentials must be a valid OAuth2 token obtained as described in the v2 API documentation. When v2 API is disabled, the plugin will use v1 API to perform its operations. The v1 API requires API Tokens (which are different from OAuth2 tokens!).
  • Room: Allows to specify the name or ID of the room where the notification(s) should be sent. If the name of the room is not known at the time of the configuration, you can also use build variables (e.g. $HIPCHAT_ROOM). Multiple values can be provided, in which case use comma to separate the values.
  • Send As: Specifies the sender of the notification when using the v1 API. The value must be less than 15 characters long.
  • Card Provider: Here you can select a card provider implementation which is responsible to render a HipChat Card as needed. See below for more information on custom Card providers. Cards are only supported when v2 version of the HipChat API is in use.
  • Default notifications: Configure the default set of notifications. These will be used when there is no notification configured at the job level. Note that the default notifications are only sent if the HipChat Notifications Post Build Action is added to the job (otherwise the plugin won't get invoked).

Job level configuration

To set up the plugin for an individual job, go to the job's configuration page and add the HipChat Notifications post-build action. The settings listed there are:

  • Credentials: Use in case you have a room-specific token to override the globally set Credentials.
  • Project Room: Allows to specify the name or ID of the room where the notification(s) should be sent. If the name of the room is not known at the time of the configuration, you can also use build variables (e.g. $HIPCHAT_ROOM). Multiple values can be provided, in which case use comma to separate the values.
  • Notifications: The list of notifications that should be sent out upon build events. If this setting is left empty, the plugin will fall back to the Default notifications setting in the Global configuration. The settings available for each notification entry:
    • Notify Room: Whether the message should trigger a HipChat notification
    • Text Format: When checked, the message will be sent in text format, instead of the default HTML format. When using text format, emoticons will be properly displayed in messages, but links must be printed in full length.
    • Notification Type: Select which build status/result should trigger this notification.
    • Color: Select the color of the notification message.
    • Card Icon: The icon URL to use when using card notifications.
    • Message template: The specific message template to use for this notification
  • Message templates: These templates are used as default values when the notification-specific message template is not defined.
    • Job started: The message to use when the build starts.
    • Job completed: The message to use when the build completes regardless of the build result.

Message template format

The message templates used by the plugin now fully support token-macro tokens, for a comprehensive list of the available tokens, please check out the help texts for the message template settings.

In addition to the out of the box supported tokens from the token-macro-plugin, the plugin can also utilize various other tokens provided by other plugins. Having the email-ext-plugin installed on Jenkins will make the following (non-comprehensive list of) tokens available for example:

  • TRIGGER_NAME
  • TEST_COUNTS
  • FAILED_TESTS

If you find that one of the above listed tokens do not work with the plugin, you should probably check first whether the email-ext-plugin is installed on your Jenkins instance. The same rule applies for other third party token provider plugins.

The HipChat plugin also provides the following token implementations:

Token name Content Example value
BLUE_OCEAN_URL Blue Ocean UI friendly link to the currently built job http://localhost:8080/jenkins/job/foobar/1/display/redirect
BUILD_DESCRIPTION The description of the current build Example build description
BUILD_DURATION The duration of the build in human readable format 42 min
COMMIT_MESSAGE The first line of the last changeset's commit message Initial commit
HIPCHAT_CHANGES Human readable details of the new changesets or "No changes" if changesets weren't computed for this build Started by changes from bjensen (1 file(s) changed)
HIPCHAT_CHANGES_OR_CAUSE Returns HIPCHAT_CHANGES if it was successfully calculated, otherwise returns the cause of the build Started by user Admin
TEST_REPORT_URL Direct link to the test reports http://localhost:8080/jenkins/job/foobar/1/testReport

Proxy support

The plugin utilizes the proxy configuration in Jenkins when making external HTTPS connections. To configure proxy in Jenkins, follow the Jenkins documentation.

The currently supported features are:

  • authenticated proxies
  • "No Proxy Host" setting

Pipeline support

When using pipeline projects, HipChat messages can be sent using the following DSL:

hipchatSend color: 'YELLOW', credentialId: 'myid', failOnError: true, message: 'test', notify: true, room: 'Jenkins', sendAs: 'Jenkins', server: 'api.hipchat.com', textFormat: true, v2enabled: true

Note that the following parameters for the hipchatSend step are planned to be deprecated in the next major version:

  • sendAs
  • server
  • token
  • v2enabled

Support for custom Card Providers

HipChat supports various kinds of cards for its notifications, as such the card implementation in the Jenkins HipChat plugin has been done in a pluggable manner. In case the out of the box available card implementations do not fit your needs, the following extension will need to be written:

@Extension
public class MyCoolCardProvider extends CardProvider {

    private static final Logger LOGGER = Logger.getLogger(MyCoolCardProvider.class.getName());

    @Override
    public Card getCard(Run<?, ?> run, TaskListener taskListener, Icon icon, String message) {
        // implement magic
    }

    @Override
    public CardProviderDescriptor getDescriptor() {
        return new DescriptorImpl();
    }

    @Extension
    public static class DescriptorImpl extends CardProviderDescriptor {

        @Override
        public String getDisplayName() {
            return "My cool card provider";
        }
    }
}

The return value type Card represents a HipChat card and exposes all of its available properties as it is defined in the HipChat API documentation.

The idea behind the extensible approach is that lots of different card implementations can be made available. If you do end up writing a custom CardProvider, please open a pull request, so that others can benefit from it too. Having these custom implementations contributed should also ensure (to a reasonable degree) that future API changes will be reflected on these implementations as the changes are being made.

hipchat-plugin's People

Contributors

aldaris avatar ben-gineer avatar daniel-beck avatar darrinholst avatar i386 avatar iristyle avatar jessedearing avatar jglick avatar jlewallen avatar kellybyrd avatar kmadel avatar mfriedenhagen-ui avatar ndeloof avatar olivergondza avatar peterlynch avatar phil-schneider avatar pierrefritsch avatar retoo avatar rocketraman avatar takai avatar thatguy1177 avatar toneill818 avatar vkotovv avatar vlatombe 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  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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hipchat-plugin's Issues

Improve notification messages for build errors

It would be great if the plugin could analyze the build logs upon build failure and attempt to send a notification to the HipChat room including a snippet of the relevant-looking log snippet.

Add support for comments file display from Github Pull Request plugin

Hi
Thanks for the great plugin

A Little suggestion
Message, posted by the plugin is not so informative and leads to jenkins UI console which is not convenient for everyday usage.
When there is a workflow based on GitHub pull request plugin, every job has it's own commentinfo file (Text file), which contains links to usefull resources for review before merging. That file automatically attached to github comment after build. It would be nice to get this text into message for Hipchat too.

Instruction for setting up

I am trying to set up this plugin (version 0.2.0) for my Jenkins server to post notification to a HipChat room.

I've added the Hipchat room token and the room name, but it isn't working.

Could someone provide more detailed instruction on how to set up this plugin?

Notifications not working with build-flow-plugin

Hey,

Not sure if this is an issue with the hipchat-plugin or the build-flow-plugin, but I'm able to get notifications to work for build-flow jobs.

I've added the config for hipchat-plugin into Jenkins' "Configure System" and hit "Test configuration", and everything works.

I've added the post build notification to one of our "normal" jobs and it's working as expected. I've then added it to one of our build-flow-plugin jobs, which the vast majority of our jobs are, and they're not working.

I've tried multiple permutations with the settings, and nothing is working. Everything else does.

Any ideas?

Jenkins Version: 1.612
hipchat Version: 0.1.9
build-flow-plugin Version: 0.17

Issue with Build FLow Plugin

We had defined build flow as below:

*parallel (
{
build("pkr-ctr" , Variant:params.Variant)
build("pkr-blg" , Variant:params.Variant)
build("pkr-rtg" , Variant:params.Variant)
},
{build("pkr-jcc" , Variant:params.Variant)},
{build("pkr-fln" , Variant:params.Variant , Environment:params.Environment)},
{build("pkr-rts" , Variant:params.Variant)},
{build("pkr-UI-rts" , Variant:params.Variant)},
{build("pkr-JRules" , Variant:params.Variant)},
{build("ABCD" , Variant:params.Variant)}
)
build("pkr-UI" , Variant:params.Variant , Environment:params.Environment)
*

We ran pkr_all_jobs.. though all the jobs were completed successfully, it still failed. please find below output:

**Result:

Started by user xxxxx
Building on master in workspace /opt/mdp/data/jenkins-d/workspace/vphad_test/DSL_plugin_test/pkr-All-Projects
parallel {
Schedule job vphad_test ยป DSL_plugin_test ยป pkr-ctr
Schedule job vphad_test ยป DSL_plugin_test ยป pkr-UI-rts
Schedule job vphad_test ยป DSL_plugin_test ยป pkr-fln-pkr-sync-batch
Schedule job vphad_test ยป DSL_plugin_test ยป pkr-jcc
Schedule job vphad_test ยป DSL_plugin_test ยป pkr-fln
Build vphad_test ยป DSL_plugin_test ยป pkr-ctr #4 started
vphad_test ยป DSL_plugin_test ยป pkr-ctr #4 completed
Schedule job vphad_test ยป DSL_plugin_test ยป pkr-blg
Build vphad_test ยป DSL_plugin_test ยป pkr-UI-rts #4 started
Build vphad_test ยป DSL_plugin_test ยป pkr-fln-pkr-sync-batch #4 started
vphad_test ยป DSL_plugin_test ยป pkr-fln-pkr-sync-batch #4 completed
Build vphad_test ยป DSL_plugin_test ยป pkr-fln #4 started
vphad_test ยป DSL_plugin_test ยป pkr-UI-rts #4 completed
Build vphad_test ยป DSL_plugin_test ยป pkr-jcc #4 started
vphad_test ยป DSL_plugin_test ยป pkr-jcc #4 completed
vphad_test ยป DSL_plugin_test ยป pkr-fln #4 completed
Build vphad_test ยป DSL_plugin_test ยป pkr-blg #4 started
vphad_test ยป DSL_plugin_test ยป pkr-blg #4 completed
Schedule job vphad_test ยป DSL_plugin_test ยป pkr-rtg
Build vphad_test ยป DSL_plugin_test ยป pkr-rtg #4 started
vphad_test ยป DSL_plugin_test ยป pkr-rtg #4 completed
}
Finished: FAILURE
**

On analysis we found that " pkr-JRules " was not triggered because there was "space bar" in the actual job name "" pkr JRules " where as in build flow it was defined as " pkr-JRules ".

Main problem: In the console output it is not showing the actual error
Please suggest.

Silence from Hipchat plugin on likely failures

Hello, I just ran into an issue where I configured the Hipchat plugin on Jenkins and things were silently failing. I didn't know if the plugin was working or not, but eventually I hooked up verbose logging and discovered that the user I was sending as was more than 15 characters.

My request is to output likely failure messages to the build log.

When using the '$CHANGES' variable but there are no changes use a placeholder.

While using the plugin, I noticed that if I have my message formatted as such $GIT_COMMIT is now live: $CHANGES but the job was started by hand, or via another job, and there were no changes. The string '$CHANGES' is left in the message. I'd like to suggest that in lieu of this behavior, something like 'No changes' is used.

Failure to contact hipchat shouldn't cause build to fail

At the very least, there should be an option as to whether failure to contact hipchat will cause the build to fail.

We're currently having issues with accessing anything outside our network. This prevents Jenkins from being able to send notifications to hipchat (which we aren't able to sign onto anyway) and then the build fails. This isn't a valid reason to fail the build.

In order to work around this, I'd have to go and update my build configurations to NOT notify hipchat, and then go and change them back AFTER our network issues are resolved.

FATAL: Error posting to HipChat
java.lang.RuntimeException: Error posting to HipChat
at jenkins.plugins.hipchat.StandardHipChatService.publish(StandardHipChatService.java:48)
at jenkins.plugins.hipchat.ActiveNotifier.notifyStart(ActiveNotifier.java:57)
at jenkins.plugins.hipchat.ActiveNotifier.started(ActiveNotifier.java:49)
at jenkins.plugins.hipchat.HipChatNotifier$HipChatJobProperty.prebuild(HipChatNotifier.java:166)
at hudson.model.AbstractBuild$AbstractBuildExecution.preBuild(AbstractBuild.java:804)

Support Hipchat v2

Right now your plugin only supports API Version 1. Would be great if you provide support for API Version 2.

Not functioning with v1 or v2 API tokens

HipChat post may have failed. Response: {"error":{"code":401,"type":"Unauthorized","message":"Auth token invalid. Please see: https:\/\/www.hipchat.com\/docs\/api\/auth"}}

is all I get, regardless of v1 or v2.

Even if I create a v1 token with admin permissions rather than notify, I still get the above response

This is with 0.1.8 available through Jenkins

ability to set "Trigger for matrix projects" global default

Multi-cofiguration job types have a additional "Trigger for matrix projects" configuration parameter not present in freestyle jobs. This parameter is not exposed in the global plugin configuration and has to be set on a per job basis. It would be very convenient to be able to set a global default for this value.

Stop copying Global System parameters into job/config.xml

It appears that the plugin is copying the global settings for server and token into each job/config.xml. This has two separate issues:

  1. Changing global system settings doesn't "fix" things until every job is re-saved. And things are broken until that step is performed.
  2. It's possibly leaking sensitive information. All a user needs to have access to is to be able to create and manage job configs. Normally there's no way to set HipChat connection information in the Job Configuration page, but because of this bug they might be able to see something they shouldn't.

room setting and notification selection should be per post-build task, not per build

Right now there's a HipChat configuration setting in each build, where you specify the room (to override the default) and which notifications to send, regardless of whether the HipChat post-build action is enabled for the build.

This configuration should be per-post-build-action, not per-build, for two reasons:

  1. It is quite misleading to have that configuration at the top of the build configuration page when it doesn't actually do anything unless there is a HipChat post-build action configured for the build.
  2. Putting the config per-action rather than per-build would allow different types of notifications to be sent to different rooms.

Variable resolution problem with variables from properties file

I have a build step like following:

  1. Execute shell step - that does some stuff and creates a properties file with variable (custom build number, e.g. VERSION=1.2.3-env-snapshot)
  2. Inject environment variables step - that reads this file and expose variable for the build itself

When I use variable from a properties file to set custom build name - it works fine, I see custom version name of the build. But when I use this variable in hipchat notification in post-build actions, I see the old value of parameter VERSION that was passed to the build, instead of new one, calculated and exposed by build steps.

I guess that variable resolution maybe done too early or sth.

Different rooms per notification

Hi,

currently we can only set a room per project (or globally) but we'd like to show failure messages only in a devs only room while a successful build is supposed to go to another room where our testers are chatting.
So it would be great if one could specify/override the target room for each notification individually.

Regards,
Chris

Changes variable

Please allow to use $CHANGES variable with extended format (as email-ext plugin do), for example:

${CHANGES, showPaths=true, format="
[ %a ] %m", pathFormat="- %p"}

Now only $CHANGES can be parsed, but I want to publish changelog for each release.
Or maybe there is another option to post changelog in hipchat?

There should be default notification selections

I shouldn't have to specify separately in every single build job which HipChat notifications I want. Just like there is a default room specifier and a default API key specifier configuration, there should also be a default selection of which notifications to send.

v2 api not working

i get the error:

WARNING: HipChat post may have failed. ResponseCode: 401, Response: {
  "error": {
    "code": 401,
    "message": "Invalid OAuth session",
    "type": "Unauthorized"
  }
}

v1 is working without troubles. Do I have to configure a different token?

Exception after upgrade to 1.0.0

I upgraded from version 0.1.9 to latest 1.0.0 and stuff stopped working :/
I can send a test notification from the Jenkins settings menu but my jobs fail with the following stack trace

FATAL: hudson/tasks/test/AbstractTestResultAction
java.lang.NoClassDefFoundError: hudson/tasks/test/AbstractTestResultAction
    at jenkins.plugins.hipchat.utils.BuildUtils.getTestData(BuildUtils.java:118)
    at jenkins.plugins.hipchat.utils.BuildUtils.collectParametersFor(BuildUtils.java:49)
    at jenkins.plugins.hipchat.model.NotificationType.getMessage(NotificationType.java:89)
    at jenkins.plugins.hipchat.model.NotificationType.getMessage(NotificationType.java:84)
    at jenkins.plugins.hipchat.HipChatNotifier.publishNotificationIfEnabled(HipChatNotifier.java:257)
    at jenkins.plugins.hipchat.HipChatNotifier.prebuild(HipChatNotifier.java:216)
    at hudson.model.AbstractBuild$AbstractBuildExecution.preBuild(AbstractBuild.java:840)
    at hudson.model.AbstractBuild$AbstractBuildExecution.preBuild(AbstractBuild.java:835)
    at hudson.model.Build$BuildExecution.doRun(Build.java:144)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:537)
    at hudson.model.Run.execute(Run.java:1741)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:98)
    at hudson.model.Executor.run(Executor.java:408)

My Jenkins version: 1.625.3

Hipchat plugin does not allow to use build parameters

The plugin does not allow to use build parameters values.

I want to notify different Hipchat rooms depending on a parameter I pass to a jenkins job.

I set the value of the parameter when calling the job. In the Jenkins job config:

  • Checkbox: "This build is parameterized" is checked,
    • Text parameter "HIPCHATROOM" added, with value 1332745,
    • In "Hipchat Noficiations", "Project room" is set to ${HIPCHATROOM}

There is no Hipchat notifications when the build starts/fails/suceeds/etc.

Note: I DO get a notification if "Project room" is set to 1332745 in "In Hipchat Noficiations".

This is with version 0.1.9 of the plugin. (Jenkins ver. 1.599)
That version included #29, which has the Hipchat config BELOW/AFTER the Build parameters config. 0.1.8 did not work either).

Be able to customise the HipChat notification message at the job level

This plugin is very helpful to notify our developers and QAs.
To improve the notification, we would like to be able to customise the HipChat notification message at the job level.
With this custom message, we could be able to use some Jenkins or Maven properties: https://blog.codecentric.de/en/2014/07/accessing-maven-project-properties-jenkins-build-jobs/
If a custom message is set at the job level, the plugin should use it.
Otherwise, the plugin should use the default message (like today).
Thanks to the hipchat-plugin team :)

Work to change from using HipChatListener to HipChatNotifier#perform has introduced UnsupportedOperationException bug

We've noticed that the following commit: a9782d4 appears to result in failures with the following error message:

13:38:10 ERROR: Publisher jenkins.plugins.hipchat.HipChatNotifier aborted due to exception
13:38:10 java.lang.UnsupportedOperationException
13:38:10    at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:95)
13:38:10    at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:59)
13:38:10    at jenkins.plugins.hipchat.HipChatNotifier.perform(HipChatNotifier.java:173)
13:38:10    at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
13:38:10    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:785)
13:38:10    at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:757)
13:38:10    at hudson.model.Build$BuildExecution.cleanUp(Build.java:192)
13:38:10    at hudson.model.Run.execute(Run.java:1723)
13:38:10    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
13:38:10    at hudson.model.ResourceController.execute(ResourceController.java:88)
13:38:10    at hudson.model.Executor.run(Executor.java:231)

Some variables are not available to HipChat

Some variables do not seem to be available to the HipChat plugin. The GitHub Pull Request Builder plugin exports several variables that can be very helpful, like ghprbPullId, and ghprbPullLink. I cannot seem to get these variables to work in the HipChat status messages.

I'd like this to work. Most of these variables are there, but the $ghprb* ones are not.
$JOB_NAME #$BUILD_NUMBER of PR #$ghprbPullId $STATUS by $ghprbActualCommitAuthor.

https://wiki.jenkins-ci.org/display/JENKINS/GitHub+pull+request+builder+plugin

Allow to select message format

Currently messages are strictly sent in html format. However, the disadvantage of this is that html messages lose special hipchat features (like notifications). Having a select box for the format would be immensely useful.

ssl errors

since a few days we are getting the error below in our jenkins log and no more messages are going to hipchat:

We run centos 6.x with Jenkins 1.593
openjdk version "1.8.0_25"
OpenJDK Runtime Environment (build 1.8.0_25-b17)
OpenJDK 64-Bit Server VM (build 25.20-b23, mixed mode)

Any ideas on how to fix this? We've updated jenkins and all plugins to their latest versions.

Dec 11, 2014 6:48:53 PM jenkins.plugins.hipchat.StandardHipChatService publish
WARNING: Error posting to HipChat
javax.net.ssl.SSLException: java.lang.RuntimeException: java.security.NoSuchAlgorithmException: EC AlgorithmParameters not available
at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1917)
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1874)
at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1857)
at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1783)
at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:128)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:506)
at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)
at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
at jenkins.plugins.hipchat.StandardHipChatService.publish(StandardHipChatService.java:50)
at jenkins.plugins.hipchat.ActiveNotifier.notifyStart(ActiveNotifier.java:53)
at jenkins.plugins.hipchat.ActiveNotifier.started(ActiveNotifier.java:46)
at jenkins.plugins.hipchat.HipChatNotifier$HipChatJobProperty.prebuild(HipChatNotifier.java:203)
at hudson.model.AbstractBuild$AbstractBuildExecution.preBuild(AbstractBuild.java:804)
at hudson.model.AbstractBuild$AbstractBuildExecution.preBuild(AbstractBuild.java:799)
at hudson.model.AbstractBuild$AbstractBuildExecution.preBuild(AbstractBuild.java:795)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:530)
at hudson.model.Run.execute(Run.java:1759)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:89)
at hudson.model.Executor.run(Executor.java:240)
Caused by: java.lang.RuntimeException: java.security.NoSuchAlgorithmException: EC AlgorithmParameters not available
at sun.security.util.ECUtil.getECParameters(ECUtil.java:141)
at sun.security.util.ECUtil.getECParameterSpec(ECUtil.java:190)
at sun.security.ssl.JsseJce.getECParameterSpec(JsseJce.java:385)
at sun.security.ssl.HandshakeMessage$ECDH_ServerKeyExchange.(HandshakeMessage.java:1060)
at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:277)
at sun.security.ssl.Handshaker.processLoop(Handshaker.java:936)
at sun.security.ssl.Handshaker.process_record(Handshaker.java:871)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1043)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1343)
at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:728)
at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:123)
... 21 more
Caused by: java.security.NoSuchAlgorithmException: EC AlgorithmParameters not available
at sun.security.jca.GetInstance.getInstance(GetInstance.java:159)
at java.security.Security.getImpl(Security.java:695)
at java.security.AlgorithmParameters.getInstance(AlgorithmParameters.java:146)
at sun.security.util.ECUtil.getECParameters(ECUtil.java:139)
... 31 more

Default notification always added to UI when using global config with promoted builds

I recently upgraded to the hipchat plugin 1.0.0, and started using the "global configuration" option instead of job-specific settings. We like to have notifications on the job builds, as well as our promotion processes (via the Promoted Builds plugin).

When adding the hipchat notifications as a build action to a promotion process, and leaving the defaults intact (no notifications defines), everything works as expected (global notifications are inherited, and notify correctly on promotions).

However, upon reloading the configuration page for the job, a new notification is added for the "Started" process:

screen shot 2016-03-29 at 4 07 35 pm

This requires the user to remember to delete this job-specific notification every time they edit the configuration, or else it will only have the single notification set, and no longer use the global configurations.

This behavior doesn't happen on the main job configuration; it only seems to occur in the promotion configuration.

Custom message per build status

I'd like the ability to send a custom message per build status. Specifically, I'd like to use Hipchat icons to the status message. Something like (greenbeer) for green, (poop) for red, and (facepalm) for yellow. There is no post-build shell step, or I could inject an environment variable and do the icon based on that. But I think it would be better if I could just set custom notifications instead of just one for start and one for end.

HipChatNotifier.DescriptorImpl methods give "No signature of method" when using in groovy

We are running this init.groovy script on Jenkins master which has this Hipchat plugin installed. It runs when launching Jenkins master to set some default settings, but it doesn't seem to work.

Hipchat Plugin
curl -sSL -O https://updates.jenkins-ci.org/download/plugins/hipchat/0.1.8/hipchat.hpi

Jenkins version: 1.565.3

import jenkins.model.*;
import net.sf.json.*;
import org.kohsuke.stapler.*;

if ( Jenkins.instance.pluginManager.activePlugins.find { it.shortName == "hipchat" } != null ) {
  println "--> setting hipchat plugins settings"

  def descriptor = Jenkins.instance.getDescriptorByType(jenkins.plugins.hipchat.HipChatNotifier.DescriptorImpl.class)  
  descriptor.setServer("hipchat.corp.mydomain.com")
  descriptor.setToken("b9ce62c4551508085c9065771fb07c")
  descriptor.setSendAs("jenkinsbot")
}
--> setting hipchat plugins settings
groovy.lang.MissingMethodException: No signature of method: jenkins.plugins.hipchat.HipChatNotifier$DescriptorImpl.setServer() is applicable for argument types: (java.lang.String) values: [hipchat.corp.lookout.com]
Possible solutions: getServer()
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:55)
    at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:46)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
    at Script1.run(Script1.groovy:9)
    at groovy.lang.GroovyShell.evaluate(GroovyShell.java:580)
    at groovy.lang.GroovyShell.evaluate(GroovyShell.java:618)
    at groovy.lang.GroovyShell.evaluate(GroovyShell.java:589)
    at hudson.util.RemotingDiagnostics$Script.call(RemotingDiagnostics.java:139)
    at hudson.util.RemotingDiagnostics$Script.call(RemotingDiagnostics.java:111)
    at hudson.remoting.LocalChannel.call(LocalChannel.java:45)
    at hudson.util.RemotingDiagnostics.executeGroovy(RemotingDiagnostics.java:108)
    at jenkins.model.Jenkins._doScript(Jenkins.java:3449)
    at jenkins.model.Jenkins.doScript(Jenkins.java:3426)
    at sun.reflect.GeneratedMethodAccessor217.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298)
    at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161)
    at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:96)
    at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:120)
    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:733)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:863)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:636)
    at org.kohsuke.stapler.Stapler.service(Stapler.java:225)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494)
    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:96)
    at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:88)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
    at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:85)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
    at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:174)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at jenkins.security.ApiTokenFilter.doFilter(ApiTokenFilter.java:74)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
    at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
    at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
    at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:46)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
    at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1474)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:533)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
    at org.eclipse.jetty.server.Server.handle(Server.java:370)
    at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
    at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:960)
    at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1021)
    at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
    at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
    at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
    at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)

Silently fails on untrusted certificate

When trying version 1.8 on Jenkins 1.577, the plugin fails silently when it can't verify the SSL certificate of the on-premises private HipChat server.

I think that the issue is that our HipChat server uses a wildcard certificate - e.g. *.company.com, which is properly signed by a certificate authority but many years ago I learned that Java doesn't support them properly.

It would be useful to have the plugin more verbose about why it failed, or even better - make it possible to trigger a test request.

Please add global message templates.

We can now specify a message template per project but can you add the ability to customize the default global message so we don't need to update every project?

v2 notification doesn't work

any idea what the problem could be? It happpens in the 'test notification' configuration.

Feb 23, 2015 2:03:24 PM jenkins.plugins.hipchat.impl.HipChatV2Service publish
WARNING: HipChat post may have failed. ResponseCode: 400, Response: {
  "error": {
    "code": 400,
    "expected_type": "boolean",
    "field": "notify",
    "message": "Value u'true' for field 'notify' is not of type 'boolean'",
    "type": "Bad Request",
    "validation": "type",
    "value": "true"
  }
}

"Build successful" not enabled using Job DSL plugin

I'm using the Jobs DSL plugin ([https://wiki.jenkins-ci.org/display/JENKINS/Job+DSL+Plugin]) to generate many other jobs of ours. Following the documentation of that plugin ([https://jenkinsci.github.io/job-dsl-plugin/#method/javaposse.jobdsl.dsl.helpers.publisher.PublisherContext.hipChat]) I want HipChat notifications enabled for successful, failed, and aborted builds. The latter two options are added and enabled, but the "successful" notification is added, but not enabled. I attached images from the config pages for both jobs (the generator and the generated). I haven't noticed anything in the logs that would indicated an issue, but I could've missed something.

screen shot 2016-01-15 at 2 10 36 pm

screen shot 2016-01-15 at 2 11 35 pm

Please release a new version

Deploying the latest version (master) on our jenkins enabled us to get the plugin working. Can you please make a new release?

Build completed message only after failure

Hi would it be possible to have a checkbox for build completed notifications but only after build has failed. Because build completed is not very important to us, except when the build has failed.

Test Configuration shows "Test Notification Sent" even when it fails

Upon initially setting up the HipChat plugin's global settings from the system properties, I was rather confused by the fact that it was telling me "Test Notification Sent" when I clicked the Test Configuration button because I did not receive any message on my HipChat room. After trying many different things, I found the below stacktrace in the log that explained why.

It turns out due to not setting the proxy settings for the plugin manager was causing it to not be able to communicate with api.hipchat.com, which was my mistake. But it should have been reporting the failure to send the message in the first place and I would have checked the logs much sooner.

Jun 12, 2015 3:23:24 PM INFO jenkins.plugins.hipchat.impl.HipChatV1Service publish
Posting: Travel Jenkins to 1617522: Test Notification 11 yellow
Jun 12, 2015 3:23:34 PM WARNING jenkins.plugins.hipchat.impl.HipChatV1Service publish
Error posting to HipChat
org.apache.commons.httpclient.ConnectTimeoutException: The host did not accept the connection within timeout of 10000 ms
    at org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSocket(ReflectionSocketFactory.java:155)
    at hudson.util.NoClientBindSSLProtocolSocketFactory.createSocket(NoClientBindSSLProtocolSocketFactory.java:120)
    at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
    at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
    at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
    at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
    at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
    at jenkins.plugins.hipchat.impl.HipChatV1Service.publish(HipChatV1Service.java:49)
    at jenkins.plugins.hipchat.impl.HipChatV1Service.publish(HipChatV1Service.java:30)
    at jenkins.plugins.hipchat.HipChatNotifier$DescriptorImpl.doSendTestNotification(HipChatNotifier.java:333)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298)
    at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161)
    at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:96)
    at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:121)
    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:745)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:875)
    at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:249)
    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:745)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:875)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:648)
    at org.kohsuke.stapler.Stapler.service(Stapler.java:237)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:96)
    at com.smartcodeltd.jenkinsci.plugin.assetbundler.filters.LessCSS.doFilter(LessCSS.java:46)
    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:99)
    at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:88)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
    at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:86)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
    at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
    at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:46)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:612)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
    at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:190)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:744)
Caused by: java.net.SocketTimeoutException: connect timed out
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    at java.net.Socket.connect(Socket.java:579)
    at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:618)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSocket(ReflectionSocketFactory.java:140)
    ... 85 more

retry message delivery failures

Occasionally, I have observed a notification storm to cause notification to be dropped on the HC end due to rate limiting.

It shows up in the jenkins log as:

HipChat post may have failed. ResponseCode: 403, Response: {"error":{"code":403,"type":"Forbidden","message":"You have exceeded the rate limit. See https:\/\/www.hipchat.com\/docs\/api\/rate_limiting"}}

It would nice to be able to [optionally] queue and retry messages rejected with this HTTP error status.

v2 API help message is incorrect

<f:entry title="${%HipChat Server}" help="/plugin/hipchat/help-globalConfig-hipChatServer.html">
<f:textbox name="hipchat.server" default="api.hipchat.com" value="${descriptor.server}" />
</f:entry>
<f:entry title="${%Use v2 API}" help="/plugin/hipchat/help-globalConfig-hipChatServer.html">
<f:checkbox name="hipchat.v2Enabled" checked="${descriptor.v2Enabled}"/>
</f:entry>

Both entries share the same help message, which is probably not what we want

screen shot 2015-03-13 at 2 36 27 pm

Send arbitrary messages from workflow or build flow Groovy DSL jobs

We have some jobs that use the 'build flow' plugin, which lets you configure the build using Groovy. In the past we have queued a dedicated parameterized Jenkins job, which just uses cURL to send arbitrary strings to the HipChat room we want. In a build flow we can use this to send messages at any point during the flow - "build started," "tests passed," "deploy completed," etc.

With the HipChat plugin, is there any way we could access the necessary plugin methods in Groovy to get a similar feature, so we could just call org.foo.HipChatplugin.newMessage("some-room", "this is a sample message string") ? This would also be useful to users of the 'workflow' plugin, I would think.

Job configuration won't get updated when global configuration changes

Hi there,
Thanks for the great plugin.

I found an issue that: if you change the hipchat global configuration in "Manage Jenkins", such as the "send as" name. The job configuration(./jobs/job_name/config.xml) won't change, as the result they still use the old name to send messages.

Jenkins version: 1.596 running on ubuntu server 14.04
Plugin version: 0.1.8

Thanks.

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.