Basic automation for publishing documentation
This commit is contained in:
1 parent
e45ea65e45
commit
6bc601bbfc
6 files changed
+54
No files matched your search
+10
@@ -3,6 +3,9 @@ sudo: false
|
|||||||
go:
|
go:
|
||||||
- 1.4
|
- 1.4
|
||||||
|
|
||||||
|
env:
|
||||||
|
- PATH="${PATH}:${HOME}/.local/bin"
|
||||||
|
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
@@ -11,6 +14,11 @@ addons:
|
|||||||
install:
|
install:
|
||||||
- go clean -i net
|
- go clean -i net
|
||||||
- go install -tags netgo std
|
- 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
|
- make travis
|
||||||
|
|
||||||
script:
|
script:
|
||||||
@@ -20,3 +28,5 @@ script:
|
|||||||
after_success:
|
after_success:
|
||||||
- go get github.com/mattn/goveralls
|
- go get github.com/mattn/goveralls
|
||||||
- $HOME/gopath/bin/goveralls -coverprofile=profile.cov -service=travis-ci
|
- $HOME/gopath/bin/goveralls -coverprofile=profile.cov -service=travis-ci
|
||||||
|
- bin/setup-ci-secrets
|
||||||
|
- site/build-and-publish.sh
|
||||||
Binary file not shown.
@@ -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
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
source 'https://rubygems.org'
|
||||||
|
|
||||||
|
gem 'jekyll'
|
||||||
@@ -2,3 +2,9 @@ markdown: redcarpet
|
|||||||
|
|
||||||
redcarpet:
|
redcarpet:
|
||||||
extensions: ['fenced_code_blocks', 'smart']
|
extensions: ['fenced_code_blocks', 'smart']
|
||||||
|
|
||||||
|
exclude:
|
||||||
|
- 'Gemfile'
|
||||||
|
- 'Gemfile.lock'
|
||||||
|
- 'params.json'
|
||||||
|
- 'build-and-publish.sh'
|
||||||
Executable
+14
@@ -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}
|
||||||
Reference in new issue
Block a user