This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-01-08
Channels
- # babashka (1)
- # babashka-sci-dev (27)
- # beginners (13)
- # cljdoc (1)
- # clojure (24)
- # clojure-austin (1)
- # clojurescript (76)
- # data-science (18)
- # datomic (7)
- # java (2)
- # malli (7)
- # nbb (7)
- # off-topic (34)
- # portal (1)
- # reagent (9)
- # reitit (4)
- # releases (2)
- # remote-jobs (1)
- # shadow-cljs (11)
- # squint (7)
- # tools-build (7)
- # uncomplicate (1)
Hi folks! Do you have any tips for how to use dev-local with a GitHub Action? Namely I want to run https://github.com/fulcrologic/fulcro-rad-demo/pull/42/files#diff-c9346137b015156901cb500b96f00582ba4ff714a3cd3fabd9a6cdc93496e4cfR43 but currently have to skip running it for https://github.com/fulcrologic/fulcro-rad-demo/blob/main/deps.edn#L42-L44 b/c com.datomic/dev-local
is not in Maven central. Do I need to add the cognitect repo and set up ~/.m2/settings.xml
with my credentials, presumably leveraging https://docs.github.com/en/rest/actions/secrets?apiVersion=2022-11-28 to store my credentials? Or is there a simpler way? Thank you! (Notice this is a publicly accessible, OSS repo.)
For a regular Github Action, it's very easy to setup Java and Maven's settings in one go:
- name: Install Java
uses: actions/setup-java@v3 #
with:
distribution: 'corretto'
java-version: '11'
server-id: cognitect-dev-tools
server-username: MVN_DEVTOOLS_EML
server-password: MVN_DEVTOOLS_PWD
The above generates the following on your test runner instance:
cat ~/.m2/settings.xml
<settings xmlns=""
xmlns:xsi=""
xsi:schemaLocation=" ">
<servers>
<server>
<id>cognitect-dev-tools</id>
<username>${env.MVN_DEVTOOLS_EML}</username>
<password>${env.MVN_DEVTOOLS_PWD}</password>
</server>
</servers>
</settings>
So you need to prepare the envars for their usage when any process will want to read the maven settings file:
- name: Start backend
env:
MVN_DEVTOOLS_EML: ${{ secrets.MVN_DEVTOOLS_EML }}
MVN_DEVTOOLS_PWD: ${{ secrets.MVN_DEVTOOLS_PWD }}
run: |
mkdir -p log
DATOMIC_ENV_MAP="{:env :...}" clojure -M:dev... &> log/....log &
You can also put the jar in source (admittedly, yucky) and use :local/root
in your deps.edn
can you? I am not sure that the license permits that
Sorry, I was assuming that your “sources” was private to you. If that is the case, I don’t think the license prohibits you from bundling the jar with your SCM-controlled source as long as it is only “controllable” by you and used for your internal business processes. If the source ls put into a public repo then that would be a problem.
no, it is all open source
For a regular Github Action, it's very easy to setup Java and Maven's settings in one go:
- name: Install Java
uses: actions/setup-java@v3 #
with:
distribution: 'corretto'
java-version: '11'
server-id: cognitect-dev-tools
server-username: MVN_DEVTOOLS_EML
server-password: MVN_DEVTOOLS_PWD
The above generates the following on your test runner instance:
cat ~/.m2/settings.xml
<settings xmlns=""
xmlns:xsi=""
xsi:schemaLocation=" ">
<servers>
<server>
<id>cognitect-dev-tools</id>
<username>${env.MVN_DEVTOOLS_EML}</username>
<password>${env.MVN_DEVTOOLS_PWD}</password>
</server>
</servers>
</settings>
So you need to prepare the envars for their usage when any process will want to read the maven settings file:
- name: Start backend
env:
MVN_DEVTOOLS_EML: ${{ secrets.MVN_DEVTOOLS_EML }}
MVN_DEVTOOLS_PWD: ${{ secrets.MVN_DEVTOOLS_PWD }}
run: |
mkdir -p log
DATOMIC_ENV_MAP="{:env :...}" clojure -M:dev... &> log/....log &