Skip to content

Commit

Permalink
🚑 Fix various build related errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasrohmer committed Jul 12, 2019
1 parent 3e6aa28 commit 70b7658
Show file tree
Hide file tree
Showing 266 changed files with 346 additions and 294 deletions.
38 changes: 21 additions & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ node_js:
- lts/*
git:
depth: 3
addons:
apt:
packages:
- expect-dev
cache:
- pip
- npm
Expand All @@ -26,74 +30,74 @@ jobs:
env: APP_ENV=staging
name: Check code, import documents, build samples, playground & boilerplate
before_script:
- gulp buildSamples
- gulp lintAll
- scripts/unbuffer.sh gulp buildSamples
- scripts/unbuffer.sh gulp lintAll
script:
- if [ $TRAVIS_BRANCH == "future" ] && [ $TRAVIS_PULL_REQUEST == "false" ]; then gulp buildPrepare; fi
- 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.8.7 --user
- pip install grow==0.7.4 --user
name: Build Pages (EN)
script: gulp buildPages --locales en
script: scripts/unbuffer.sh gulp buildPages --locales en
- stage: build
env: APP_ENV=staging
install: *1
name: Build Pages (FR)
script: gulp buildPages --locales fr
script: scripts/unbuffer.sh gulp buildPages --locales fr
- stage: build
env: APP_ENV=staging
install: *1
name: Build Pages (AR)
script: gulp buildPages --locales ar
script: scripts/unbuffer.sh gulp buildPages --locales ar
- stage: build
env: APP_ENV=staging
install: *1
name: Build Pages (ES)
script: gulp buildPages --locales es
script: scripts/unbuffer.sh gulp buildPages --locales es
- stage: build
env: APP_ENV=staging
install: *1
name: Build Pages (IT)
script: gulp buildPages --locales it
script: scripts/unbuffer.sh gulp buildPages --locales it
- stage: build
env: APP_ENV=staging
install: *1
name: Build Pages (ID)
script: gulp buildPages --locales id
script: scripts/unbuffer.sh gulp buildPages --locales id
- stage: build
env: APP_ENV=staging
install: *1
name: Build Pages (JA)
script: gulp buildPages --locales ja
script: scripts/unbuffer.sh gulp buildPages --locales ja
- stage: build
env: APP_ENV=staging
install: *1
name: Build Pages (KO)
script: gulp buildPages --locales ko
script: scripts/unbuffer.sh gulp buildPages --locales ko
- stage: build
env: APP_ENV=staging
install: *1
name: Build Pages (BR)
script: gulp buildPages --locales pt_BR
script: scripts/unbuffer.sh gulp buildPages --locales pt_BR
- stage: build
env: APP_ENV=staging
install: *1
name: Build Pages (RU)
script: gulp buildPages --locales ru
script: scripts/unbuffer.sh gulp buildPages --locales ru
- stage: build
env: APP_ENV=staging
install: *1
name: Build Pages (TR)
script: gulp buildPages --locales tr
script: scripts/unbuffer.sh gulp buildPages --locales tr
- stage: build
env: APP_ENV=staging
install: *1
name: Build Pages (CN)
script: gulp buildPages --locales zh_CN
script: scripts/unbuffer.sh gulp buildPages --locales zh_CN
- stage: deploy
env: APP_ENV=staging
script:
- gulp buildFinalize
- scripts/unbuffer.sh gulp buildFinalize
- gcloud app deploy --project=amp-dev-staging --quiet
20 changes: 16 additions & 4 deletions gulpfile.js/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ const TRAVIS_GCS_PATH = 'gs://amp-dev-ci/travis/';
// Path of the grow test pages for filtering in the grow podspec.yaml
const TEST_CONTENT_PATH_REGEX = '^/tests/';


/**
* Cleans all directories/files that get created by any of the following
* tasks
Expand Down Expand Up @@ -230,8 +229,14 @@ async function fetchArtifacts() {
await sh('mkdir -p build');
if (travis.onTravis() || config.options['travis-build']) {
const buildNumber = config.options['travis-build'] || travis.build.number;
await sh(`gsutil cp -r ${TRAVIS_GCS_PATH}${buildNumber} ${project.paths.BUILD}`);
await sh('find build -type f -exec tar xf {} \;');
try {
await sh(`gsutil cp -r ${TRAVIS_GCS_PATH}${buildNumber} ${project.paths.BUILD}`);
await sh('find build -type f -exec tar xf {} \;');
} catch(e) {
// If fetching the pages fails, force exit here to make sure
// especially Travis gets the correct exit code
process.exit(1);
}
}
}

Expand All @@ -252,7 +257,14 @@ async function buildPages(done) {
options.ignore_paths = TEST_CONTENT_PATH_REGEX;
}
config.configureGrow(options);
await grow('deploy --noconfirm --threaded');

try {
await grow('deploy --noconfirm --threaded');
} catch(e) {
// If building the pages fails, force exit here to make sure
// especially Travis gets the correct exit code
process.exit(1);
}
}, transformPages,
// eslint-disable-next-line prefer-arrow-callback
function sharedPages() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ teaser:
platform.
---

<!---
<!--
Copyright 2017 The AMP HTML Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ teaser:
---


<!---
<!--
Copyright 2017 The AMP HTML Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ teaser:
---


<!---
<!--
Copyright 2017 The AMP HTML Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ teaser:
---


<!---
<!--
Copyright 2017 The AMP HTML Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ teaser:
---


<!---
<!--
Copyright 2017 The AMP HTML Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ teaser:
---


<!---
<!--
Copyright 2017 The AMP HTML Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ teaser:
text: 게시자가 LaterPay 소액결제 플랫폼과 손쉽게 통합할 수 있습니다.
---

<!---
<!--
Copyright 2017 The AMP HTML Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ teaser:
---


<!---
<!--
Copyright 2017 The AMP HTML Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ teaser:
text: Позволяет издателям легко обеспечивать интеграцию с платформой для микроплатежей LaterPay
---

<!---
<!--
Copyright 2017 The AMP HTML Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ teaser:
---


<!---
<!--
Copyright 2017 The AMP HTML Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ teaser:
---


<!---
<!--
Copyright 2017 The AMP HTML Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ AMP Access أو "إتاحة الاشتراك ونظام حظر الاشتراك
# amp-access


<!---
<!--
Copyright 2015 The AMP HTML Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ AMP Access, que proporciona un muro de pago de AMP y asistencia con la suscripc



<!---
<!--
Copyright 2015 The AMP HTML Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ AMP Access ou "gestion des abonnements et des paywalls AMP" permet aux éditeu



<!---
<!--
Copyright 2015 The AMP HTML Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ AMP Access atau “dukungan paywall dan langganan AMP” memberi Penayang kontro



<!---
<!--
Copyright 2015 The AMP HTML Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ L'Accesso AMP o il "supporto per l'abbonamento e il paywall AMP" offrono ai publ



<!---
<!--
Copyright 2015 The AMP HTML Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ teaser:



<!---
<!--
Copyright 2015 The AMP HTML Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ AMP 액세스 또는 'AMP 페이월 및 구독 지원'을 통해 게시자는



<!---
<!--
Copyright 2015 The AMP HTML Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ O AMP Access ou "paywall AMP e compatibilidade com assinaturas" oferece aos edit



<!---
<!--
Copyright 2015 The AMP HTML Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ teaser:

# amp-access

<!---
<!--
Copyright 2015 The AMP HTML Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ AMP Access veya "AMP ödeme duvarı ve abonelik desteği", Yayıncılara, abonel
# amp-access


<!---
<!--
Copyright 2015 The AMP HTML Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ teaser:



<!---
<!--
Copyright 2015 The AMP HTML Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ teaser:
---


<!---
<!--
Copyright 2016 The AMP HTML Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ teaser:
---


<!---
<!--
Copyright 2016 The AMP HTML Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ teaser:
---


<!---
<!--
Copyright 2016 The AMP HTML Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ teaser:
---


<!---
<!--
Copyright 2016 The AMP HTML Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ teaser:
---


<!---
<!--
Copyright 2016 The AMP HTML Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ teaser:
---


<!---
<!--
Copyright 2016 The AMP HTML Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Loading

0 comments on commit 70b7658

Please sign in to comment.