                       :repo repo-name
                       :ref branch-name
                       :path (-> conf :k8s :deployment)})
-        app (str repo-name "-" branch-name)]
+        app (->app job)]
     (-> deployment
         (assoc-in [:metadata :name] app)
         (assoc-in [:spec :template :metadata :labels :app] app)

(defn- prepare-ingress
  [{:keys [deploy-repository domain]}
   {:keys [conf build user-name repo-name branch-name] :as job}]
  (let [host (str repo-name "-" branch-name "." domain)
        service-name (str repo-name "-" branch-name)
        ingress (deployrepo/get-ingress deploy-repository)
        spec (.getSpec ingress)
        tls (.getTls spec)

(defn round-up
  [{:keys [deploy-repository] :as comp}
   job]
  (let [app (->app job)]
    (deployrepo/delete-service deploy-repository {:app app})
    (deployrepo/delete-deployment deploy-repository {:app app})
    (deployrepo/remove-subdomain deploy-repository job)))
