-
Notifications
You must be signed in to change notification settings - Fork 1
/
.drone.yml
61 lines (57 loc) · 1.97 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
---
pipeline:
pre_clean:
when:
event: push
image: 1and1internet/template-library-tools
pull: true
volumes:
- /var/run/docker.sock:/var/run/docker.sock
commands:
- docker container prune -f || true
- docker image prune -f
- docker rmi -f $(docker images --format "{{.Repository}}:{{.Tag}}" | egrep -v 'none|template-library-tools|testpack-framework|git') || true
build:
when:
event: push
image: 1and1internet/template-library-tools
pull: true
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /secrets:/root/.docker
commands:
- make --environment-overrides build IMAGE_NAME=build-${CI_BUILD_NUMBER}-${CI_REPO#*/}/${CI_REPO#*/}
test:
when:
event: push
image: 1and1internet/testpack-framework
pull: true
volumes:
- /var/run/docker.sock:/var/run/docker.sock
commands:
- export IMAGE_NAME=build-${CI_BUILD_NUMBER}-${CI_REPO#*/}/${CI_REPO#*/}
- start_ci_tests
publish:
when:
event: push
image: 1and1internet/template-library-tools
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /shared_storage:/shared_storage
- /secrets:/secrets
commands:
- images_tool -s /secrets/ -w /shared_storage --image-name build-${CI_BUILD_NUMBER}-${CI_REPO#*/}/${CI_REPO#*/} --publish-image-unstable --skip-compare
clean_workspace:
when:
event: push
status: [success, failure]
image: 1and1internet/template-library-tools
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /shared_storage:/shared_storage
- /secrets:/secrets
commands:
- images_tool -s /secrets/ -w /shared_storage --image-name build-${CI_BUILD_NUMBER}-${CI_REPO#*/}/${CI_REPO#*/} --clean-workspace
- docker container prune -f || true
- docker image prune -f
- docker rmi -f $(docker images --format "{{.Repository}}:{{.Tag}}" | egrep -v 'none|template-library-tools|testpack-framework|git') || true