Skip to content

Commit

Permalink
Merge branch 'JENKINS-32502'
Browse files Browse the repository at this point in the history
  • Loading branch information
daspilker committed May 10, 2016
2 parents 02c0f0b + de6b194 commit 1746a40
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/Home.md
Expand Up @@ -38,6 +38,9 @@ Browse the Jenkins issue tracker to see any [open issues](https://issues.jenkins
* Support for the [Slack Plugin](https://wiki.jenkins-ci.org/display/JENKINS/Slack+Plugin) is deprecated, see
[Migration](Migration#migrating-to-147)
([JENKINS-34124](https://issues.jenkins-ci.org/browse/JENKINS-34124))
* Support for [HipChat Plugin](https://wiki.jenkins-ci.org/display/JENKINS/HipChat+Plugin) is deprecated, see
[Migration](Migration#migrating-to-147)
([JENKINS-32502](https://issues.jenkins-ci.org/browse/JENKINS-32502))
* 1.46 (May 08 2016)
* Increased the minimum supported Jenkins version to 1.625
* Added support for [[Automatically Generated DSL]]
Expand Down
74 changes: 74 additions & 0 deletions docs/Migration.md
Expand Up @@ -49,6 +49,80 @@ job('example') {
}
```

### HipChat

Support for the [HipChat Plugin](https://wiki.jenkins-ci.org/display/JENKINS/HipChat+Plugin) is
[[deprecated|Deprecation-Policy]] because it is incompatible with newer versions of that plugin. It has been replaced by
the [[Automatically Generated DSL]].

DSL prior to 1.47
```groovy
job('example') {
publishers {
hipChat {
rooms('Dev Team A', 'QA')
notifyAborted()
notifyNotBuilt()
notifyUnstable()
notifyFailure()
notifyBackToNormal()
}
}
}
```

DSL since 1.47
```groovy
job('example') {
publishers {
hipChatNotifier {
room('Dev Team A, QA')
matrixTriggerMode('ONLY_PARENT')
startJobMessage(null)
completeJobMessage(null)
token(null)
notifications {
notificationConfig {
notifyEnabled(true)
textFormat(true)
notificationType('ABORTED')
color('GRAY')
messageTemplate(null)
}
notificationConfig {
notifyEnabled(true)
textFormat(true)
notificationType('NOT_BUILT')
color('GRAY')
messageTemplate(null)
}
notificationConfig {
notifyEnabled(true)
textFormat(true)
notificationType('UNSTABLE')
color('YELLOW')
messageTemplate(null)
}
notificationConfig {
notifyEnabled(true)
textFormat(true)
notificationType('FAILURE')
color('RED')
messageTemplate(null)
}
notificationConfig {
notifyEnabled(true)
textFormat(true)
notificationType('BACK_TO_NORMAL')
color('GREEN')
messageTemplate(null)
}
}
}
}
}
```

## Migrating to 1.46

### MultiJob
Expand Down
Expand Up @@ -1534,7 +1534,10 @@ class PublisherContext extends AbstractExtensibleContext {
* @since 1.33
*/
@RequiresPlugin(id = 'hipchat', minimumVersion = '0.1.9')
@Deprecated
void hipChat(@DslContext(HipChatPublisherContext) Closure hipChatClosure = null) {
jobManagement.logDeprecationWarning()

HipChatPublisherContext hipChatContext = new HipChatPublisherContext()
ContextHelper.executeInContext(hipChatClosure, hipChatContext)

Expand Down
Expand Up @@ -4877,6 +4877,7 @@ class PublisherContextSpec extends Specification {
completeJobMessage[0].value() == ''
}
1 * jobManagement.requireMinimumPluginVersion('hipchat', '0.1.9')
1 * jobManagement.logDeprecationWarning()
}
def 'hipChat notification with all options'() {
Expand Down Expand Up @@ -4912,6 +4913,7 @@ class PublisherContextSpec extends Specification {
completeJobMessage[0].value() == 'JOB DONE! $URL'
}
1 * jobManagement.requireMinimumPluginVersion('hipchat', '0.1.9')
1 * jobManagement.logDeprecationWarning()
}
def 'mattermost notification with no options'() {
Expand Down

0 comments on commit 1746a40

Please sign in to comment.