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