Skip to content

Commit 1d879f0

Browse files
committed
chore(stacks): add kvrocks_exporter
1 parent e75a809 commit 1d879f0

2 files changed

Lines changed: 32 additions & 0 deletions

File tree

scripts/checker.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,18 @@
133133
"owner": "stedolan",
134134
"match": "^jq-[0-9]{1,}\.[0-9]{1,}\.?[0-9]{0}$",
135135
},
136+
"kvrocks": {
137+
"name": "kvrocks",
138+
"type": "github",
139+
"owner": "apache",
140+
"match": "^v[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$",
141+
},
142+
"kvrocks_exporter": {
143+
"name": "kvrocks_exporter",
144+
"type": "github",
145+
"owner": "RocksLabs",
146+
"match": "^v[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$",
147+
},
136148
"kubectl": {
137149
"name": "kubectl",
138150
"type": "github",

stacks/kvrocks_exporter/build.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
3+
# Load stack utils
4+
. /usr/bin/stack-utils
5+
6+
# Implement build function
7+
function build() {
8+
generate-stack-path
9+
install-stack go "${GO_VERSION}" && . init-stack
10+
BIN_DIR="${DATA_DIR}"/bin
11+
mkdir -p "${BIN_DIR}"
12+
git clone -b v${STACK_VERSION} --dept=1 https://github.com/RocksLabs/kvrocks_exporter.git
13+
cd kvrocks_exporter; go build main.go; mv main "${BIN_DIR}"/kvrocks_exporter; cd ..
14+
rm -rf kvrocks_exporter
15+
# upx
16+
upx --lzma --best "${BIN_DIR}"/*
17+
}
18+
19+
# call build stack
20+
build-stack "${1}"

0 commit comments

Comments
 (0)