Skip to content

Commit 4b44054

Browse files
committed
Merge branch 'main' of https://github.com/drycc/stacks into main
2 parents 6aa0b47 + 0098ecb commit 4b44054

2 files changed

Lines changed: 30 additions & 0 deletions

File tree

scripts/checker.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,12 @@
385385
"owner": "mongodb-js",
386386
"match": "^v[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$",
387387
},
388+
"mongodb_exporter": {
389+
"name": "mongodb_exporter",
390+
"type": "github",
391+
"owner": "percona",
392+
"match": "^v[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$",
393+
},
388394
"clickhouse": {
389395
"name": "ClickHouse",
390396
"type": "github",

stacks/mongodb_exporter/build.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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+
BIN_DIR="${DATA_DIR}"/bin
10+
mkdir -p "${BIN_DIR}"
11+
if [[ ${OS_ARCH} =~ "x86" || ${OS_ARCH} =~ "amd" ]]; then
12+
OS_ARCH="amd64"
13+
curl -sSL https://github.com/percona/mongodb_exporter/releases/download/v${STACK_VERSION}/mongodb_exporter-${STACK_VERSION}.linux-${OS_ARCH}.tar.gz |tar -xz
14+
mv ./mongodb_exporter-${STACK_VERSION}.linux-${OS_ARCH}/mongodb_exporter "${BIN_DIR}/"
15+
rm -rf ./mongodb_exporter-${STACK_VERSION}.linux-${OS_ARCH}
16+
elif [[ ${OS_ARCH} =~ "arm" ]]; then
17+
OS_ARCH="arm64"
18+
curl -sSL https://github.com/percona/mongodb_exporter/releases/download/v${STACK_VERSION}/mongodb_exporter-${STACK_VERSION}.linux-${OS_ARCH}.tar.gz |tar -xz
19+
mv ./mongodb_exporter-${STACK_VERSION}.linux-${OS_ARCH}/mongodb_exporter "${BIN_DIR}/"
20+
rm -rf ./mongodb_exporter-${STACK_VERSION}.linux-${OS_ARCH}
21+
fi
22+
}
23+
# call build stack
24+
build-stack "${1}"

0 commit comments

Comments
 (0)