Skip to content

Commit f857ae4

Browse files
committed
Merge branch 'main' of https://github.com/drycc/stacks into main
2 parents f36731e + 30f637e commit f857ae4

7 files changed

Lines changed: 68 additions & 18 deletions

File tree

.woodpecker/check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ pipeline:
77
- name: check
88
image: bash
99
commands:
10-
- docker run --rm
10+
- podman run --rm
1111
--privileged
1212
--network host
1313
-e GITHUB_TOKEN=$GITHUB_TOKEN
1414
-v "$(pwd):$(pwd)"
1515
-w "$(pwd)"
16-
drycc/python-dev
16+
registry.drycc.cc/drycc/python-dev
1717
python scripts/checker.py
1818
secrets:
1919
- github_token

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
ARG CODENAME DRYCC_REGISTRY
1+
ARG CODENAME
2+
ARG DRYCC_REGISTRY
23
FROM ${DRYCC_REGISTRY}/drycc/base:${CODENAME}
34

45
RUN install-packages \

build.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ BUILDPACK_DEP_IMAGE="${DRYCC_REGISTRY}"/drycc/buildpack-dep:"${CODENAME}"
1616

1717
function create-buildpack-dep {
1818
# build buildpack-dep image
19-
docker build --pull -f "${CURRENT_DIR}"/Dockerfile --build-arg CODENAME="${CODENAME}" --build-arg DRYCC_REGISTRY="${DRYCC_REGISTRY}" . -t "${BUILDPACK_DEP_IMAGE}"
19+
podman build --pull -f "${CURRENT_DIR}"/Dockerfile --build-arg CODENAME="${CODENAME}" --build-arg DRYCC_REGISTRY="${DRYCC_REGISTRY}" . -t "${BUILDPACK_DEP_IMAGE}"
2020
}
2121

