Skip to content

Commit 430b9d2

Browse files
committed
chore(workflow): use woodpecker replace drone
1 parent 09a0ce2 commit 430b9d2

4 files changed

Lines changed: 68 additions & 58 deletions

File tree

.drone/drone.yml

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

.woodpecker/publish-charts.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
platform: linux/amd64
2+
3+
labels:
4+
type: exec
5+
6+
pipeline:
7+
- name: publish-charts
8+
image: bash
9+
commands:
10+
- pip install -r requirements.txt
11+
- python3 _scripts/dependency_update.py "oci://$DRYCC_REGISTRY/$([ -z $DRONE_TAG ] && echo charts-testing || echo charts)" "charts/workflow/Chart.yaml"
12+
- helm dependency update charts/workflow
13+
- helm package charts/workflow -u --version $([ -z $DRONE_TAG ] && echo 1.0.0 || echo ${DRONE_TAG##v})
14+
- echo $CONTAINER_PASSWORD | helm registry login $DRYCC_REGISTRY -u $CONTAINER_USERNAME --password-stdin
15+
- helm push workflow-$([ -z $DRONE_TAG ] && echo 1.0.0 || echo ${DRONE_TAG##v}).tgz oci://$DRYCC_REGISTRY/$([ -z $DRONE_TAG ] && echo charts-testing || echo charts)
16+
- bash _scripts/generate_cache.sh
17+
secrets:
18+
- drycc_registry
19+
- container_username
20+
- container_password
21+
when:
22+
event:
23+
- tag
24+
- push

.woodpecker/publish-docs.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
platform: linux/amd64
2+
3+
labels:
4+
type: exec
5+
6+
pipeline:
7+
- name: build-docs
8+
image: bash
9+
commands:
10+
- make docker-build docker-build-docs
11+
- cp _scripts/* _build/html
12+
- cd _build/html && echo "www.drycc.cc" > CNAME && echo "drycc.cc" >> CNAME && git init
13+
secrets:
14+
- drycc_registry
15+
when:
16+
event:
17+
- tag
18+
- push
19+
20+
- name: publish-docs
21+
image: bash
22+
commands:
23+
- chown -R root:root _build/html
24+
- docker run --rm
25+
-e DRONE_COMMIT_AUTHOR="$DRONE_COMMIT_AUTHOR"
26+
-e DRONE_COMMIT_AUTHOR_EMAIL="$DRONE_COMMIT_AUTHOR_EMAIL"
27+
-e PLUGIN_SSH_KEY="$SSH_DEPLOY_KEY"
28+
-e PLUGIN_BRANCH=main
29+
-e PLUGIN_REMOTE=git@github.com:drycc/www.drycc.cc.git
30+
-e PLUGIN_FORCE=true
31+
-e PLUGIN_COMMIT=true
32+
-e PLUGIN_PATH=_build/html
33+
-e PLUGIN_COMMIT_MESSAGE="init repo"
34+
-v "$(pwd):$(pwd)"
35+
-w "$(pwd)"
36+
appleboy/drone-git-push
37+
secrets:
38+
- ssh_deploy_key
39+
when:
40+
event:
41+
- tag
42+
- push

_scripts/install.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,11 @@ function configure_os {
5959
mount bpffs -t bpf /sys/fs/bpf
6060
rmem_max=$(sysctl -ne net.core.rmem_max)
6161
if [ ! -n "$rmem_max" ] || [ 2500000 -gt $rmem_max ] ;then
62-
echo 'net.core.rmem_max = 2500000' >> /etc/sysctl.conf
63-
62+
echo 'net.core.rmem_max = 2500000' >> /etc/sysctl.conf
6463
fi
6564
nr_hugepages=$(sysctl -ne vm.nr_hugepages)
6665
if [ ! -n "$nr_hugepages" ] || [ 1024 -gt $nr_hugepages ] ;then
67-
echo 'vm.nr_hugepages = 1024' >> /etc/sysctl.conf
66+
echo 'vm.nr_hugepages = 1024' >> /etc/sysctl.conf
6867
fi
6968
sysctl -p
7069
echo -e "\\033[32m---> Configuring kernel parameters finish\\033[0m"

0 commit comments

Comments
 (0)