diff --git a/src/bob/artifact/core.clj b/src/bob/artifact/core.clj index 7f55d0bd..27197a60 100644 --- a/src/bob/artifact/core.clj +++ b/src/bob/artifact/core.clj @@ -129,7 +129,13 @@ (comment (docker/ops (docker/client {:category :containers :conn states/docker-conn})) - (slurp (clojure.java.io/input-stream (java.io.ByteArrayInputStream. (.getBytes (docker/invoke states/containers {:op :ContainerArchive :params {:id "0be7b883382b" :path "/opt/pyproject.toml"} :as :stream}) "UTF-8")))) + (slurp (clojure.java.io/input-stream (java.io.ByteArrayInputStream. + (.getBytes + (docker/invoke states/containers {:op :ContainerArchive + :params + {:id "0be7b883382b" + :path "/opt/pyproject.toml"} + :as :stream}) "UTF-8")))) (upload-artifact "dev" "test" 1 "poetry.lock" "0be7b883382b" "/opt" "s3") (db/register-artifact-store states/db {:name "s3" diff --git a/src/bob/resource/core.clj b/src/bob/resource/core.clj index cf9eb2bf..e330a1d6 100644 --- a/src/bob/resource/core.clj +++ b/src/bob/resource/core.clj @@ -65,11 +65,11 @@ - Copies over the contents to the home dir inside the container. - Returns the id or the error." [resource pipeline image] - (f/try-all [_ (when (not (r/valid-external-resource? resource)) - (f/fail (str "Invalid external resources, possibly not registered" - (:name resource)))) - out-dir (r/fetch-resource resource pipeline)] - (r/initial-image-of out-dir image nil) + (f/try-all [_ (when (not (r/valid-external-resource? resource)) + (f/fail (str "Invalid external resources, possibly not registered" + (:name resource)))) + archive-path (r/fetch-resource resource pipeline)] + (r/initial-image-of archive-path image nil) (f/when-failed [err] (log/errorf "Failed to generate mounted image: %s" (f/message err)) err)))