From dd70b18ea8da90ea9bcc440050d03fbbfe61fec2 Mon Sep 17 00:00:00 2001 From: Julie Qiu Date: Tue, 1 Feb 2022 11:54:04 -0500 Subject: [PATCH] deploy: add README.md and kokoro.sh A README is added to the deploy/ directory to explain what the files are in that directory. The contents of the internal kokoro/vulndb/dbdiff/buid.sh file is copied to deploy/kokoro.sh to make it easier to make modifications to the kokoro config. Change-Id: I62e829aa881729837e7adb56eaacc4f7e6618713 Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/382194 Trust: Julie Qiu Run-TryBot: Julie Qiu TryBot-Result: Gopher Robot Reviewed-by: Jonathan Amsterdam --- deploy/README.md | 15 +++++++++++++++ deploy/kokoro.sh | 17 +++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 deploy/README.md create mode 100644 deploy/kokoro.sh diff --git a/deploy/README.md b/deploy/README.md new file mode 100644 index 00000000..e5444d21 --- /dev/null +++ b/deploy/README.md @@ -0,0 +1,15 @@ +# Deploy + +The Go vulndb project is hosted on GCP and uses a continuous integration +service called “Kokoro” for running tests. + +This directory contains files used for kokoro test job configurations and for +building and deploying the vulnerability database and worker. +(Additional job definitions live in an internal repository). + +`kokoro.sh` acts as the entry point for scripts to be run via kokoro. + +`build.yaml` and `gcp-deploy.sh` are used to deploy the vulnerability database +GCS bucket. + +`worker.yaml` is used to build the vulnerability database worker. diff --git a/deploy/kokoro.sh b/deploy/kokoro.sh new file mode 100644 index 00000000..974106b8 --- /dev/null +++ b/deploy/kokoro.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +# Copyright 2022 The Go Authors. All rights reserved. +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. + +set -e + +mkdir old-db +gsutil -m cp -r gs://go-vulndb/* old-db + +go install golang.org/x/vulndb/cmd/gendb@latest +go install golang.org/x/vulndb/cmd/dbdiff@latest + +export PATH=$PATH:$GOPATH/bin + +gendb -reports reports -out new-db +dbdiff old-db new-db