-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathcircle.yml
252 lines (225 loc) · 8.58 KB
/
circle.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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
version: 2.1
orbs:
browser-tools: circleci/browser-tools@1.4.3
jobs:
build:
working_directory: ~/technovation-girls
docker:
- image: cimg/ruby:3.1.2-browsers
auth:
username: technovationdocker
password: $DOCKERHUB_PASSWORD
environment:
ADMIN_EMAIL: info@technovationchallenge.org
AIRBRAKE_PROJECT_ID: n-a
AIRBRAKE_PROJECT_KEY: n-a
AIRBRAKE_RAILS_ENV: test
AWS_BUCKET_NAME: technovation-attachments-test
BACKGROUND_CHECK_COUNTRY_CODES: "US,IN,CA"
BING_MAPS_API_KEY: n-a
CAMPAIGN_MONITOR_API_KEY: n-a
CHAPTER_AMBASSADOR_SLACK_URL: n-a
CHAPTER_AMBASSADOR_TRAINING_CHECKPOINT_BASE_URL: "https://some/base-url"
COOKIES_AUTH_TOKEN: auth_token_JUNE_2018
COOKIES_IP_GEOLOCATION: ip_geolocation_JUNE_2018
COOKIES_LAST_PROFILE_USED: last_profile_used_JUNE_2018
COOKIES_LAST_VISITED_SUBMISSION_SECTION: last_visited_submission_section_JUNE_2018
COOKIES_REDIRECTED_FROM: redirected_from_JUNE_2018
COOKIES_SESSION_TOKEN: session_token_JUNE_2018
COOKIES_SIGNUP_EMAIL: n-a
DATES_CERTIFICATES_AVAILABLE_DAY: 20
DATES_CERTIFICATES_AVAILABLE_MONTH: 6
DATES_CERTIFICATES_AVAILABLE_YEAR: 2024
DATES_DIVISION_CUTOFF_DAY: 1
DATES_DIVISION_CUTOFF_MONTH: 8
DATES_DIVISION_CUTOFF_YEAR: 2025
DATES_LIVE_QUARTERFINALS_ENDS_DAY: 20
DATES_LIVE_QUARTERFINALS_ENDS_MONTH: 5
DATES_LIVE_QUARTERFINALS_ENDS_YEAR: 2024
DATES_MENTOR_TRAINING_DAY: 15
DATES_MENTOR_TRAINING_MONTH: 10
DATES_MENTOR_TRAINING_YEAR: 2018
DATES_NEW_SEASON_START_DAY: 1
DATES_NEW_SEASON_START_MONTH: 8
DATES_OFFICIAL_START_OF_SEASON_DAY: 1
DATES_OFFICIAL_START_OF_SEASON_MONTH: 10
DATES_OFFICIAL_START_OF_SEASON_YEAR: 2024
DATES_QUARTERFINALS_BEGINS_DAY: 27
DATES_QUARTERFINALS_BEGINS_MONTH: 4
DATES_QUARTERFINALS_BEGINS_YEAR: 2024
DATES_QUARTERFINALS_ENDS_DAY: 20
DATES_QUARTERFINALS_ENDS_MONTH: 5
DATES_QUARTERFINALS_ENDS_YEAR: 2024
DATES_REGIONAL_PITCH_EVENTS_BEGINS_DAY: 1
DATES_REGIONAL_PITCH_EVENTS_BEGINS_MONTH: 4
DATES_REGIONAL_PITCH_EVENTS_BEGINS_YEAR: 2024
DATES_REGIONAL_PITCH_EVENTS_ENDS_DAY: 1
DATES_REGIONAL_PITCH_EVENTS_ENDS_MONTH: 5
DATES_REGIONAL_PITCH_EVENTS_ENDS_YEAR: 2024
DATES_REGISTRATION_OPENS_DAY: 1
DATES_REGISTRATION_OPENS_MONTH: 10
DATES_REGISTRATION_OPENS_YEAR: 2024
DATES_RPE_OFFICIALITY_FINALIZED_DAY: 22
DATES_RPE_OFFICIALITY_FINALIZED_MONTH: 4
DATES_RPE_OFFICIALITY_FINALIZED_YEAR: 2024
DATES_SEMIFINALS_BEGINS_DAY: 1
DATES_SEMIFINALS_BEGINS_MONTH: 6
DATES_SEMIFINALS_BEGINS_YEAR: 2024
DATES_SEMIFINALS_ENDS_DAY: 17
DATES_SEMIFINALS_ENDS_MONTH: 6
DATES_SEMIFINALS_ENDS_YEAR: 2024
DATES_SUBMISSION_DEADLINE_DAY: 13
DATES_SUBMISSION_DEADLINE_MONTH: 4
DATES_SUBMISSION_DEADLINE_YEAR: 2024
DATES_TEAM_REGISTRATION_DEADLINE_DAY: 16
DATES_TEAM_REGISTRATION_DEADLINE_MONTH: 3
DATES_TEAM_REGISTRATION_DEADLINE_YEAR: 2024
DATES_VIRTUAL_QUARTERFINALS_ENDS_DAY: 20
DATES_VIRTUAL_QUARTERFINALS_ENDS_MONTH: 5
DATES_VIRTUAL_QUARTERFINALS_ENDS_YEAR: 2024
DOCUSIGN_CHAPTER_AFFILIATION_AGREEMENT_TEMPLATE_ID: n-a
DOCUSIGN_CHAPTER_VOLUNTEER_AGREEMENT_TEMPLATE_ID: n-a
DOCUSIGN_HMAC_SECRET_KEY: n-a
ENABLE_HOMEPAGE_BANNER: true
FINALISTS_URL: "https://some/url"
FILESTACK_API_KEY: n-a
GOOGLE_ANALYTICS_ID: n-a
GOOGLE_MAPS_API_KEY: n-a
GOOGLE_PLACES_API_KEY: n-a
GOOGLE_TIMEZONE_API_KEY: n-a
HELP_EMAIL: support@technovation.org
HOST_DOMAIN: localhost:31337
JUDGE_MAXIMUM_NUMBER_OF_RECUSALS: 15
JUDGE_SLACK_SIGNUP_URL: n-a
JUDGE_TRAINING_URL: n-a
ENABLE_SALESFORCE: 0
SALESFORCE_INSTANCE_URL: n-a
SALESFORCE_HOST: n-a
SALESFORCE_API_VERSION: n-a
SALESFORCE_CLIENT_ID: n-a
SALESFORCE_CLIENT_SECRET: n-a
SALESFORCE_REFRESH_TOKEN: n-a
MENTOR_SLACK_SIGNUP_URL: n-a
NEWSLETTER_URL: "https://some/other/url"
GENERAL_NEWSLETTER_URL: "https://some/general/url"
NEW_RELIC_LICENSE_KEY: n-a
PARENT_CONSENT_PDF: n-a
PDFTK_PATH: /usr/bin/pdftk
PGHOST: 127.0.0.1
PGUSER: root
RAILS_ENV: test
REDIS_URL: redis://127.0.0.1:6379/0
THUNKABLE_PROMO_IMAGE: n-a
WKHTMLTOPDF_PATH: /usr/bin/wkhtmltopdf
- image: cimg/postgres:13.7
auth:
username: technovationdocker
password: $DOCKERHUB_PASSWORD
environment:
POSTGRES_PASSWORD: $POSTGRES_PASSWORD
steps:
- checkout
- browser-tools/install-browser-tools:
chrome-version: 128.0.6613.84 # TODO: remove when chromedriver downloads are fixed
- run:
name: Install libc6
command: sudo apt install libc6
- restore_cache:
name: Restore cached gems
keys:
- v3-gem-cache-{{ checksum "Gemfile.lock" }}
- v3-gem-cache-
- restore_cache:
name: Restore cached node packages
keys:
- v1-node-packages-cache-{{ checksum "yarn.lock" }}
- v1-node-packages-cache-
- run:
name: Install PostgreSQL
command: |
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" |sudo tee /etc/apt/sources.list.d/pgdg.list
sudo apt update
sudo apt install postgresql-client-13
- run:
name: Install pdftk
command: sudo apt install pdftk
- run:
name: Install wkhtmltopdf
command: |
sudo apt update
sudo apt install wkhtmltopdf
- run:
name: Install Jest dependencies
command: sudo apt install libcairo2-dev libjpeg-dev libpango1.0-dev libgif-dev build-essential g++
- run:
name: Install gems
command: gem install bundler:2.2.23 && bundle check --path=vendor/bundle || bundle install --without development --path=vendor/bundle --jobs 4 --retry 3
- save_cache:
name: Cache gems
key: v3-gem-cache-{{ checksum "Gemfile.lock" }}
paths:
- vendor/bundle
- run:
name: Install node packages
command: yarn install --frozen-lockfile --cache-folder ~/.cache/yarn
- save_cache:
name: Cache node packages
key: v1-node-packages-cache-{{ checksum "yarn.lock" }}
paths:
- ~/.cache/yarn
- run:
name: Setup database
command: |
bundle exec rails db:create
bundle exec rails db:migrate
- run:
name: Run Javascript tests
command: yarn test --maxWorkers=1
- run:
name: Run RSpec tests
command: bundle exec rspec --order rand
- store_artifacts:
path: tmp/screenshots
- run:
name: Run setup script
command: bash .circleci/setup-heroku.sh
- add_ssh_keys:
fingerprints:
- "32:c4:d8:7f:60:e0:56:7d:e9:ee:f5:04:e1:9c:2d:4e"
- deploy:
name: Deploy Preview to Heroku
command: |
if [ "${CIRCLE_BRANCH}" == "preview" ]; then
git push --force https://heroku:$HEROKU_API_KEY@git.heroku.com/technovation-preview.git preview:master
fi
- deploy:
name: Deploy QA to Heroku
command: |
if [ "${CIRCLE_BRANCH}" == "qa" ]; then
git push https://heroku:$HEROKU_API_KEY@git.heroku.com/technovation-qa.git qa:master
fi
- deploy:
name: Deploy Production to Heroku
command: |
if [ "${CIRCLE_BRANCH}" == "production" ]; then
git push https://heroku:$HEROKU_API_KEY@git.heroku.com/technovation.git qa:master
fi
general:
branches:
ignore:
- /.*-stable/
- master
deployment:
preview:
branch: preview
heroku:
appname: technovation-preview
qa:
branch: qa
heroku:
appname: technovation-qa
prod:
branch: production
heroku:
appname: technovation