Skip to content

Commit

Permalink
deploy: add Validate step to deploy script
Browse files Browse the repository at this point in the history
Adds two steps, CopyExisting and Validate to the vulndb deploy script,
to ensure that the existing and new databases are valid internally
and with respect to each other. Deploy will not proceed if validation
fails.

For golang/go#56417

Change-Id: I9c522cfb9e3f66f3538d9bc9c89f927692f2c96e
Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/452771
Run-TryBot: Tatiana Bradley <[email protected]>
Reviewed-by: Jonathan Amsterdam <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Reviewed-by: Damien Neil <[email protected]>
  • Loading branch information
tatianab authored and Tatiana Bradley committed Nov 28, 2022
1 parent f983c1a commit 8622df3
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions deploy/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,20 @@ steps:
entrypoint: bash
args: ["-c", "go run ./cmd/gendb -out /workspace/db"]

- id: CopyExisting
name: gcr.io/cloud-builders/gsutil
entrypoint: bash
args:
- -e
- gsutil -q -m cp -r gs://go-vulndb /workspace

- id: Validate
name: golang:1.19.2
entrypoint: bash
args:
- -c
- go run ./cmd/checkdeploy -new /workspace/db -existing /workspace/go-vulndb

- id: Deploy
name: gcr.io/cloud-builders/gsutil
entrypoint: bash
Expand Down

0 comments on commit 8622df3

Please sign in to comment.