-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.drone.yml
86 lines (76 loc) · 1.65 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
kind: pipeline
name: test
steps:
- name: docker build
image: docker:dind
volumes:
- name: dockersock
path: /var/run
commands:
- sleep 1; until docker version; do sleep 1; done
- docker build . --tag vagrant-vmck
- name: list plugins
image: docker:dind
volumes:
- name: dockersock
path: /var/run
commands:
- apk update -q && apk add -q grep
- docker run vagrant-vmck vagrant --version
- docker run vagrant-vmck vagrant plugin list
- docker run vagrant-vmck vagrant plugin list | grep -q vagrant-vmck
- name: launch example VM
image: docker:dind
volumes:
- name: dockersock
path: /var/run
commands:
- export VMCK_URL=http://$VMCK_IP:$VMCK_PORT
- export JOB_NAME="drone $DRONE_REPO:$DRONE_BRANCH#$DRONE_BUILD_NUMBER"
- docker run --env JOB_NAME --env VMCK_URL vagrant-vmck bash /src/run-test.sh
services:
- name: docker daemon in docker
image: docker:dind
privileged: true
volumes:
- name: dockersock
path: /var/run
volumes:
- name: dockersock
temp: {}
---
kind: pipeline
name: publish
trigger:
status:
- success
event:
- push
- tag
depends_on:
- test
steps:
- name: docker push branch ${DRONE_COMMIT_BRANCH}
image: plugins/docker
settings:
repo: vmck/vagrant-vmck
tags: ${DRONE_COMMIT_BRANCH}
username:
from_secret: docker_username
password:
from_secret: docker_password
when:
event:
- push
branch:
exclude:
- dependabot/*
- name: docker push autotag + latest
image: plugins/docker
settings:
repo: vmck/vagrant-vmck
auto_tag: true
username:
from_secret: docker_username
password:
from_secret: docker_password