forked from Squidex/squidex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
67 lines (62 loc) · 1.69 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
64
65
66
67
clone:
git:
image: plugins/git:next
pull: true
pipeline:
test_pull_request:
image: docker
commands:
- docker build -t squidex/squidex:test_pull_request .
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /var/lib/docker:/var/lib/docker
when:
event: pull_request
build_dev:
image: docker
commands:
- docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
- docker build -t squidex/squidex:dev .
- docker push squidex/squidex:dev
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /var/lib/docker:/var/lib/docker
secrets: [ docker_username, docker_password ]
when:
event: push
branch: [ master ]
build_release:
image: docker
commands:
- docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
- docker build -t squidex/squidex:latest -t squidex/squidex:$TAG .
- docker push squidex/squidex:latest
- docker push squidex/squidex:$TAG
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /var/lib/docker:/var/lib/docker
environment:
- TAG=${DRONE_TAG}
secrets: [ docker_username, docker_password ]
when:
event: tag
slack:
image: plugins/slack
template: >
{{#success build.status}}
Squidex build {{build.number}} succeeded. Good job.
{{else}}
Squidex build {{build.number}} failed. Fix me please.
{{/success}}
secrets: [ slack_webhook ]
when:
status: [ failure, success ]
cleanup:
image: docker
commands:
- docker system prune -f
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /var/lib/docker:/var/lib/docker
when:
status: failure