Fork me on GitHub
#babashka
<
2023-07-26
>
genRaiy09:07:15

🧵 trying (and failing) to get bb build working on a CI with docker...

4
genRaiy09:07:51

- name: package
    pull: if-not-exists
    image: public.ecr.aws/amazoncorretto/amazoncorretto:17
    commands:
      - yum -q -y install tar gzip which
      - curl -sLO 
      - chmod +x linux-install-1.11.1.1347.sh
      - ./linux-install-1.11.1.1347.sh
      - curl -sLO 
      - tar xzf babashka-1.3.182-linux-amd64.tar.gz -C /usr/local/bin
      - bb build

genRaiy09:07:24

17: Pulling from amazoncorretto/amazoncorretto

Digest: sha256:36d049495d25ac3596edc4bc4b2fe560c29c17ec0ac7cfedf781e9bf24000175

Status: Downloaded newer image for public.ecr.aws/amazoncorretto/amazoncorretto:17

+ yum -q -y install tar gzip which

+ curl -sLO 

+ chmod +x linux-install-1.11.1.1347.sh

+ ./linux-install-1.11.1.1347.sh

Downloading and expanding tar

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current

                                 Dload  Upload   Total   Spent    Left  Speed


  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 17.1M  100 17.1M    0     0   222M      0 --:--:-- --:--:-- --:--:--  225M

Installing libs into /usr/local/lib/clojure

Installing clojure and clj into /usr/local/bin

Installing man pages into /usr/local/share/man/man1

Removing download

Use clj -h for help.

+ curl -sLO 

+ tar xzf babashka-1.3.182-linux-amd64.tar.gz -C /usr/local/bin

+ bb build

Downloading pod org.babashka/fswatcher (0.0.3)

Successfully installed pod org.babashka/fswatcher (0.0.3)

Clojure tools not yet in expected location: /root/.deps.clj/1.11.1.1347/ClojureTools/clojure-tools-1.11.1.1347.jar

Downloading  to /root/.deps.clj/1.11.1.1347/ClojureTools/tools.zip

Unzipping /root/.deps.clj/1.11.1.1347/ClojureTools/tools.zip ...

Successfully installed clojure tools!

Cloning: 

Error building classpath. Cannot run program "git": error=2, No such file or directory

java.io.IOException: Cannot run program "git": error=2, No such file or directory

	at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1143)

genRaiy10:07:38

I can always add git but why does it need git? Is there something I can do up front to avoid all of this? I thought having Clojure installed would be enough tbh.

genRaiy10:07:42

forget it ... I've found some better docker images for clojure and so it's academic only now 🙂

elken09:07:37

Needed a quick little tool to access nREPL on ECS containers and chose bb over awkward jq parsing https://github.com/elken/awssh

🎉 16
Benjamin16:07:31

the power of getting the same general language for all ranges of tasks ❤️ a coworker once was proud of a jq script that took him 1 hour that I wrote in 3 minutes with bb, not kidding. tree-seq can be a delightful hammer + I don't need a new jq lang when I have the generic clojure lib

elken18:07:25

Would you rather have a complex bunch of jq or https://github.com/elken/eww/blob/master/scripts/window-name#L40 👀

😄 2
grazfather15:07:59

nice, uses gum. til bblgum, I need to integrate that into some of my bb stuff

elken15:07:40

Yeah found it on the first article mentioning bb and gum so I figured why not

👍 2
Björn Ebbinghaus13:07:43

Is there a BB compatible library for reading, filling and writing PDFs?

Björn Ebbinghaus13:07:30

Most libs I've found only care about generating PDFs.

Björn Ebbinghaus13:07:52

I'm fed up with some weird work documents I regularly have to fill. (You won't believe it, but they are PDFs containing JavaScript and they call that a "Digital Workflow" here in germany...)

😄 4
borkdude13:07:56

Not sure. You might have more luck on the Node.js ecosystem with #C029PTWD3HR perhaps

borkdude13:07:25

or maybe pandoc supports something and you could try to shell out to that

Eugen16:07:54

I think the "official" name is XFA and pdf.js might have some support for it (at least rendering it ) https://github.com/mozilla/pdf.js/issues/2373