-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathconfig.clj
More file actions
96 lines (74 loc) · 3.31 KB
/
config.clj
File metadata and controls
96 lines (74 loc) · 3.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
(ns docker-clojure.config
(:require [clojure.spec.alpha :as s]
[clojure.string :as str]
[docker-clojure.core :as-alias core]))
(s/def ::non-blank-string
(s/and string? #(not (str/blank? %))))
(s/def ::jdk-version
(s/and pos-int? #(<= 8 %)))
(s/def ::jdk-versions (s/coll-of ::jdk-version :distinct true :into #{}))
(s/def ::base-image ::non-blank-string)
(s/def ::base-images (s/coll-of ::base-image :distinct true :into #{}))
(s/def ::docker-image-name (s/and ::non-blank-string
#(re-matches #"[-\w]+(?::[-\w.]+)?" %)))
(s/def ::docker-tag (s/and ::non-blank-string
#(re-matches #"[-\w.]+" %)))
(s/def ::base-image-tag ::docker-image-name)
(s/def ::distro qualified-keyword?)
(s/def ::distros (s/coll-of ::distro :distinct true :into #{}))
(s/def ::build-tool keyword?)
(s/def ::build-tool-version
(s/nilable (s/and ::non-blank-string #(re-matches #"[\d\.]+" %))))
(s/def ::installer-hash ::non-blank-string)
(s/def ::version ::build-tool-version)
(s/def ::build-tools (s/map-of ::build-tool
(s/keys :req-un [::version ::installer-hash])))
(s/def ::maintainers
(s/coll-of ::non-blank-string :distinct true :into #{}))
(s/def ::architecture ::non-blank-string)
(s/def ::architectures (s/coll-of ::architecture :distinct true :into #{}))
(def git-repo "https://github.com/Quantisan/docker-clojure.git")
(def jdk-versions #{8 11 17 21 22})
(def base-images
"Map of JDK version to base image name(s) with :default as a fallback"
{8 ["eclipse-temurin" "debian"]
11 ["eclipse-temurin" "debian"]
17 ["eclipse-temurin" "debian"]
:default ["debian" "eclipse-temurin"]})
;; The default JDK version to use for tags that don't specify one; usually the latest LTS release
(def default-jdk-version 21)
(def distros
"Map of base image name to set of distro tags to use, namespaced by Linux
distro type. :default key is a fallback for base images not o/w specified."
{:default #{:alpine/alpine :ubuntu/focal :ubuntu/jammy}
"debian" #{:debian-slim/bookworm-slim :debian/bookworm
:debian-slim/bullseye-slim :debian/bullseye}})
(def default-architectures
#{"amd64" "arm64v8"})
(def distro-architectures
"Map of distro types to architectures it supports if different from
default-architectures."
{:alpine #{"amd64"}})
(def default-distros
"The default distro to use for tags that don't specify one, keyed by jdk-version.
:default is a fallback for jdk versions not o/w specified."
{8 :ubuntu/jammy
11 :ubuntu/jammy
17 :ubuntu/jammy
:default :debian/bookworm})
(def ^:dynamic *build-tools*
{:lein {:version "2.11.2"
:installer-hash "28a1a62668c5f427b413a8677e376affaa995f023b1fcd06e2d4c98ac1df5f3e"}
:tools-deps {:version "1.11.1.1435"
:installer-hash "7edee5b12197a2dbe6338e672b109b18164cde84bea1f049ceceed41fc4dd10a"}})
(def default-build-tool :tools-deps)
(def exclusions ; don't build these for whatever reason(s)
#{; no more focal builds for JDK 20+
{:jdk-version #(>= % 20)
:distro :ubuntu/focal}
;; commented out example
#_{:jdk-version 8
:distro :alpine/alpine}})
(def maintainers
["Paul Lam <paul@quantisan.com> (@Quantisan)"
"Wes Morgan <wes@wesmorgan.me> (@cap10morgan)"])