 
 (defn update-job
     [jenkins-url jenkins-auth include-jenkins-reply? job-name git-repo branch metadata]
-    (log-operation job-name git-repo branch "update")
+    (log-operation job-name git-repo branch "update" metadata)
     (let [template (get-template metadata)
           config   (update-template template git-repo branch metadata)
           url      (str (job-name->url (update-jenkins-url jenkins-url jenkins-auth) job-name) "/config.xml")]

            (.printStackTrace e)
            (error-response-structure job-name command e))))

(defn update-template
    [template git-repo branch]
    (-> template
        (clojure.string/replace "<placeholder id=\"git-repo\" />" git-repo)
        (clojure.string/replace "<placeholder id=\"git-branch\" />" (str "*/" branch))))

(defn start-job
    [jenkins-url jenkins-auth include-jenkins-reply? job-name]


(defn get-template
    [metadata]
    (slurp (if metadata "data/template_with_metadata.xml" "data/template.xml")))

(defn create-job
    [jenkins-url jenkins-auth include-jenkins-reply? job-name git-repo branch metadata]
    (log-operation job-name git-repo branch "create" metadata)
    (let [template (get-template metadata)
          config   (update-template template git-repo branch metadata)
          url      (str (update-jenkins-url jenkins-url jenkins-auth) "createItem?name=" (.replaceAll job-name " " "%20"))]
          (spit "x.xml" config)
          (println "URL to use: " url)
          (try
              (->> (send-configuration-xml-to-jenkins url config)
