          '[clj-time.coerce :as tc])
 
 (def server-url (second *command-line-args*))
+
+(def selected-pipeline-group-names (set (drop 2 *command-line-args*)))
+
+;; util
 
 (defn absolute-url-for [relativeUrl]
   (clojure.string/join [server-url relativeUrl]))

    (when (some? junit-xml-func)
      (put-junit-xml jobName buildNo (junit-xml-func)))))

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

           {:stage name :pipeline pipelineName})
         stages)))

(defn stages-for-pipeline-group [pipeline-group]
  (let [pipelines (:pipelines pipeline-group)]
    (mapcat stages-for-pipeline pipelines)))

(defn get-pipeline-groups []
  (get-json "/api/config/pipeline_groups"))

(defn select-pipeline-groups [pipeline-groups filter-by-names]
  (filter #(contains? filter-by-names (:name %)) pipeline-groups))

;; /files/%pipeline/%run/%stage/%run/job.json

