Skip to content

Commit

Permalink
[JENKINS-32907] Add support for Emotional Jenkins plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
psalaberria002 committed Feb 11, 2016
1 parent a680606 commit faac32f
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/Home.md
Expand Up @@ -21,6 +21,8 @@ Browse the Jenkins issue tracker to see any [open issues](https://issues.jenkins

## Release Notes
* 1.43 (unreleased)
* Add support for the [Emotional Jenkins Plugin](https://wiki.jenkins-ci.org/display/JENKINS/Emotional+Jenkins+Plugin)
([JENKINS-32907](https://issues.jenkins-ci.org/browse/JENKINS-32907))
* Added support for the [Clover PHP Plugin](https://wiki.jenkins-ci.org/display/JENKINS/Clover+PHP+Plugin)
([JENKINS-31557](https://issues.jenkins-ci.org/browse/JENKINS-31557))
* Allow `BuildParametersContext` to be extended
Expand Down
@@ -0,0 +1,5 @@
job('example') {
publishers {
emotional()
}
}
Expand Up @@ -2032,6 +2032,16 @@ class PublisherContext extends AbstractExtensibleContext {
}
}

/**
* Changes the expression of Mr. Jenkins in the background when your builds fail.
*
* @since 1.43
*/
@RequiresPlugin(id = 'emotional-jenkins-plugin', minimumVersion = '1.2')
void emotional() {
publisherNodes << new NodeBuilder().'org.jenkinsci.plugins.emotional__jenkins.EmotionalJenkinsPublisher'()
}

@SuppressWarnings('NoDef')
private static addStaticAnalysisContext(def nodeBuilder, StaticAnalysisContext context) {
nodeBuilder.with {
Expand Down
Expand Up @@ -6256,4 +6256,16 @@ class PublisherContextSpec extends Specification {
where:
disable << [true, false]
}

def 'call emotional with no options'() {
when:
context.emotional()

then:
context.publisherNodes != null
context.publisherNodes.size() == 1
def emotionalNode = context.publisherNodes[0]
emotionalNode.name() == 'org.jenkinsci.plugins.emotional__jenkins.EmotionalJenkinsPublisher'
1 * jobManagement.requireMinimumPluginVersion('emotional-jenkins-plugin', '1.2')
}
}

0 comments on commit faac32f

Please sign in to comment.