jenkins-job-builder/tests/yamlparser/fixtures/hipchat1.yaml
Tomas Janousek cd651c4b80 hipchat_notif: Fix compatibility dispatch
This fixes the following error message that is produced when using the
old hipchat module in a real world scenario (as opposed to a synthetic
test):

    jenkins_jobs.errors.JenkinsJobsException: Unknown entry point or macro 'name' for component type: 'publisher'.

It works in the tests/hipchat/fixtures/hipchat005.yaml test because
the `data` dict contains only the 'hipchat' key, but when used in a
job-template, the dict contains a lot more, e.g. 'name', 'project-type',
'description' etc.

To make testing more difficult, `data` is not an OrderedDict, but dict
(see YamlParser._applyDefaults), so it behaves differently across python
versions, due to different order of dict.items (hash randomization, ...).
Therefore the test contains seemingly unnecessary fields like
'project-type', 'scm' and 'description'. Without these, it would pass
without the fix on at least one of py27, py35, py36, and it's rather
likely I haven't covered all possible scenarios (different platforms?).

Change-Id: Ie45084f1a4d6405d7e60dde5fce619a66dc026db
2018-02-01 11:43:51 +01:00

18 lines
284 B
YAML

- defaults:
name: global
project-type: freestyle
description: desc
- project:
name: hipchat1
jobs:
- 'hipchat1-tpl'
- job-template:
name: 'hipchat1-tpl'
scm: []
hipchat:
enabled: true
rooms: [room1]
notify-start: true