Skip to content

Commit 50ab7b8

Browse files
author
critzo
authored
automated builds publishing to GCS bucket for sandbox, staging (#449)
* updated url * testing updates to travis build * testing updates to travis build * testing updates to travis build * testing updates to travis build * testing build without notebooks support * testing build without notebooks support * testing build with travischecks disabled * remove observatory from travis-checks, uncommented script * testing with latest ruby * testing script deploy to GCE VM since dpl SSL digest issue is unresolved upstream, blocking deployment to the 'gcs' provider * removed because we don't need this * testing script inline versus external file * removed scripts dir, added ssh key to specific location & added it using ssh-add * wrong path for input file * correct spelling of deploy key filename * correct path to deploy key * GCE VMs don't allow root login * testing deploy key * use travis user for deploy * adjusted remote command to copy new site files * added staging deployment to travis, renamed deploy keys * added mlab travis submodule to reuse common functions like gsutil, service accounts, etc. * use travis to deploy sandbox build to GCS * added skip_cleanup * use recursive flag * remove some extraneous comments no longer needed * updated path for travis checkout * changed repo name, removed link to openwrt since it was down * test fix for build error * test fix for build error * possible fix for unbound variable error * debugging deploy script * debugging deploy script * debugging deploy script * debugging deploy script * (3) debugging deploy script * corrected travis linting errors * (4) debugging deploy script * (5) debugging deploy script * activate saging service account if statement * corrected issue with if statement syntax * service account credentials don't seem to be available in the deploy: section. Move here to test * update script to deploy, add build site command, add staging deploy script * testing gsutil without if logic * revereted to retest with deploy plugin. * only include sandbox service account activation for testing * service account is not recognized in deploy section? * testing deploy without if statement, added gcloud config list to confirm what account is active * specifying service account names explicitly * test without if logic * enclosing build command in quotes * testing download of service account key file * testing download of service account key file * debugging travis scripts and interaction with GCP * added if logic back, reset service accounts manually, regenerated * testing changes to deployment script * moved staging build commands to the deploy area * test * updated link * exclude travis, ndt from build * remove AWS related items, added stub for production deploy * added notebooks support back * added missing noteboooks * updates based on review
1 parent 64bf690 commit 50ab7b8

File tree

10 files changed

+61
-59
lines changed

10 files changed

+61
-59
lines changed

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ coverage
1616
_config-deploy.yml
1717
_config-deploy.ymle
1818
js/app.js
19-
_cf_s3_invalidator.yml
2019
.vagrant
2120
ubuntu-xenial-16.04-cloudimg-console.log
2221
.jekyll-metadata
23-
22+
_cf_s3_invalidator.yml
23+
_staging_deploy_key
24+
_sandbox_deploy_key

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@
44
[submodule "ndt"]
55
path = ndt
66
url = https://github.com/m-lab/ndt
7+
[submodule "travis"]
8+
path = travis
9+
url = https://github.com/m-lab/travis.git

.travis.yml

Lines changed: 44 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,48 @@
1+
dist: xenial
12
language: ruby
2-
rvm:
3-
- 2.4.1
4-
script:
5-
- ./_tests/travis-checks --quick
3+
64
env:
75
global:
8-
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true # speeds up installation of html-proofer
6+
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true
7+
8+
script:
9+
- set -e
10+
- $TRAVIS_BUILD_DIR/travis/install_gcloud.sh
11+
- sudo apt-get install -y python3-pip
12+
- sudo python3 -m pip install --upgrade setuptools pip
13+
- sudo python3 -m pip install jupyter nbconvert
14+
- "./_tests/travis-checks --quick"
15+
916
deploy:
10-
- provider: s3
11-
access_key_id: AKIAIRWAFHZDDWJ37X5A
12-
secret_access_key:
13-
secure: BlXQIyq/lHCHPGX5YUasTGWHkoL32lZHYG/n1yLBjniht2AKPWBnbQ+oWLJt2d28xZksXaDYQ02rh8lWted0SKhqYUN6dcmrXu8rVwcqpqgihUZsC1yqO4qGZ2qGkeQ2X0+HSKIBJ5VUKrMJiS3YK+N/W00/f9FatrSGvr8HBKSWpKpDiHq7z5kx/ab5Aae0hGyN1Ux6I7jTkYDI6oi9gQFJgv4oMKUt11SVMqnBNXoeOvDnIIkJqSf0hKuSZpeEDoX1FDlEaC/NR11ASlPj1ev+mxuNi1S1WTYFka7tB7piD9TQTv0PxjU+t4+TaH9jkd35eGUW1VeKPrdBtsK2TnCM6zYuM7/4U2i/7ZHf4bRVG8UkL+h32K25b24SQIyJddAzvrz8cM2/TLpqid+xdvay2Ax5T3acsxQhBq+vXVwohhl2q3fu9o6o6Bh8SGnn7XSK3JxE9Z3e8Uqg9JV3Pmgz8VyeYCwjuaV5lyabujQAn6sX8rw0RQ2A35bvQjAkNDiLUsmmOQBuRnnmS6fxeYDWf1D/h+6V0TWqPFQLTNBCjYt7WBDyTAU6i71c8ZDSay2CqVca0djxzXJHuqys5q4gRqXpLkuOiJUJMR8s5NhgQAI6bSCkgsJ/EcJqpSIwI72W+NgBb0I31KeREJXO5UlNmTa7RBFSX02KE23ut/E=
14-
bucket: www-measurementlab-net
15-
skip_cleanup: true
16-
local_dir: _site
17-
on:
18-
repo: m-lab/m-lab.github.io
19-
tags: true
20-
- provider: gcs
21-
access_key_id: GOOGWS5RSVP6RJ3HGCQWGFZG
22-
secret_access_key:
23-
secure: pdKctNlM2bfEzyFBi9Rr6BYua8hWXsyzUDm5WI4Alr06qLmp1zFNcPymKcihgoE8k2vr85B4BN8HYpUPvPPpzb/KlAZAuUjbKGH0hIklBN4+G+ldt2IBN+2YxYYKYu3bXjKJ5yQOHKCBVU/CR3O6UB+Llp3Ty42OCa71WDfsG2aW6EHGkWV1TljXl3fGVerPfcNeyigIFZ6Qz2Vy0Ay+hzXEZBxjLjUsrWbK5aM6PX7OuErBzKk/kFTlQNkuRQdJs7nS4Y+Pxjyjr6NVd0wjFGqtP+sLjC9hvNaaCHdQ46kA24BqNWwNq1c3++9/0NrEj2MbRrAWNrEcSDskX+XJdV+wantzJ0xQAdqgYUugLj+TSYTKTxrPnwy9WGcWxsfdlrrlnysWVDc1OpQgtXNtU66qwgsjflsOijNeV/XBhR4bOifhRJ80VcQ6KyDWwIAKcJbU8prkMAqr1SqyVbw35gH6ZfHxBcf1CYCEoCGlVn00QPyEQDBkSCFzQC8coSZStGGnxGaebHomxMiOsowM4JIZqjB3RWg+Gf5S6dAZZUQTHoYHAU02Kil+wHmYWEcJ+3eb/FWtNokeZRX3zNCKncBAaZWef+JzMuEtcq67cio/io3z9yglVcWpZz/xGSMOTOVIbHwFIjyzO8cSvp6IWLrlq8MJOge5u0ADgi0rMAE=
24-
bucket: website.mlab-staging.measurementlab.net
25-
skip_cleanup: true
26-
local_dir: _site
27-
on:
28-
repo: m-lab/m-lab.github.io
29-
all_branches: true
30-
condition: $TRAVIS_BRANCH == master && $TRAVIS_EVENT_TYPE == push
31-
- provider: gcs
32-
access_key_id: GOOGTVZEKZMTGZSV27YKVWP3
33-
secret_access_key:
34-
secure: "YjvtwOWEVSJ1qC7gx9ABM0z0BcHf2IVpeSTzLzykZ5y6s2nTXBNOccC2b2dri7zRqen5sLxsB6cXqC5+X764NE1H/pG37EyU27AS3sRzJzdl+NAYfXujd77bByhS+PY2Rk2IndhGNv2b6xFGwqYUprqhEEit+mBLuHWDRkK3eVVDkNd8r0AsML/imT3UNYwXXThgKr9jAGDPrxUX39KNWWtFn0goU96qfEh7jncChu9/JteDxcBn18AFJE/4pRSPibBFNZoels5TKG5ISyyff6N0s+zVtbqXcDnCY2yMl4LL66z8L9x7c7loXz1txoz38jvxW3bvQM/asrWPwMpXYfw/MJ1F1pNP0aqKcaLDlZ5Ow88wJpGxY6C3laBWUBKXp6u+sew1uLtybfClgGc/Ma3s3LjwzdfJjvmzWPbQT9tTKiVtJ+17VSmxMRMWpksYWEuCy+iySLLmwMaK7A9gfVYP6yqIm5Z0S6oBQqCk0y20TGkY9IRJ/HvXt4JbZi+rgLAWP8lKFt7V2ATrbCzjcllp9VzgsYNqxeqsuGFLYv5CChUMcC+lZe8O6YTzKi272DAGb8DItJDXcHu1pGHMx1nI8ihECWXMnEri0EpsKGvi4kT9BM++23j0ZlZ+F6Mr7vdmXKUL5YrxNIWmvXc+Xu7pVF1+31pkteyORVKKBKI="
35-
bucket: website.mlab-sandbox.measurementlab.net
36-
skip_cleanup: true
37-
local_dir: _site
38-
on:
39-
repo: m-lab/m-lab.github.io
40-
all_branches: true
41-
condition: $TRAVIS_BRANCH == sandbox-* && $TRAVIS_EVENT_TYPE == push
42-
before_install:
43-
# The Amazon AWS credentials needed by the cf-s3-inv utility in after_success
44-
# are stored in a file encrypted with the Travis keys associated with this
45-
# repository. The openssl command descrypts this file, using some secure
46-
# environment variables associated with the Travis account/repo. See
47-
# README.md for information on generating this encrypted file.
48-
- if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_EVENT_TYPE" != "cron" ]; then openssl aes-256-cbc -K $encrypted_69b240b11ca3_key -iv $encrypted_69b240b11ca3_iv -in _cf_s3_invalidator.yml.enc -out _cf_s3_invalidator.yml -d; fi
49-
- sudo apt-get install -y python3-pip
50-
- sudo python3 -m pip install --upgrade setuptools pip
51-
- sudo python3 -m pip install jupyter nbconvert
52-
after_deploy:
53-
# Only invalidate CloudFront cache if this on the master branch and is not a PR
54-
if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_EVENT_TYPE" != "cron" ]; then
55-
cf-s3-inv || travis_terminate 1;
56-
fi
17+
# Separate deployments to various places based on branch and push type
18+
## - sandbox
19+
- provider: script
20+
skip_cleanup: true
21+
script:
22+
$TRAVIS_BUILD_DIR/travis/activate_service_account.sh SERVICE_ACCOUNT_mlab_sandbox
23+
&& gsutil cp -r $TRAVIS_BUILD_DIR/_site/* gs://website.mlab-sandbox.measurementlab.net/
24+
on:
25+
repo: m-lab/website
26+
all_branches: true
27+
condition: "$TRAVIS_BRANCH == sandbox-* && $TRAVIS_EVENT_TYPE == push"
28+
29+
## - staging
30+
- provider: script
31+
skip_cleanup: true
32+
script:
33+
$TRAVIS_BUILD_DIR/travis/activate_service_account.sh SERVICE_ACCOUNT_mlab_staging
34+
&& gsutil cp -r $TRAVIS_BUILD_DIR/_site/* gs://website.mlab-staging.measurementlab.net/
35+
on:
36+
repo: m-lab/website
37+
all_branches: true
38+
condition: "$TRAVIS_BRANCH == master && $TRAVIS_EVENT_TYPE == push"
39+
40+
## - production
41+
#- provider: script
42+
# script:
43+
# $TRAVIS_BUILD_DIR/travis/activate_service_account.sh SERVICE_ACCOUNT_mlab_oti
44+
# && gsutil cp -r $TRAVIS_BUILD_DIR/_site/* gs://website.mlab-oit.measurementlab.net/
45+
# skip_cleanup: true
46+
# on:
47+
# repo: m-lab/website
48+
# tags: true

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@ gem 'html-proofer', '3.0.5'
1111
gem 'mdl', '0.3.1'
1212
gem 'cf-s3-invalidator'
1313
gem 'jekyll-jupyter-notebook'
14+
gem 'openssl'
15+
gem 'jekyll-jupyter-notebook'

_cf_s3_invalidator.yml.enc

-128 Bytes
Binary file not shown.

_config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ exclude:
2626
- README.md
2727
- Gemfile
2828
- Gemfile.lock
29+
- _scripts
2930
- vendor
31+
- travis
32+
- ndt
3033

3134
# Markdown settings
3235
markdown: kramdown

_pages/tests/bismark.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ breadcrumb: tests
77

88
# BISmark
99

10-
BISmark is an [OpenWRT](http://openwrt.org){:target="_blank"}-based platform that measures Internet service provider (ISP) performance and traffic inside home networks. BISmark takes the place of your home router, performing all of your router's normal functions in addition to periodic network performance measurements. BISmark users gain access to a personalized dashboard showing performance over time and comparing performance across ISPs and regions.
10+
BISmark is an OpenWRT-based (http://openwrt.org) platform that measures Internet service provider (ISP) performance and traffic inside home networks. BISmark takes the place of your home router, performing all of your router's normal functions in addition to periodic network performance measurements. BISmark users gain access to a personalized dashboard showing performance over time and comparing performance across ISPs and regions.
1111

1212
[Apply to host a BISmark gateway](http://projectbismark.net/){:target="_blank"}
1313

_pages/who.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ grid-section:
88
group-list-class: "l-grid l-3col"
99
grid-img-class: " framed"
1010
grid-items:
11-
- link: "http://www.netflix.com/"
11+
- link: "https://www.netflix.com/"
1212
image: "jeff-w-boote.png"
1313
heading: "Jeff W. Boote"
1414
desc: "Netflix"
15-
- link: "https://www.newamerica.org/our-people/georgia-bullen/"
15+
- link: "https://simplysecure.org/who-we-are/georgia.html"
1616
image: "georgia-bullen.png"
1717
heading: "Georgia Bullen"
18-
desc: "New America / Open Technology Institute"
18+
desc: "Simply Secure"
1919
- link: "http://research.google.com/pubs/author32412.html"
2020
image: "vint-cerf.png"
2121
heading: "Vint Cerf"

_tests/travis-checks

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ fi
2828

2929
# Run HTMLProofer
3030
bundle exec jekyll build --config _config-deploy.yml
31-
bundle exec htmlproofer ./_site --only-4xx --check-html --file-ignore "/mlab_observatory/","/ndt/" "$htmlproofer_args_extra"
31+
bundle exec htmlproofer ./_site --only-4xx --check-html --file-ignore "/ndt/" "$htmlproofer_args_extra"

travis

Submodule travis added at b64dca6

0 commit comments

Comments
 (0)