This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # aleph (5)
- # announcements (16)
- # babashka (36)
- # beginners (161)
- # calva (24)
- # cider (8)
- # circleci (45)
- # clj-kondo (5)
- # cljs-dev (25)
- # cljsrn (5)
- # clojure (116)
- # clojure-europe (10)
- # clojure-nl (18)
- # clojure-uk (14)
- # clojuredesign-podcast (6)
- # clojurescript (50)
- # crux (35)
- # cursive (12)
- # data-science (8)
- # datomic (8)
- # duct (39)
- # emacs (6)
- # fulcro (21)
- # graalvm (12)
- # kaocha (17)
- # off-topic (184)
- # pathom (1)
- # pedestal (2)
- # re-frame (31)
- # reagent (24)
- # reitit (1)
- # sci (1)
- # shadow-cljs (23)
- # sql (147)
- # tools-deps (8)
- # vrac (3)
Is there a tutorial that shows how to set up a deps.edn project with CircleCI? Looking through the archive of this channel and doing a web search, I found no such thing (although Chris' Duct tutorial with Leiningen is very nice). I have a few sample config.yml files from the archived and borkdudes babashka generator.. If there isnt a tutorial, I'll figure this all out and write up what I discovered and add it to the Practicalli Clojure book and maybe do a broadcast on the subject. Any feedback / suggestions welcome.
Oh and I voted for the related CircleCI issue (making 3 votes) https://ideas.circleci.com/ideas/CCI-I-256
@jr0cket What's the problem? I usually install
clojure and that's all there is to it basically?
For the bb script, I assme this is run from the root of the Clojure project you wish to generate the config.yml from https://github.com/babashka/pod-babashka-etaoin/blob/master/script/generate_circleci.clj
The only reason I'm generating the circleci config there is that there's a matrix of builds: two executables for three OSes
I'd like to have some documentation that shows how to do this without searching through the clojurian slack archives. If its a solved problem, then documentation helps the community solve other problems.
I'm sure there are images that already have
clojure installed, but I don't bother with those, just make my own
I havent seen anything yet with Clojure CLI installed, only Leiningen. I would take the approach sean did of using a vanilla jdk image rather than a clojure image with a tool I was not using The cli install is the same approach I've used for other projects in the past, its been a while since I set all this up, so examples will help speed this all up. Thanks for the pointers. I work on this next week and see how much comes flooding back :)
next.jdbc uses CircleCI https://github.com/seancorfield/next-jdbc/blob/develop/.circleci/config.yml
I do have a separate script for Mac builds, because the vanilla clojure script didn't work for me
https://circleci.com/docs/2.0/circleci-images/#clojure shows the images available for Clojure on Circle
The default for a clojure project seems to be to set it up with the
Interestingly, it seems as if Circle autodetects that your project is a Clojure project, maybe Circle could be taught to detect if its a deps or a lein project as well.
Just tell me to be quiet when you've had enough of my ramblings, but I see one problem and it would be that if you were to write a tutorial on this, the
deps.edn project setup is so free form, that it's hard to generalize into a non-parameterized recipe
Like circle's default clojure-setup has
lein test as their
run thingy. That could be literally whatever if you use
Nothing profound here, other than that
lein test is a thing in the leiningen world but in hte deps.edn world, it's up to the user to name the alias, so running your tests with deps.edn could be
clj -A:koacha, or
clj -A:xyzzy .
If everyone used my practicalli/clojure-deps-edn configuration then that wouldnt be a problem 🙂 (I dont expect everyone to do this)
So I guess (and I'm sure you're aware of) if you're writing a tutorial on setting up a project with deps.edn, it would be wise to suggest good names for the aliases (which should probably not be the name of the thing implementing the feature, eg
clj -A:test over
clj -A:kaocha (and
clj -A:uberjar over
clj -A:depstar or whatever)
Classic. If everyone would just do as I said, the world would be such a great place 🙂
I have chosen what I believe to be descriptive names for the aliases used in that configuration, especially where there are multiple options for the same task https://github.com/practicalli/clojure-deps-edn
I've added all the suggestions and ideas to this issue and will write up my experiences next week. https://github.com/practicalli/clojure-practicalli-content/issues/183 If anyone has any other suggestions or examples to share, I'll keep an eye out. Thank you all.
It's very easy to tell GitHub Actions to run a matrix of tests on different Java (JDK) versions. Is that easy to set up on CircleCI as well?
next.jdbc runs tests on JDKs 8, 11, and 14: https://github.com/seancorfield/next-jdbc/blob/develop/.github/workflows/test.yml#L8-L10
@seancorfield I choose to generate that matrix myself from a babashka script: https://github.com/babashka/babashka-sql-pods/blob/master/script/generate_circleci.clj
Yeah, I was looking at that script -- which is why I asked 🙂 I find CircleCI's docs pretty hard to navigate when you're looking for a specific "how-to" answer...
in my case I had to make one build but with one different environment variable for three values
I see now that I could have done that using the matrix stuff (although even @marc-omorain did not mention it when I showed him my script ;))
Ah, it's been a few months since I last went looking and that seems to be new in April. Thank you @borkdude!
(I do remember reading something about Orbs at some point but felt it was a weird name and very poorly explained in the docs -- and looking at that blog post, it's a lot of boilerplate just to define matrix when compared to something like GitHub Actions!)