forked from ampproject/amp.dev
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
106 lines (106 loc) · 3 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
language: node_js
node_js:
- lts/*
git:
depth: 3
addons:
apt:
packages:
- expect-dev
cache:
- pip
- npm
install:
- npm ci
before_install:
- |
if [ $TRAVIS_BRANCH == "future" ] && [ $TRAVIS_PULL_REQUEST == "false" ]; then
openssl aes-256-cbc -K $encrypted_d4a09416a845_key -iv $encrypted_d4a09416a845_iv -in .staging.key.json.enc -out .staging.key.json -d
gcloud auth activate-service-account --key-file=.staging.key.json
fi
stages:
- preparation
- name: build
if: branch = future AND type != pull_request
- name: deploy
if: branch = future AND type != pull_request
jobs:
include:
- stage: preparation
env: APP_ENV=staging
name: Check code, import documents, build samples, playground & boilerplate
before_script:
- scripts/unbuffer.sh gulp buildSamples
- scripts/unbuffer.sh gulp buildComponentVersions
- scripts/unbuffer.sh npm test
script:
- if [ $TRAVIS_BRANCH == "future" ] && [ $TRAVIS_PULL_REQUEST == "false" ]; then scripts/unbuffer.sh gulp buildPrepare; fi
- stage: build
env: APP_ENV=staging
install: &1
- npm ci
- pip install grow==0.7.4 --user
name: Build Pages (EN)
script: scripts/unbuffer.sh gulp buildPages --locales en
- stage: build
env: APP_ENV=staging
install: *1
name: Build Pages (FR)
script: scripts/unbuffer.sh gulp buildPages --locales fr
- stage: build
env: APP_ENV=staging
install: *1
name: Build Pages (AR)
script: scripts/unbuffer.sh gulp buildPages --locales ar
- stage: build
env: APP_ENV=staging
install: *1
name: Build Pages (ES)
script: scripts/unbuffer.sh gulp buildPages --locales es
- stage: build
env: APP_ENV=staging
install: *1
name: Build Pages (IT)
script: scripts/unbuffer.sh gulp buildPages --locales it
- stage: build
env: APP_ENV=staging
install: *1
name: Build Pages (ID)
script: scripts/unbuffer.sh gulp buildPages --locales id
- stage: build
env: APP_ENV=staging
install: *1
name: Build Pages (JA)
script: scripts/unbuffer.sh gulp buildPages --locales ja
- stage: build
env: APP_ENV=staging
install: *1
name: Build Pages (KO)
script: scripts/unbuffer.sh gulp buildPages --locales ko
- stage: build
env: APP_ENV=staging
install: *1
name: Build Pages (BR)
script: scripts/unbuffer.sh gulp buildPages --locales pt_BR
- stage: build
env: APP_ENV=staging
install: *1
name: Build Pages (RU)
script: scripts/unbuffer.sh gulp buildPages --locales ru
- stage: build
env: APP_ENV=staging
install: *1
name: Build Pages (TR)
script: scripts/unbuffer.sh gulp buildPages --locales tr
- stage: build
env: APP_ENV=staging
install: *1
name: Build Pages (CN)
script: scripts/unbuffer.sh gulp buildPages --locales zh_CN
- stage: deploy
env: APP_ENV=staging
before_script:
- scripts/unbuffer.sh gulp buildFinalize
- scripts/unbuffer.sh npm run smoke-test
script:
- gcloud app deploy --project=amp-dev-staging --quiet --version=1