This repository was archived by the owner on May 7, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
53 lines (37 loc) · 1.39 KB
/
Makefile
File metadata and controls
53 lines (37 loc) · 1.39 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
SHORT_NAME ?= agent
MUTABLE_VERSION ?= $(shell echo $(or ${GITHUB_REF},${VERSION},latest) | cut -d / -f 3)
IMMUTABLE_VERSION ?= latest
DOCKER_REGISTRY ?=
IMAGE_PREFIX ?= runops
IMMUTABLE_IMAGE := ${DOCKER_REGISTRY}${IMAGE_PREFIX}/${SHORT_NAME}:${IMMUTABLE_VERSION}
MUTABLE_IMAGE := ${DOCKER_REGISTRY}${IMAGE_PREFIX}/${SHORT_NAME}:${MUTABLE_VERSION}
gen-proto:
protoc --clojure_out=grpc-client:src --proto_path=resources resources/agent.proto
info:
@echo "Registry: ${DOCKER_REGISTRY}"
@echo "Immutable tag: ${IMMUTABLE_IMAGE}"
@echo "Mutable tag: ${MUTABLE_IMAGE}"
clj-kondo-lint:
lein clj-kondo --lint src/ --config .clj-kondo/config.edn
test:
lein test
build:
lein bump-version ${MUTABLE_VERSION}
lein uberjar
build-helm:
./scripts/bump-chart-version.sh ${MUTABLE_VERSION}
helm package ./charts --destination ./target/
release:
./scripts/gh-release.sh
gh-upload:
gh release upload --clobber ${MUTABLE_VERSION} ./target/uberjar/agent-${MUTABLE_VERSION}-standalone.jar
gh release upload --clobber ${MUTABLE_VERSION} ./target/agent-${MUTABLE_VERSION}.tgz
docker-build:
docker build --build-arg VERSION=${MUTABLE_VERSION} -t ${MUTABLE_IMAGE} .
docker tag ${MUTABLE_IMAGE} ${IMMUTABLE_IMAGE}
docker-immutable-push:
docker push ${IMMUTABLE_IMAGE}
docker-mutable-push:
docker push ${MUTABLE_IMAGE}
docker-push: docker-mutable-push docker-immutable-push
.PHONY: test build release info