-
Notifications
You must be signed in to change notification settings - Fork 112
Expand file tree
/
Copy pathdrone.yml
More file actions
55 lines (51 loc) · 1.79 KB
/
drone.yml
File metadata and controls
55 lines (51 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
kind: pipeline
type: exec
name: default
steps:
- name: build-docs
commands:
- make docker-build docker-build-docs
- cp _scripts/* _build/html
- cd _build/html && echo "www.drycc.cc" > CNAME && echo "drycc.cc" >> CNAME && git init
environment:
SSH_DEPLOY_KEY:
from_secret: ssh_deploy_key
- name: publish-docs
commands:
- chown -R root:root _build/html
- docker run --rm
-e DRONE_COMMIT_AUTHOR="$DRONE_COMMIT_AUTHOR"
-e DRONE_COMMIT_AUTHOR_EMAIL="$DRONE_COMMIT_AUTHOR_EMAIL"
-e PLUGIN_SSH_KEY="$SSH_DEPLOY_KEY"
-e PLUGIN_BRANCH=main
-e PLUGIN_REMOTE=git@github.com:drycc/www.drycc.cc.git
-e PLUGIN_FORCE=true
-e PLUGIN_COMMIT=true
-e PLUGIN_PATH=_build/html
-e PLUGIN_COMMIT_MESSAGE="init repo"
-v "$(pwd):$(pwd)"
-w "$(pwd)"
appleboy/drone-git-push
environment:
SSH_DEPLOY_KEY:
from_secret: ssh_deploy_key
- name: publish-charts
commands:
- pip install -r requirements.txt
- python3 _scripts/dependency_update.py "oci://$DRYCC_REGISTRY/$([ -z $DRONE_TAG ] && echo charts-testing || echo charts)" "charts/workflow/Chart.yaml"
- helm dependency update charts/workflow
- helm package charts/workflow -u --version $([ -z $DRONE_TAG ] && echo 1.0.0 || echo ${DRONE_TAG#v})
- echo $CONTAINER_PASSWORD | helm registry login $DRYCC_REGISTRY -u $CONTAINER_USERNAME --password-stdin
- 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)
- bash _scripts/generate_cache.sh
environment:
DRYCC_REGISTRY:
from_secret: drycc_registry
CONTAINER_USERNAME:
from_secret: container_username
CONTAINER_PASSWORD:
from_secret: container_password
trigger:
event:
- push
- tag