-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathexternal.yaml
More file actions
60 lines (52 loc) · 1.85 KB
/
external.yaml
File metadata and controls
60 lines (52 loc) · 1.85 KB
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
# This builds external data, and if the site passes a basic build, writes the data to
# Cloud Storage.
timeout: 900s # set build timeout to 15 mins
steps:
- name: node:16.14.2
id: 'Install dependencies'
entrypoint: npm
args: ['ci']
- name: node:16.14.2
id: 'Build external data'
entrypoint: npm
args: ['run', 'build-external']
env:
- 'NODE_ENV=production'
- name: node:16.14.2
id: 'Create .eleventyignore file'
entrypoint: npm
args: ['run', 'ignore']
env:
# TODO: We should try to remove more stuff here, because it's supposed to
# be a fast build to sanity-check output.
# It needs to include extensions and API generation.
- 'ELEVENTY_IGNORE_NACL=true'
- name: node:16.14.2
id: 'Build eleventy in dev mode to confirm'
entrypoint: npm
env:
- 'NODE_OPTIONS="--max_old_space_size=8192"'
args: ['run', 'eleventy']
# This does NOT set `NODE_ENV=production`, as we don't need the full build.
- name: 'gcr.io/cloud-builders/gcloud'
id: 'Synchronize content to external-dcc-data bucket'
entrypoint: bash
args:
- '-c'
- |
gsutil rsync external/data/ gs://external-dcc-data
options:
env:
- 'PROJECT_ID=$PROJECT_ID'
- 'NODE_OPTIONS=--unhandled-rejections=strict'
secretEnv: ['GITHUB_APP_ID', 'GITHUB_APP_KEY', 'GITHUB_APP_INSTALLATION_ID', 'YOUTUBE_API_KEY']
availableSecrets:
secretManager:
- versionName: projects/chrome-apps-doc/secrets/GITHUB_APP_ID/versions/1
env: 'GITHUB_APP_ID'
- versionName: projects/chrome-apps-doc/secrets/GITHUB_APP_KEY/versions/4
env: 'GITHUB_APP_KEY'
- versionName: projects/chrome-apps-doc/secrets/GITHUB_APP_INSTALLATION_ID/versions/1
env: 'GITHUB_APP_INSTALLATION_ID'
- versionName: projects/chrome-apps-doc/secrets/YOUTUBE_API_KEY/versions/1
env: 'YOUTUBE_API_KEY'