Skip to content

Conversation

@fajran
Copy link
Contributor

@fajran fajran commented Apr 27, 2017

Originally, the changelogs are put in a map, with commit message as the
key and author as the value, that later will be exposed as JSON. If
there is a commit message that contains double quotes, the resulting
JSON will have unescaped double quotes in the JSON object keys and thus
makes the JSON invalid. The Pipeline Aggregator web view will fail to
parse it and stop showing the builds.

This commit changes the changelogs to use list of a structure instead of
a simple map. The resulting JSON will have properly escaped commit
messages.

Originally, the changelogs are put in a map, with commit message as the
key and author as the value, that later will be exposed as JSON. If
there is a commit message that contains double quotes, the resulting
JSON will have unescaped double quotes in the JSON object keys and thus
makes the JSON invalid. The Pipeline Aggregator web view will fail to
parse it and stop showing the builds.

This commit changes the changelogs to use list of a structure instead of
a simple map. The resulting JSON will have properly escaped commit
messages.
@fajran
Copy link
Contributor Author

fajran commented Apr 27, 2017

You can use the following Git repository to test https://gist.github.com/fajran/1ac35a2ec98cb5b00a4e48f04a1af234

There are two commits in the repository. Use the first one and do a build first and then add the second commit and do a second build. This is to ensure that the "checkout scm" command in Jenkinsfile picks up the second commit and put it in a changeset list.

@fajran
Copy link
Contributor Author

fajran commented Apr 27, 2017

My second commit to remove unused imports is not related to the fix. It's just to make the build to succeed because there is an unused javafx import that made the build to fail.

@paul8620 paul8620 merged commit b3a2c3a into jenkinsci:master Apr 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants