-
Notifications
You must be signed in to change notification settings - Fork 125
/
.drone.yml
78 lines (66 loc) · 1.45 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
kind: pipeline
name: default
type: docker
workspace:
base: /go
path: src/github.com/oliver006/elasticsearch-gmail
services:
- name: es
image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.6.1
environment:
http.port: "9200"
discovery.type: "single-node"
ports:
- 9200
steps:
- name: tests
image: "python:3.12"
pull: always
commands:
- pip3 install -r requirements.txt
- sleep 30
- curl -s http://es:9200
- "python3 es_test_data.py -es_url=http://es:9200"
when:
event:
- pull_request
- push
- name: test-docker-build
image: plugins/docker
settings:
tags: "test"
dockerfile: Dockerfile
repo: oliver006/es-test-data
dry_run: true
build_args:
- 'TAG=test'
- 'SHA1=${DRONE_COMMIT_SHA}'
- 'GOARCH=amd64'
username:
from_secret: docker_user
password:
from_secret: docker_pass
when:
event:
- push
- pull_request
- tag
- name: release-docker-image
image: plugins/docker
settings:
tags: "latest"
dockerfile: Dockerfile
repo: oliver006/es-test-data
build_args:
- 'TAG=${DRONE_TAG}'
- 'SHA1=${DRONE_COMMIT_SHA}'
- 'GOARCH=amd64'
username:
from_secret: docker_user
password:
from_secret: docker_pass
when:
event:
- push
branch:
- master