forked from kube-rs/kopium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjustfile
57 lines (47 loc) · 2.18 KB
/
justfile
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
NAME := "kopium"
REPO := "kube-rs"
VERSION := `git rev-parse HEAD`
SEMVER_VERSION := `grep version Cargo.toml | awk -F"\"" '{print $2}' | head -n 1`
default:
@just --list --unsorted | grep -v " default"
fmt:
cargo +nightly fmt
test: test-pr test-mv test-argo test-agent test-certmanager test-cluster
test-pr:
kubectl apply --force-conflicts --server-side -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.52.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheusrules.yaml
cargo run --bin kopium -- prometheusrules.monitoring.coreos.com > tests/gen.rs
echo "pub type CR = PrometheusRule;" >> tests/gen.rs
kubectl apply -f tests/pr.yaml
cargo test --test runner -- --nocapture
test-mv:
kubectl apply -f tests/mv-crd.yaml
cargo run --bin kopium -- multiversions.clux.dev > tests/gen.rs
echo "pub type CR = MultiVersion;" >> tests/gen.rs
kubectl apply -f tests/mv.yaml
cargo test --test runner -- --nocapture
test-agent:
kubectl apply -f tests/agent-crd.yaml
cargo run --bin kopium -- agents.agent-install.openshift.io > tests/gen.rs
echo "pub type CR = Agent;" >> tests/gen.rs
kubectl apply -f tests/agent.yaml
cargo test --test runner -- --nocapture
test-argo:
kubectl apply --force-conflicts --server-side -f https://raw.githubusercontent.com/argoproj/argo-cd/master/manifests/crds/application-crd.yaml
cargo run --bin kopium -- applications.argoproj.io > tests/gen.rs
echo "pub type CR = Application;" >> tests/gen.rs
kubectl apply -f tests/app.yaml
cargo test --test runner -- --nocapture
test-certmanager:
kubectl apply --force-conflicts --server-side -f https://github.com/jetstack/cert-manager/releases/download/v1.7.1/cert-manager.crds.yaml
cargo run --bin kopium -- --docs certificates.cert-manager.io > tests/gen.rs
echo "pub type CR = Certificate;" >> tests/gen.rs
kubectl apply -f tests/cert.yaml
cargo test --test runner -- --nocapture
test-cluster:
kubectl apply -f tests/cluster-crd.yaml
cargo run --bin kopium -- clusters.cluster.x-k8s.io > tests/gen.rs
echo "pub type CR = Cluster;" >> tests/gen.rs
# No test instance for this crd
cargo build --test runner
release:
cargo release minor --execute