2222
function build {
2323
mkdir -p "$DIST_DIR"
2424
STACK_NAME="${1:?STACK_NAME is required}"
2525
stack_version="${2:?stack_version is required}"
2626
create-buildpack-dep
27-
docker run --rm \
27+
podman run --rm \
2828
--privileged=true \
2929
--env STACK_DOWNLOAD_URL="${STACK_DOWNLOAD_URL:-}" \
3030
--env STACK_NAME="${STACK_NAME}" \
@@ -40,7 +40,7 @@ function build {
4040
function upload {
4141
STACK_NAME="${1:?stack_name is required}"
4242
create-buildpack-dep
43-
docker run --rm \
43+
podman run --rm \
4444
--env OSS_ENDPOINT=${OSS_ENDPOINT} \
4545
--env OSS_ACCESS_KEY_ID=${OSS_ACCESS_KEY_ID} \
4646
--env OSS_ACCESS_KEY_SECRET=${OSS_ACCESS_KEY_SECRET} \
@@ -53,7 +53,7 @@ function upload {
5353
}
5454

5555
function symlink {
56-
docker run --rm \
56+
podman run --rm \
5757
--env OSS_ENDPOINT=${OSS_ENDPOINT} \
5858
--env OSS_ACCESS_KEY_ID=${OSS_ACCESS_KEY_ID} \
5959
--env OSS_ACCESS_KEY_SECRET=${OSS_ACCESS_KEY_SECRET} \

scripts/checker.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,12 @@
115115
"search": r"https://aka.ms/download-jdk/microsoft-jdk-[0-9]{1,}.[0-9]{1,}.[0-9]{1,}-linux-x64.tar.gz",
116116
"version": r"[0-9]{1,}.[0-9]{1,}.[0-9]{1,}",
117117
},
118+
"netcat": {
119+
"url": "https://sourceforge.net/projects/netcat/files/netcat",
120+
"type": "url",
121+
"search": r"netcat-[0-9]{1,}.[0-9]{1,}.[0-9]{1,}.tar.bz2",
122+
"version": r"[0-9]{1,}.[0-9]{1,}.[0-9]{1,}",
123+
},
118124
"jq": {
119125
"name": "jq",
120126
"type": "github",
@@ -331,6 +337,12 @@
331337
"owner": "opensearch-project",
332338
"match": "^[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$",
333339
},
340+
"seaweedfs": {
341+
"name": "seaweedfs",
342+
"type": "github",
343+
"owner": "seaweedfs",
344+
"match": "^[0-9]{1,}\.[0-9]{1,}$",
345+
},
334346
}
335347

336348

stacks/alertmanager/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function build() {
1212
mkdir -p "${BIN_DIR}"
1313
mv ./alertmanager-${STACK_VERSION}.linux-${OS_ARCH}/alertmanager "${BIN_DIR}"
1414
mv ./alertmanager-${STACK_VERSION}.linux-${OS_ARCH}/amtool "${BIN_DIR}"
15-
rm -rf ./prometheus-${STACK_VERSION}.linux-${OS_ARCH}
15+
rm -rf ./alertmanager-${STACK_VERSION}.linux-${OS_ARCH}
1616
#upx
1717
upx --lzma --best "${BIN_DIR}"/*
1818
}

stacks/pack/build.sh

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,15 @@
66
# Implement build function
77
function build() {
88
generate-stack-path
9-
install-packages make
10-
install-stack go "${GO_VERSION}" && . init-stack
11-
12-
curl -sSL "https://github.com/buildpacks/pack/archive/refs/tags/v${STACK_VERSION}.tar.gz" | tar -xz \
13-
&& cd pack-${STACK_VERSION} \
14-
&& make
15-
9+
if [[ "${OS_ARCH}" == "amd64" ]]; then
10+
pack_download_url="https://github.com/buildpacks/pack/releases/download/v${STACK_VERSION}/pack-v${STACK_VERSION}-linux.tgz"
11+
else
12+
pack_download_url="https://github.com/buildpacks/pack/releases/download/v${STACK_VERSION}/pack-v${STACK_VERSION}-linux-${OS_ARCH}.tgz"
13+
fi
1614
BIN_DIR="${DATA_DIR}"/bin
1715
mkdir -p "${BIN_DIR}"
18-
mv ./out/pack "${BIN_DIR}"
19-
rm -rf pack-${STACK_VERSION}
16+
curl -sSL "${pack_download_url}" | tar xvz -C "${BIN_DIR}"
2017
}
2118

2219
# call build stack
2320
build-stack "${1}"
24-

stacks/seaweedfs/build.sh

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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+
11+
BIN_DIR="${DATA_DIR}"/bin
12+
mkdir -p "${BIN_DIR}"
13+
14+
# build weed
15+
curl -sSL "https://github.com/seaweedfs/seaweedfs/archive/refs/tags/${STACK_VERSION}.tar.gz" | tar -xz \
16+
&& mv seaweedfs-${STACK_VERSION} $GOPATH/src/seaweedfs/ \
17+
&& cd $GOPATH/src/seaweedfs/weed \
18+
&& go install -tags "tikv"
19+
mv $GOPATH/bin/weed "${BIN_DIR}"
20+
cd -
21+
22+
23+
# seaweedfs-csi-driver
24+
# WEED_CSI_VERSION=$(curl -Ls https://github.com/seaweedfs/seaweedfs-csi-driver/releases|grep /seaweedfs/seaweedfs-csi-driver/releases/tag/ | sed -E 's/.*\/seaweedfs\/seaweedfs-csi-driver\/releases\/tag\/v([0-9\.]{1,}(-rc.[0-9]{1,})?)".*/\1/g' | head -1)
25+
WEED_CSI_VERSION=master
26+
if [[ "$WEED_CSI_VERSION" == "master" ]]; then
27+
WEED_CSI_URL="https://github.com/seaweedfs/seaweedfs-csi-driver/archive/refs/heads/${WEED_CSI_VERSION}.tar.gz"
28+
else
29+
WEED_CSI_URL="https://github.com/seaweedfs/seaweedfs-csi-driver/archive/refs/tags/v${WEED_CSI_VERSION}.tar.gz"
30+
fi
31+
curl -sSL "${WEED_CSI_URL}" | tar -xz \
32+
&& mv seaweedfs-csi-driver-${WEED_CSI_VERSION} $GOPATH/src/seaweedfs-csi-driver/ \
33+
&& cd $GOPATH/src/seaweedfs-csi-driver \
34+
&& go build -o "${BIN_DIR}"/weed-csi ./cmd/seaweedfs-csi-driver/main.go
35+
36+
# upx
37+
upx --lzma --best "${BIN_DIR}"/*
38+
}
39+
40+
# call build stack
41+
build-stack "${1}"

0 commit comments

Comments
 (0)