Skip to content
This repository has been archived by the owner on Jun 15, 2024. It is now read-only.

Commit

Permalink
update README to use chaining/always-chaining, update sample pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
flosell committed May 5, 2016
1 parent ad06122 commit cfc08e7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ browser.

; the build-step you put in your pipeline: first build artifacts, then publish them
(defn some-build-step [args ctx]
(step-support/chain args ctx
(produce-output)
(artifacts/publish-artifacts (:cwd args) [#"report-folder/.*"
"some-folder/someBinary.jar"])))
(step-support/chaining args ctx ; use always-chaining if you want the artifact even if previous steps failed (e.g. for test reports)
(produce-output injected-args injected-ctx)
(artifacts/publish-artifacts injected-args injected-ctx
(:cwd injected-args) [#"report-folder/.*"
"some-folder/someBinary.jar"])))

; url prefix where your artifacts will be available
(def artifacts-path-context "/artifacts")
Expand Down
2 changes: 1 addition & 1 deletion project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
["releases" :clojars]]
:dependencies [[org.clojure/clojure "1.7.0"]
[compojure "1.1.8"]
[lambdacd "0.7.0"]]
[lambdacd "0.9.0"]]
:test2junit-run-ant true
:profiles {:dev {:dependencies [[ring-server "0.3.1"]
[ring/ring-mock "0.2.0"]]
Expand Down
6 changes: 4 additions & 2 deletions test/lambdacd_artifacts/sample_pipeline.clj
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@
(git/with-git "git@github.com:flosell/lambdacd-artifacts" steps))

(defn produce-output [args ctx]
(shell/bash ctx (:cwd args) "lein test2junit"))
(shell/bash ctx (:cwd args)
"lein test2junit"
"exit 1"))

(defn some-build-step [args ctx]
(step-support/chaining args ctx
(step-support/always-chaining args ctx
(produce-output injected-args injected-ctx)
(artifacts/publish-artifacts injected-args injected-ctx
(:cwd injected-args) [#"test2junit/.*"
Expand Down

0 comments on commit cfc08e7

Please sign in to comment.