forked from netbootxyz/netboot.xyz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
190 lines (184 loc) · 5.23 KB
/
.travis.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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
sudo: true
dist: bionic
language: bash
services:
- docker
env:
global:
- DEBIAN_FRONTEND="noninteractive"
jobs:
include:
- stage: test
if: type = pull_request
language: python
install:
- pip install ansible ansible-lint
- ansible-lint --version
script:
- ansible-playbook -i inventory site.yml --syntax-check
- ansible-lint -v roles/netbootxyz
- stage: development
if: branch = development AND type != pull_request
before_install:
- ./script/retrieve_certs
script:
- ./script/build_release dev
after_failure:
- ./script/message failure
deploy:
- provider: s3
edge: true
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
bucket: $BUCKET_DEV
local_dir: s3out
upload-dir: $TRAVIS_COMMIT
skip_cleanup: true
on:
branch: development
- provider: s3
edge: true
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
bucket: $BUCKET_DEV
local_dir: s3outver
skip_cleanup: true
on:
branch: development
after_deploy:
- >
if ! [ "$AFTER_DEPLOY_RUN" ]; then
export AFTER_DEPLOY_RUN=1;
./script/message dev-push
fi
- stage: pull-request
if: type = pull_request
script:
- ./script/build_release pr
- stage: release-candidate
if: branch = RC AND type != pull_request
before_install:
- ./script/retrieve_certs
script:
- ./script/build_release rc
workspaces:
create:
name: githubassets
paths:
- githubout
after_failure:
- ./script/message failure
before_deploy:
- export RELEASE_TAG=$(cat version.txt)-RC
deploy:
- provider: s3
edge: true
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
bucket: $BUCKET_STAGING
local_dir: s3out-latest
upload-dir: rc
skip_cleanup: true
on:
branch: RC
- provider: s3
edge: true
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
bucket: $BUCKET_STAGING
local_dir: s3out
upload-dir: $RELEASE_TAG
skip_cleanup: true
on:
branch: RC
- provider: s3
edge: true
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
bucket: $BUCKET_STAGING
local_dir: s3outver
skip_cleanup: true
on:
branch: RC
- stage: rc-github
if: branch = RC AND type != pull_request
before_install:
- ./script/pre_install
workspaces:
use: githubassets
script: skip
before_deploy:
- export RELEASE_TAG=$(cat version.txt)-RC
- ./script/tag
deploy:
- provider: releases
api_key: $GITHUB_TOKEN
file_glob: true
file: githubout/*
name: $RELEASE_TAG
prerelease: true
skip_cleanup: true
on:
branch: RC
after_deploy:
- aws configure set preview.cloudfront true
- aws cloudfront create-invalidation --distribution-id $CLOUDFRONT_DIST_ID_STAGING --paths "rc/*" "rc/ipxe/*"
- ./script/message rc-push
- stage: release
if: branch = master AND type != pull_request
before_install:
- ./script/retrieve_certs
script:
- ./script/build_release release
workspaces:
create:
name: githubassets
paths:
- githubout
after_failure:
- ./script/message failure
before_deploy:
- export RELEASE_TAG=$(cat version.txt)
deploy:
- provider: s3
edge: true
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
bucket: $BUCKET_PROD
local_dir: s3out-latest
skip_cleanup: true
on:
branch: master
- provider: s3
edge: true
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
bucket: $BUCKET_PROD
local_dir: s3out
upload-dir: $RELEASE_TAG
skip_cleanup: true
on:
branch: master
- stage: release-github
if: branch = master AND type != pull_request
before_install:
- ./script/pre_install
workspaces:
use: githubassets
script: skip
before_deploy:
- export RELEASE_TAG=$(cat version.txt)
- git tag ${RELEASE_TAG}
deploy:
- provider: releases
api_key: $GITHUB_TOKEN
file_glob: true
file: githubout/*
name: $RELEASE_TAG
skip_cleanup: true
on:
branch: master
after_deploy:
- aws configure set preview.cloudfront true
- aws cloudfront create-invalidation --distribution-id $CLOUDFRONT_DIST_ID_PROD --paths "/*" "/ipxe/*"
- ./script/message live-push