Basic automation for publishing documentation

This commit is contained in:
Ilya Dmitrichenko committed 2015-04-27 17:46:34 +01:00
1 parent e45ea65e45
commit 6bc601bbfc
6 files changed
+54

No files matched your search

+10
View File
@@ -3,6 +3,9 @@ sudo: false
go:
- 1.4
env:
- PATH="${PATH}:${HOME}/.local/bin"
addons:
apt:
packages:
@@ -11,6 +14,11 @@ addons:
install:
- go clean -i net
- go install -tags netgo std
- pip install --user --upgrade gcloud gsutil
- openssl aes-256-cbc
-K $encrypted_5ba036e89377_key -iv $encrypted_5ba036e89377_iv
-in bin/setup-ci-secrets.enc -out bin/setup-ci-secrets -d
- chmod +x bin/setup-ci-secrets
- make travis
script:
@@ -20,3 +28,5 @@ script:
after_success:
- go get github.com/mattn/goveralls
- $HOME/gopath/bin/goveralls -coverprofile=profile.cov -service=travis-ci
- bin/setup-ci-secrets
- site/build-and-publish.sh
Binary file not shown.
+21
View File
@@ -0,0 +1,21 @@
This is the shape of unencrypted `setup-ci-secrets`
cat > /tmp/boto_gsutil_cert.pem << EOF
-----BEGIN PRIVATE KEY-----
<...>
-----END PRIVATE KEY-----
EOF
cat > ~/.boto << EOF
[Credentials]
gs_service_client_id = <...>
gs_service_key_file = /tmp/boto_gsutil_cert.pem
[Boto]
https_validate_certificates = True
[GSUtil]
content_language = en
default_api_version = 2
default_project_id = <...>
EOF
+3
View File
@@ -0,0 +1,3 @@
source 'https://rubygems.org'
gem 'jekyll'
+6
View File
@@ -2,3 +2,9 @@ markdown: redcarpet
redcarpet:
extensions: ['fenced_code_blocks', 'smart']
exclude:
- 'Gemfile'
- 'Gemfile.lock'
- 'params.json'
- 'build-and-publish.sh'
+14
View File
@@ -0,0 +1,14 @@
#!/bin/sh -ex
cd $(dirname $0)/
## Use GCS until we set up Route53/CloudFront/S3
BRANCH=${TRAVIS_BRANCH:-`git rev-parse --abbrev-ref @`}
COMMIT=${TRAVIS_COMMIT:-`git rev-parse @`}
export BRANCH COMMIT
bundle install --path=.bundle
bundle exec jekyll build --verbose
gsutil -m cp -z html,css -a public-read -R _site gs://docs.weave.works/weave/${BRANCH}/${COMMIT}