-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.drone.yml
63 lines (56 loc) · 1.73 KB
/
.drone.yml
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
56
57
58
59
60
61
62
63
---
kind: pipeline
type: docker
name: drone-nolimit
steps:
- name: source
image: alpine:latest
commands:
- apk add --update --no-cache curl jq git patch
- LATEST=$(curl -sL "https://api.github.com/repos/harness/drone/releases" | jq -r ".[0].tag_name")
- TAG=$${LATEST//v}
- if curl -sfL https://hub.docker.com/v2/repositories/ezkrg/drone/tags/$TAG > /dev/null; then echo "tag $TAG already exist"; exit 78; fi
- git clone -n https://github.com/harness/drone.git
- cd drone
- git checkout $LATEST
- patch -p0 < ../build.sh.patch
- echo -n "latest,$TAG" > ../.tags
- while [ -z $${TAG##*\.*} ]; do echo -n "," >> ../.tags; TAG=$${TAG%*\.*}; echo -n $TAG >> ../.tags; done
- name: docker
image: docker:dind
privileged: true
detach: true
command: [ "dockerd", "--host=tcp://0.0.0.0:2375" ]
- name: build
image: docker:cli
environment:
DOCKER_HOST: tcp://docker:2375
commands:
- while ! docker info; do sleep 1; done
- apk add --update --no-cache curl
- curl -sL https://github.com/harness/drone-cli/releases/latest/download/drone_linux_amd64.tar.gz | tar -C /usr/local/bin -zx
- cd drone
- drone exec --pipeline linux-amd64 --include build .drone.yml
- name: publish
image: plugins/docker
environment:
DOCKER_HOST: tcp://docker:2375
settings:
daemon_off: true
force_tag: true
context: drone
dockerfile: drone/docker/Dockerfile.server.linux.amd64
repo: ezkrg/drone
username:
from_secret: docker_username
password:
from_secret: docker_password
trigger:
event:
- cron
cron:
- nightly
---
kind: signature
hmac: e638325ce8585fd85c9fcbfd2ba3417af0a1c4d52ff935ac05cfdc87c67e45d1
...