[commit: ghc] wip/jenkins: Fix JSON serialization (e8318c4)

git at git.haskell.org git at git.haskell.org
Sat Jun 17 13:50:37 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/jenkins
Link       : http://ghc.haskell.org/trac/ghc/changeset/e8318c4a54392d6ad5bb4782117b9828c37beeb3/ghc

>---------------------------------------------------------------

commit e8318c4a54392d6ad5bb4782117b9828c37beeb3
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Wed May 31 10:43:24 2017 -0400

    Fix JSON serialization


>---------------------------------------------------------------

e8318c4a54392d6ad5bb4782117b9828c37beeb3
 Jenkinsfile | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/Jenkinsfile b/Jenkinsfile
index d6122ef..7df1f02 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -6,6 +6,8 @@
 
 */
 
+import net.sf.json.JSONObject
+
 properties(
   [
     parameters(
@@ -152,13 +154,13 @@ def buildGhc(params) {
 
   stage('Prepare binary distribution') {
     sh "${makeCmd} binary-dist"
-    writeJSON(file: 'bindist.json', json: {
-                commit: resolveCommitSha('HEAD')
-                tarName: getMakeValue(makeCmd, 'BIN_DIST_PREP_TAR_COMP')
-                dirName: getMakeValue(makeCmd, 'BIN_DIST_NAME')
-                ghcVersion: getMakeValue(makeCmd, 'ProjectVersion')
-                targetPlatform: getMakeValue(makeCmd, 'TARGETPLATFORM')
-              })
+    def json = new JSONObject()
+    json.put('commit', resolveCommitSha('HEAD'))
+    json.put('tarName', getMakeValue(makeCmd, 'BIN_DIST_PREP_TAR_COMP'))
+    json.put('dirName', getMakeValue(makeCmd, 'BIN_DIST_NAME'))
+    json.put('ghcVersion', getMakeValue(makeCmd, 'ProjectVersion'))
+    json.put('targetPlatform', getMakeValue(makeCmd, 'TARGETPLATFORM'))
+    writeJSON(file: 'bindist.json', json: json)
     sh 'pwd; ls'
     // Write a file so we can easily file the tarball and bindist directory later
     stash(name: "bindist-${targetTriple}", includes: "bindist.json,${tarName}")



More information about the ghc-commits mailing list