Skip to content

Commit 27663d4

Browse files
committed
feat(stacks): add geesefs juicefs
1 parent c165fb4 commit 27663d4

4 files changed

Lines changed: 60 additions & 40 deletions

File tree

scripts/checker.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,12 +259,18 @@
259259
"owner": "sclevine",
260260
"match": "^v[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$",
261261
},
262-
"csi-s3": {
263-
"name": "k8s-csi-s3",
262+
"geesefs": {
263+
"name": "geesefs",
264264
"type": "github",
265265
"owner": "yandex-cloud",
266266
"match": "^v[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$",
267267
},
268+
"juicefs": {
269+
"name": "juicefs",
270+
"type": "github",
271+
"owner": "juicedata",
272+
"match": "^v[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}(-rc){0,1}[0-9]{0,}$",
273+
},
268274
"tikv": {
269275
"name": "tikv",
270276
"type": "github",

stacks/csi-s3/build.sh

Lines changed: 0 additions & 38 deletions
This file was deleted.

stacks/geesefs/build.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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-packages fuse
10+
install-stack go 1.18.4 && . init-stack
11+
BIN_DIR="${DATA_DIR}"/bin
12+
mkdir -p "${BIN_DIR}"
13+
# geesefs
14+
curl -sSL "https://github.com/yandex-cloud/geesefs/archive/refs/tags/v${STACK_VERSION}.tar.gz" | tar -xz \
15+
&& mv geesefs-${STACK_VERSION} $GOPATH/src/geesefs/ \
16+
&& cd $GOPATH/src/geesefs \
17+
&& export GO111MODULE=on \
18+
&& CGO_ENABLED=0 go build \
19+
-a -ldflags '-extldflags "-static"' -o /bin/geesefs .
20+
mv /bin/geesefs "${BIN_DIR}"
21+
22+
# upx
23+
upx --lzma --best "${BIN_DIR}"/*
24+
}
25+
26+
# call build stack
27+
build-stack "${1}"
28+

stacks/juicefs/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+
12+
# juicefs
13+
curl -fsSL -o tmp.tar.gz https://github.com/juicedata/juicefs/releases/download/v${STACK_VERSION}/juicefs-${STACK_VERSION}-linux-${OS_ARCH}.tar.gz
14+
tar -xzf tmp.tar.gz
15+
mv juicefs "${BIN_DIR}"/juicefs
16+
rm -rf tmp.tar.gz LICENSE README*.md
17+
18+
# upx
19+
upx --lzma --best "${BIN_DIR}"/*
20+
}
21+
22+
# call build stack
23+
build-stack "${1}"
24+

0 commit comments

Comments
 (0)