Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
MilesRoberts committed May 4, 2016
2 parents 160dcd7 + ae8e6e3 commit 0f58848
Show file tree
Hide file tree
Showing 63 changed files with 2,632 additions and 227 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
target
.classpath
.idea
*.iml
.project
.settings
bin
Expand Down
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
# 2.0.1 release notes

Bug Fixes:

* Set webhook endpoint to random uuid based string if not set (PR # 190)
* Upgrading to Slack 2.0 outbound webhooks breaks Jenkins (#191)

# 2.0 release notes

New Features:

* Adding configurable webhook endpoint for exposing jenkins commands with a Slack outgoing-webhook (#160)
* Added Jenkins Pipeline support via custom step `slackSend`. (#167)

UI Improvements:

* Job level configuration was moved under post-build actions with support for migration from previous versions. (#79, #170)
* Use Subdomain instead of Domain (#168)

Bug Fixes

* Notify for repeated failures doesn't work (#136)
* Workflow plugin integration (#50)
* "Back to normal" message duration is build duration rather than time the job has been broken for (#129)
* [FIXED JENKINS-30559] Dropdown list to select commit info for notifications (#133)
* Fix double start message when build is manually started (#96, #137)
* "success" instead of "back to normal" after aborted build (123)
* Doesn't support the Jenkins Inheritance plugin (#6)


# 1.8.1 release notes

This is a backport release which backports features originally intended for
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ https://github.com/jlewallen/jenkins-hipchat-plugin

Which was, in turn, a fork of the Campfire plugin.

Includes [Jenkins Pipeline](https://github.com/jenkinsci/workflow-plugin) support as of version 2.0:

```
slackSend color: 'good', message: 'Message from Jenkins Pipeline'
```

# Jenkins Instructions

1. Get a Slack account: https://slack.com/
Expand Down
116 changes: 111 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,22 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>1.567</version>
<version>1.609.2</version>
</parent>

<artifactId>slack</artifactId>
<packaging>hpi</packaging>
<version>2.0-SNAPSHOT</version>
<version>2.1-SNAPSHOT</version>
<name>Slack Notification Plugin</name>
<description>A Build status publisher that notifies channels on a Slack team</description>
<url>http://wiki.jenkins-ci.org/display/JENKINS/Slack+Plugin</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<workflow.version>1.11</workflow.version>
<hamcrest.version>1.3</hamcrest.version>
<powermock.version>1.6.2</powermock.version>
</properties>

<licenses>
Expand All @@ -40,10 +43,20 @@
<connection>scm:git:ssh://[email protected]/jenkinsci/slack-plugin.git</connection>
<developerConnection>scm:git:ssh://[email protected]/jenkinsci/slack-plugin.git</developerConnection>
<url>https://github.com/jenkinsci/slack-plugin</url>
<tag>HEAD</tag>
<tag>head</tag>
</scm>

<dependencies>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>junit</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.4.4</version>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
Expand All @@ -54,6 +67,12 @@
<artifactId>json</artifactId>
<version>20131018</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand Down Expand Up @@ -89,14 +108,91 @@
<artifactId>jna</artifactId>
<version>3.2.2</version>
</dependency>
<!-- for workflow support -->
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-step-api</artifactId>
<version>${workflow.version}</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-cps</artifactId>
<version>${workflow.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-job</artifactId>
<version>${workflow.version}</version>
<scope>test</scope>
</dependency>
<dependency> <!-- StepConfigTester -->
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-step-api</artifactId>
<classifier>tests</classifier>
<version>${workflow.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<version>${hamcrest.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<version>${hamcrest.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.10.19</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-core</artifactId>
<version>${powermock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-junit4</artifactId>
<version>${powermock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
<version>${powermock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-reflect</artifactId>
<version>${powermock.version}</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.2</version>
<configuration>
<tagNameFormat>slack-@{project.version}</tagNameFormat>
</configuration>
</plugin>
<plugin>
<groupId>org.jenkins-ci.tools</groupId>
<artifactId>maven-hpi-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<goals>deploy</goals>
<compatibleSinceVersion>2.0</compatibleSinceVersion>
</configuration>
</plugin>
</plugins>
Expand All @@ -123,13 +219,23 @@
The id should be the jenkinsci.org username and not your GitHub username.
-->
<developers>
<developer>
<id>kmadel</id>
<name>Kurt Madel</name>
<email>[email protected]</email>
<url>https://github.com/kmadel</url>
<roles>
<role>maintainer</role>
</roles>
<timezone>America/New_York</timezone>
</developer>
<developer>
<id>sag47</id>
<name>Sam Gleske</name>
<email>[email protected]</email>
<url>https://github.com/samrocketman</url>
<roles>
<role>maintainer</role>
<role>committer</role>
</roles>
<timezone>America/Los_Angeles</timezone>
</developer>
Expand Down
36 changes: 18 additions & 18 deletions src/main/java/jenkins/plugins/slack/DisabledNotifier.java
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
package jenkins.plugins.slack;

import hudson.model.AbstractBuild;

@SuppressWarnings("rawtypes")
public class DisabledNotifier implements FineGrainedNotifier {
public void started(AbstractBuild r) {
}

public void deleted(AbstractBuild r) {
}

public void finalized(AbstractBuild r) {
}

public void completed(AbstractBuild r) {
}
}
package jenkins.plugins.slack;

import hudson.model.AbstractBuild;

@SuppressWarnings("rawtypes")
public class DisabledNotifier implements FineGrainedNotifier {
public void started(AbstractBuild r) {
}

public void deleted(AbstractBuild r) {
}

public void finalized(AbstractBuild r) {
}

public void completed(AbstractBuild r) {
}
}
38 changes: 19 additions & 19 deletions src/main/java/jenkins/plugins/slack/FineGrainedNotifier.java
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
package jenkins.plugins.slack;

import hudson.model.AbstractBuild;

public interface FineGrainedNotifier {

@SuppressWarnings("rawtypes")
void started(AbstractBuild r);

@SuppressWarnings("rawtypes")
void deleted(AbstractBuild r);

@SuppressWarnings("rawtypes")
void finalized(AbstractBuild r);

@SuppressWarnings("rawtypes")
void completed(AbstractBuild r);

}
package jenkins.plugins.slack;

import hudson.model.AbstractBuild;

public interface FineGrainedNotifier {

@SuppressWarnings("rawtypes")
void started(AbstractBuild r);

@SuppressWarnings("rawtypes")
void deleted(AbstractBuild r);

@SuppressWarnings("rawtypes")
void finalized(AbstractBuild r);

@SuppressWarnings("rawtypes")
void completed(AbstractBuild r);

}
Loading

0 comments on commit 0f58848

Please sign in to comment.