Compare commits

..

No commits in common. "74beafdcfead3759875903e3994df34e7062a439" and "7ff6f20fce76c50078e224c8bce79cc82f423bd1" have entirely different histories.

4 changed files with 30 additions and 35 deletions

View file

@ -23,7 +23,7 @@ def initialize(project):
"release_primary_build_file": "project.clj",
"release_secondary_build_files": [
"package.json",
],
],
"release_artifact_server_url": "https://repo.prod.meissa.de",
"release_organisation": "meissa",
"release_repository_name": name,
@ -100,12 +100,6 @@ def package_frontend(project):
@task
def package_uberjar(project):
run("mkdir -p target/uberjar", shell=True, check=True)
run(
"lein uberjar",
shell=True,
check=True,
)
run(
"sha256sum target/uberjar/c4k-keycloak-standalone.jar > target/uberjar/" + project.name + "-standalone.jar.sha256",
shell=True,
@ -132,10 +126,13 @@ def package_native(project):
"--no-server " +
"--no-fallback " +
"--features=clj_easy.graal_build_time.InitClojureClasses " +
f"-jar target/uberjar/{project.name}-standalone.jar " +
"-jar target/uberjar/" + project.name + "-standalone.jar " +
"-march=compatibility " +
"-H:+UnlockExperimentalVMOptions " +
"-H:IncludeResources=.*.yaml " +
"-H:IncludeResources=logback.xml " +
"-H:Log=registerResource:verbose " +
f"-H:Name=target/graalvm/{project.name}",
"-H:Name=target/graalvm/" + project.name + "",
shell=True,
check=True,
)
@ -153,7 +150,11 @@ def package_native(project):
@task
def inst(project):
package_uberjar(project)
run(
"lein uberjar",
shell=True,
check=True,
)
package_native(project)
run(
"sudo install -m=755 target/uberjar/" + project.name + "-standalone.jar /usr/local/bin/" + project.name + "-standalone.jar",
@ -174,6 +175,11 @@ def upload_clj(project):
@task
def lint(project):
#run(
# "lein eastwood",
# shell=True,
# check=True,
#)
run(
"lein ancient check",
shell=True,

View file

@ -3,9 +3,9 @@
:url "https://domaindrivenarchitecture.org"
:license {:name "Apache License, Version 2.0"
:url "https://www.apache.org/licenses/LICENSE-2.0.html"}
:dependencies [[org.clojure/clojure "1.11.4"]
:dependencies [[org.clojure/clojure "1.11.3"]
[org.clojure/tools.reader "1.4.2"]
[org.domaindrivenarchitecture/c4k-common-clj "8.0.0"]]
[org.domaindrivenarchitecture/c4k-common-clj "6.4.1"]]
:target-path "target/%s/"
:source-paths ["src/main/cljc"
"src/main/clj"]
@ -24,7 +24,7 @@
:dependencies [[org.clojure/tools.cli "1.1.230"]
[ch.qos.logback/logback-classic "1.5.6"
:exclusions [com.sun.mail/javax.mail]]
[org.slf4j/jcl-over-slf4j "2.0.14"]
[org.slf4j/jcl-over-slf4j "2.0.13"]
[com.github.clj-easy/graal-build-time "1.0.5"]]}}
:release-tasks [["test"]
["vcs" "assert-committed"]

View file

@ -7,11 +7,10 @@
(set! *warn-on-reflection* true)
(defn -main [& cmd-args]
(uberjar/main-cm
(uberjar/main-common
"c4k-keycloak"
core/config?
core/auth?
core/config-defaults
core/config-objects
core/auth-objects
core/k8s-objects
cmd-args))

View file

@ -30,28 +30,18 @@
::postgres/postgres-db-user ::postgres/postgres-db-password]
:opt-un [::mon/mon-auth]))
(defn-spec config-objects cp/map-or-seq?
[config config?]
(map yaml/to-string
(filter
#(not (nil? %))
(cm/concat-vec
(ns/generate config)
(postgres/generate-config config)
[(kc/generate-service config)
(kc/generate-deployment config)]
(kc/generate-ingress config)
(when (contains? config :mon-cfg)
(mon/generate-config))))))
(defn-spec auth-objects cp/map-or-seq?
(defn-spec k8s-objects cp/map-or-seq?
[config config?
auth auth?]
(map yaml/to-string
(filter
#(not (nil? %))
(cm/concat-vec
(postgres/generate-auth config auth)
[(kc/generate-secret config auth)]
(when (and (contains? auth :mon-auth) (contains? config :mon-cfg))
(mon/generate-auth (:mon-config config) (:mon-auth auth)))))))
(ns/generate config)
(postgres/generate config auth)
[(kc/generate-secret config auth)
(kc/generate-service config)
(kc/generate-deployment config)]
(kc/generate-ingress config)
(when (:contains? config :mon-cfg)
(mon/generate (:mon-cfg config) (:mon-auth auth)))))))