          stages)))
 
 (defn stages-for-pipeline-group [pipelineGroupName]
-    (let [pipelineGroups (get-json "/api/config/pipeline_groups")
-          pipelineGroup (first (filter #(= pipelineGroupName (:name %)) pipelineGroups))
-          pipelines (:pipelines pipelineGroup)]
-      (apply concat
-             (map stages-for-pipeline pipelines))))
+  (let [pipelineGroups (get-json "/api/config/pipeline_groups")
+        pipelineGroup (first (filter #(= pipelineGroupName (:name %)) pipelineGroups))
+        pipelines (:pipelines pipelineGroup)]
+    (apply concat
+           (map stages-for-pipeline pipelines))))
+
 
 ;; upload
 
 (defn make-build-instance [{jobName :jobName stageName :stageName pipelineName :pipelineName
                             stageRun :stageRun pipelineRun :pipelineRun
-                            build :build}]
+                            inputs :inputs build :build}]
   {:jobName (format "%s %s %s" pipelineName stageName jobName)
    :buildNo (format "%s %s" pipelineRun stageRun)
-   :build build})
+   :build (assoc build :inputs inputs)})
 
 (defn put-to-buildviz [builds]
   (doseq [{jobName :jobName buildNo :buildNo build :build} builds]

                (map job-instances-for-stage-instance stageInstances)))))


;; /api/config/pipeline_groups

(defn stages-for-pipeline [pipeline]


(def job-instances
  (map job-data-for-instance
       (map augment-job-with-inputs
            (apply concat
                   (map job-instances-for-stage
                        (concat (stages-for-pipeline-group "Development")
                                (stages-for-pipeline-group "Verification")
                                (stages-for-pipeline-group "Production")))))))

(put-to-buildviz (map make-build-instance job-instances))
