summaryrefslogtreecommitdiffhomepage
path: root/cloudbuild.yaml
diff options
context:
space:
mode:
authorIan Lewis <ianmlewis@gmail.com>2019-07-03 00:38:04 -0400
committerIan Lewis <ianlewis@google.com>2019-07-10 11:46:34 +0900
commit6714bee53bbe6cdc3943e59f30ec7765907e80b0 (patch)
tree5483dd5a678ef82a3bd1251f90471312677f8baf /cloudbuild.yaml
parent82b3d5ffd3e6448664829f65ee6efe427c615879 (diff)
Add generate-syscall-docs command.
Adds a new command to automatically generate the syscall compatibility docs from runsc.
Diffstat (limited to 'cloudbuild.yaml')
-rw-r--r--cloudbuild.yaml55
1 files changed, 51 insertions, 4 deletions
diff --git a/cloudbuild.yaml b/cloudbuild.yaml
index 25944303a..f8bf38566 100644
--- a/cloudbuild.yaml
+++ b/cloudbuild.yaml
@@ -13,15 +13,62 @@
# limitations under the License.
steps:
+ - name: 'bash'
+ args: ['bash', '-c', 'mkdir -p upstream/']
+ # Clone the upstream repos
+ - name: 'gcr.io/cloud-builders/git'
+ args: ['clone', 'https://github.com/google/gvisor.git']
+ dir: 'upstream'
+ - name: 'gcr.io/cloud-builders/git'
+ args: ['clone', 'https://gvisor.googlesource.com/community']
+ dir: 'upstream'
+ # Build runsc
+ - name: 'gcr.io/cloud-builders/bazel'
+ args:
+ - 'build'
+ - '--show_timestamps'
+ - '--test_output=errors'
+ - '--keep_going'
+ - '--verbose_failures'
+ - 'runsc'
+ dir: 'upstream/gvisor'
+ # Build the compatibility doc generator tool
+ - name: 'golang'
+ env: ['GO111MODULE=on']
+ args:
+ - 'go'
+ - 'build'
+ - '-o'
+ - 'bin/generate-syscall-docs'
+ - 'gvisor.dev/website/cmd/generate-syscall-docs'
+ # Generate compatibility docs.
+ - name: 'bash'
+ args:
+ - 'bash'
+ - '-c'
+ - >
+ ./upstream/gvisor/bazel-bin/runsc/linux_amd64_pure_stripped/runsc help syscalls -o json |
+ ./bin/generate-syscall-docs -out ./content/docs/user_guide/compatibility/
+ # Pull npm dependencies for scss
+ - name: 'gcr.io/cloud-builders/npm'
+ args: ['ci']
# Generate the website.
- name: 'gcr.io/gvisor-website/hugo:0.53'
- args: ["make"]
+ env: ['HUGO_ENV=production']
+ args: ["hugo"]
# Test the HTML for issues.
- name: 'gcr.io/gvisor-website/html-proofer:3.10.2'
- args: ["htmlproofer", "--disable-external", "--check-html", "public/static"]
+ args:
+ - "htmlproofer"
+ - "--disable-external"
+ - "--check-html"
+ - "public/static"
# Deploy to App Engine only for master branch.
- name: 'gcr.io/cloud-builders/gcloud'
entrypoint: 'bash'
- args:
+ args:
- '-c'
- - 'if [[ "$PROJECT_ID" == "gvisor-website" && "$BRANCH_NAME" == "master" ]]; then gcloud app deploy public/app.yaml; fi'
+ - >
+ if [[ "$PROJECT_ID" == "gvisor-website" && "$BRANCH_NAME" == "master" ]]; then
+ gcloud app deploy public/app.yaml;
+ fi