-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
116 lines (101 loc) · 2.17 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
---
kind: pipeline
name: default
steps:
- name: Run rspec
image: ruby:2.6.5
commands:
- gem install bundler
- bundle
- bundle exec rspec
- name: Bump and tag
image: quay.io/openware/sdk-tools:0.0.3
environment:
BRANCH_NAME: ${DRONE_BRANCH}
REPO_NAME: ${DRONE_REPO}
BOT_USERNAME: kite-bot
BOT_NAME: Kite Bot
BOT_EMAIL: [email protected]
GITHUB_API_KEY:
from_secret: kite_bot_key
commands:
- BUNDLE_GEMFILE=/sdk/Gemfile bundle exec rake --rakefile=/sdk/Rakefile release:push
when:
event:
- push
branch:
- master
trigger:
event:
- push
image_pull_secrets:
- dockerconfigjson
---
kind: pipeline
name: digitalocean-packer
steps:
- name: Build DigitalOcean Opendax image
image: appleboy/drone-packer
environment:
PKR_VAR_api_token:
from_secret: digitalocean_api_token
commands:
- packer build ./packer/do-packer.json.pkr.hcl
trigger:
event:
- push
branch:
- feature/packer
- feature/kaigara-v2
---
kind: pipeline
name: aws-packer
steps:
- name: Build AWS Opendax image
image: appleboy/drone-packer
environment:
PKR_VAR_access_key:
from_secret: aws_access_key
PKR_VAR_secret_key:
from_secret: aws_secret_key
commands:
- packer build ./packer/aws-packer.json.pkr.hcl
trigger:
event:
- push
branch:
- feature/packer
- feature/kaigara-v2
---
kind: pipeline
name: gcp-packer
steps:
- name: Create google credential
image: alpine:3.8
environment:
JSON_CREDENTIAL:
from_secret: json_credential
commands:
- echo "$JSON_CREDENTIAL" > cred.json
- name: Build GKE Opendax base image
image: hashicorp/packer
failure: ignore
environment:
PKR_VAR_account_file: cred.json
PROJECT_ID:
from_secret: project_id
commands:
- packer build -var project_id=$PROJECT_ID ./packer/gcp-image-base.json.pkr.hcl
- name: Build GKE Opendax image
image: hashicorp/packer
environment:
PKR_VAR_account_file: cred.json
PROJECT_ID:
from_secret: project_id
commands:
- packer build -var project_id=$PROJECT_ID ./packer/gcp-packer.json.pkr.hcl
trigger:
event:
- push
branch:
- feature/packer