diff --git a/jenkins_jobs/builder.py b/jenkins_jobs/builder.py index 5d7a81f90..2a89653f4 100644 --- a/jenkins_jobs/builder.py +++ b/jenkins_jobs/builder.py @@ -381,7 +381,7 @@ class XmlJob(object): def output(self): out = minidom.parseString(XML.tostring(self.xml)) - out = out.toprettyxml(indent=' ') + out = out.toprettyxml(indent=' ', encoding='utf-8') return self.pretty_text_re.sub('>\g<1> + diff --git a/tests/builders/fixtures/maven-target001.xml b/tests/builders/fixtures/maven-target001.xml index dbb6490f2..328eb0e83 100644 --- a/tests/builders/fixtures/maven-target001.xml +++ b/tests/builders/fixtures/maven-target001.xml @@ -1,4 +1,4 @@ - + diff --git a/tests/builders/fixtures/trigger-builds001.xml b/tests/builders/fixtures/trigger-builds001.xml index 5afabc731..f083ed865 100644 --- a/tests/builders/fixtures/trigger-builds001.xml +++ b/tests/builders/fixtures/trigger-builds001.xml @@ -1,4 +1,4 @@ - + diff --git a/tests/general/fixtures/assigned-node001.xml b/tests/general/fixtures/assigned-node001.xml index 37a87ba9b..ebbf8c7c7 100644 --- a/tests/general/fixtures/assigned-node001.xml +++ b/tests/general/fixtures/assigned-node001.xml @@ -1,4 +1,4 @@ - + false diff --git a/tests/general/fixtures/assigned-node002.xml b/tests/general/fixtures/assigned-node002.xml index 01aff283d..1505db519 100644 --- a/tests/general/fixtures/assigned-node002.xml +++ b/tests/general/fixtures/assigned-node002.xml @@ -1,4 +1,4 @@ - + false diff --git a/tests/notifications/fixtures/http-endpoint001.xml b/tests/notifications/fixtures/http-endpoint001.xml index cc3ddc18e..79ba0ef8c 100644 --- a/tests/notifications/fixtures/http-endpoint001.xml +++ b/tests/notifications/fixtures/http-endpoint001.xml @@ -1,4 +1,4 @@ - + diff --git a/tests/parameters/fixtures/dynamic-choice-param001.xml b/tests/parameters/fixtures/dynamic-choice-param001.xml index 7220a733a..f057e8e48 100644 --- a/tests/parameters/fixtures/dynamic-choice-param001.xml +++ b/tests/parameters/fixtures/dynamic-choice-param001.xml @@ -1,4 +1,4 @@ - + diff --git a/tests/properties/fixtures/batch-task.xml b/tests/properties/fixtures/batch-task.xml index 9866cc66b..9740f8a26 100644 --- a/tests/properties/fixtures/batch-task.xml +++ b/tests/properties/fixtures/batch-task.xml @@ -1,4 +1,4 @@ - + diff --git a/tests/properties/fixtures/throttle001.xml b/tests/properties/fixtures/throttle001.xml index de321a371..073a9f8fb 100644 --- a/tests/properties/fixtures/throttle001.xml +++ b/tests/properties/fixtures/throttle001.xml @@ -1,4 +1,4 @@ - + diff --git a/tests/publishers/fixtures/README b/tests/publishers/fixtures/README index dc505aba6..225f630f5 100644 --- a/tests/publishers/fixtures/README +++ b/tests/publishers/fixtures/README @@ -10,5 +10,5 @@ Each yaml file MUST have a corresponding xml file. Once the YAML file has been parsed, it is prettify using python minidom which also means that: -- your XML file must start with: +- your XML file must start with: - self closing elements do not contains space eg: diff --git a/tests/publishers/fixtures/archive001.xml b/tests/publishers/fixtures/archive001.xml index 73c524603..24bc4d624 100644 --- a/tests/publishers/fixtures/archive001.xml +++ b/tests/publishers/fixtures/archive001.xml @@ -1,4 +1,4 @@ - + diff --git a/tests/publishers/fixtures/blame001.xml b/tests/publishers/fixtures/blame001.xml index ef2ff74da..d07c95039 100644 --- a/tests/publishers/fixtures/blame001.xml +++ b/tests/publishers/fixtures/blame001.xml @@ -1,4 +1,4 @@ - + diff --git a/tests/publishers/fixtures/build001.xml b/tests/publishers/fixtures/build001.xml index 60ada7f59..fc7718b5f 100644 --- a/tests/publishers/fixtures/build001.xml +++ b/tests/publishers/fixtures/build001.xml @@ -1,4 +1,4 @@ - + diff --git a/tests/publishers/fixtures/cloverphp001.xml b/tests/publishers/fixtures/cloverphp001.xml index f572450d4..6af0e77a2 100644 --- a/tests/publishers/fixtures/cloverphp001.xml +++ b/tests/publishers/fixtures/cloverphp001.xml @@ -1,4 +1,4 @@ - + diff --git a/tests/publishers/fixtures/cloverphp002.xml b/tests/publishers/fixtures/cloverphp002.xml index 5f4db9f31..33ad66107 100644 --- a/tests/publishers/fixtures/cloverphp002.xml +++ b/tests/publishers/fixtures/cloverphp002.xml @@ -1,4 +1,4 @@ - + diff --git a/tests/publishers/fixtures/cloverphp003.xml b/tests/publishers/fixtures/cloverphp003.xml index a9255397f..4fc565d61 100644 --- a/tests/publishers/fixtures/cloverphp003.xml +++ b/tests/publishers/fixtures/cloverphp003.xml @@ -1,4 +1,4 @@ - + diff --git a/tests/publishers/fixtures/description-setter.xml b/tests/publishers/fixtures/description-setter001.xml similarity index 92% rename from tests/publishers/fixtures/description-setter.xml rename to tests/publishers/fixtures/description-setter001.xml index f73d5c00d..1cbb41fdb 100644 --- a/tests/publishers/fixtures/description-setter.xml +++ b/tests/publishers/fixtures/description-setter001.xml @@ -1,4 +1,4 @@ - + diff --git a/tests/publishers/fixtures/description-setter.yaml b/tests/publishers/fixtures/description-setter001.yaml similarity index 100% rename from tests/publishers/fixtures/description-setter.yaml rename to tests/publishers/fixtures/description-setter001.yaml diff --git a/tests/publishers/fixtures/description-setter002.xml b/tests/publishers/fixtures/description-setter002.xml new file mode 100644 index 000000000..23f5d9122 --- /dev/null +++ b/tests/publishers/fixtures/description-setter002.xml @@ -0,0 +1,12 @@ + + + + + .*(<a href=.*a>) + .*(<a href=.*a>) + こんにちは + さようなら + true + + + diff --git a/tests/publishers/fixtures/description-setter002.yaml b/tests/publishers/fixtures/description-setter002.yaml new file mode 100644 index 000000000..7e6e70185 --- /dev/null +++ b/tests/publishers/fixtures/description-setter002.yaml @@ -0,0 +1,7 @@ +publishers: + - description-setter: + regexp: ".*()" + regexp-for-failed: ".*()" + description: "こんにちは" + description-for-failed: "さようなら" + set-for-matrix: true diff --git a/tests/publishers/fixtures/emotional-jenkins.xml b/tests/publishers/fixtures/emotional-jenkins.xml index 0630e84ef..c1469043d 100644 --- a/tests/publishers/fixtures/emotional-jenkins.xml +++ b/tests/publishers/fixtures/emotional-jenkins.xml @@ -1,4 +1,4 @@ - + diff --git a/tests/publishers/fixtures/git001.xml b/tests/publishers/fixtures/git001.xml index 63dcdfda2..866b0575a 100644 --- a/tests/publishers/fixtures/git001.xml +++ b/tests/publishers/fixtures/git001.xml @@ -1,4 +1,4 @@ - + diff --git a/tests/publishers/fixtures/github-notifier.xml b/tests/publishers/fixtures/github-notifier.xml index a4501b40c..3f20f33b6 100644 --- a/tests/publishers/fixtures/github-notifier.xml +++ b/tests/publishers/fixtures/github-notifier.xml @@ -1,4 +1,4 @@ - + diff --git a/tests/publishers/fixtures/mavendeploy001.xml b/tests/publishers/fixtures/mavendeploy001.xml index 6db0030ee..327dddc02 100644 --- a/tests/publishers/fixtures/mavendeploy001.xml +++ b/tests/publishers/fixtures/mavendeploy001.xml @@ -1,4 +1,4 @@ - + diff --git a/tests/publishers/fixtures/pipeline001.xml b/tests/publishers/fixtures/pipeline001.xml index cb448fbb0..4b9295c4c 100644 --- a/tests/publishers/fixtures/pipeline001.xml +++ b/tests/publishers/fixtures/pipeline001.xml @@ -1,4 +1,4 @@ - + diff --git a/tests/publishers/fixtures/pipeline002.xml b/tests/publishers/fixtures/pipeline002.xml index 33eca2ab8..a5c7dc9f0 100644 --- a/tests/publishers/fixtures/pipeline002.xml +++ b/tests/publishers/fixtures/pipeline002.xml @@ -1,4 +1,4 @@ - + diff --git a/tests/publishers/fixtures/plot001.xml b/tests/publishers/fixtures/plot001.xml index 382d5b713..abd36d0a7 100644 --- a/tests/publishers/fixtures/plot001.xml +++ b/tests/publishers/fixtures/plot001.xml @@ -1,4 +1,4 @@ - + diff --git a/tests/publishers/fixtures/plot002.xml b/tests/publishers/fixtures/plot002.xml index c67956aab..1eeffb172 100644 --- a/tests/publishers/fixtures/plot002.xml +++ b/tests/publishers/fixtures/plot002.xml @@ -1,4 +1,4 @@ - + diff --git a/tests/publishers/fixtures/plot003.xml b/tests/publishers/fixtures/plot003.xml index d13c93bdb..51c4ca940 100644 --- a/tests/publishers/fixtures/plot003.xml +++ b/tests/publishers/fixtures/plot003.xml @@ -1,4 +1,4 @@ - + diff --git a/tests/publishers/fixtures/scp001.xml b/tests/publishers/fixtures/scp001.xml index 78af67769..fafa32f64 100644 --- a/tests/publishers/fixtures/scp001.xml +++ b/tests/publishers/fixtures/scp001.xml @@ -1,4 +1,4 @@ - + diff --git a/tests/publishers/fixtures/stash001.xml b/tests/publishers/fixtures/stash001.xml index 9260c6412..a07da18aa 100644 --- a/tests/publishers/fixtures/stash001.xml +++ b/tests/publishers/fixtures/stash001.xml @@ -1,4 +1,4 @@ - + diff --git a/tests/publishers/fixtures/xunit001.xml b/tests/publishers/fixtures/xunit001.xml index 2535b6249..7d6e5b92c 100644 --- a/tests/publishers/fixtures/xunit001.xml +++ b/tests/publishers/fixtures/xunit001.xml @@ -1,4 +1,4 @@ - + diff --git a/tests/scm/fixtures/git-shallow-clone01.xml b/tests/scm/fixtures/git-shallow-clone01.xml index d66862cdc..dd0015416 100644 --- a/tests/scm/fixtures/git-shallow-clone01.xml +++ b/tests/scm/fixtures/git-shallow-clone01.xml @@ -1,4 +1,4 @@ - + 2 diff --git a/tests/scm/fixtures/git-shallow-clone02.xml b/tests/scm/fixtures/git-shallow-clone02.xml index c1735f217..57fe8d7ab 100644 --- a/tests/scm/fixtures/git-shallow-clone02.xml +++ b/tests/scm/fixtures/git-shallow-clone02.xml @@ -1,4 +1,4 @@ - + 2 diff --git a/tests/scm/fixtures/git-shallow-clone03.xml b/tests/scm/fixtures/git-shallow-clone03.xml index c1735f217..57fe8d7ab 100644 --- a/tests/scm/fixtures/git-shallow-clone03.xml +++ b/tests/scm/fixtures/git-shallow-clone03.xml @@ -1,4 +1,4 @@ - + 2 diff --git a/tests/scm/fixtures/gitlab.xml b/tests/scm/fixtures/gitlab.xml index 4623bf9ed..be772a9dc 100644 --- a/tests/scm/fixtures/gitlab.xml +++ b/tests/scm/fixtures/gitlab.xml @@ -1,4 +1,4 @@ - + 2 diff --git a/tests/scm/fixtures/repo001.xml b/tests/scm/fixtures/repo001.xml index bed34c01b..94be6b5c7 100644 --- a/tests/scm/fixtures/repo001.xml +++ b/tests/scm/fixtures/repo001.xml @@ -1,4 +1,4 @@ - + https://example.com/project/ diff --git a/tests/triggers/fixtures/gerrit001.xml b/tests/triggers/fixtures/gerrit001.xml index 53fadaaef..ebde0064a 100644 --- a/tests/triggers/fixtures/gerrit001.xml +++ b/tests/triggers/fixtures/gerrit001.xml @@ -1,4 +1,4 @@ - + diff --git a/tests/triggers/fixtures/github-pull-request.xml b/tests/triggers/fixtures/github-pull-request.xml index 63f0ef8c1..e4e19b0d0 100644 --- a/tests/triggers/fixtures/github-pull-request.xml +++ b/tests/triggers/fixtures/github-pull-request.xml @@ -1,4 +1,4 @@ - + diff --git a/tests/wrappers/fixtures/env-file001.xml b/tests/wrappers/fixtures/env-file001.xml index d6cb26a56..0fc515984 100644 --- a/tests/wrappers/fixtures/env-file001.xml +++ b/tests/wrappers/fixtures/env-file001.xml @@ -1,4 +1,4 @@ - +