cmd/govulncheck: adds basic setup for integration testing

This change adds the main component stubs for integration testing

- integration_test.sh: script that will be eventually executed by kokoro
- Dockerfile: Docker image that integration_test.sh builds and executes
- integration_run.sh: script executed within Docker image that will
  perform actual integration checks

The Docker image clones the copy of the vuln/ repo and builds govulncheck.
integration_run.sh executes govulncheck (on selected projects in the
follow-up CLs).

Change-Id: If37c24ed04a695f059d054edc29055043e0d93ec
Reviewed-on: https://go-review.googlesource.com/c/vuln/+/400414
Run-TryBot: Zvonimir Pavlinovic <zpavlinovic@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
diff --git a/cmd/govulncheck/integration/Dockerfile b/cmd/govulncheck/integration/Dockerfile
new file mode 100644
index 0000000..7367fca
--- /dev/null
+++ b/cmd/govulncheck/integration/Dockerfile
@@ -0,0 +1,12 @@
+FROM golang:1.18-alpine
+
+# This Dockerfile sets up an image for repeated integration testing.
+# This assumes the build context, i.e., CWD is vuln/
+
+# ---- Step 0: Setup shared build tools. ----
+RUN apk update && apk add bash git
+
+# ---- Step 1: Build govulncheck ----
+COPY . /go/src/golang.org/x/vuln
+WORKDIR /go/src/golang.org/x/vuln/cmd/govulncheck/integration
+RUN go install golang.org/x/vuln/cmd/govulncheck
diff --git a/cmd/govulncheck/integration/integration_run.sh b/cmd/govulncheck/integration/integration_run.sh
new file mode 100755
index 0000000..887c714
--- /dev/null
+++ b/cmd/govulncheck/integration/integration_run.sh
@@ -0,0 +1,7 @@
+#!/bin/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.
+
+# TODO(zpavlinovic): add integration checks
+govulncheck -h
diff --git a/cmd/govulncheck/integration/integration_test.sh b/cmd/govulncheck/integration/integration_test.sh
new file mode 100755
index 0000000..2761b12
--- /dev/null
+++ b/cmd/govulncheck/integration/integration_test.sh
@@ -0,0 +1,15 @@
+#!/bin/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.
+
+# Runs the integration tests for whole program analysis.
+# Assumes this is run from vuln/cmd/govulncheck/integration
+
+echo "Building govulncheck docker image"
+# The building context is vuln/ so we can have the current
+# version of both govulncheck and its vuln dependencies
+docker build -f Dockerfile -t govulncheck-integration ../../../
+
+echo "Running govulncheck integration tests in the docker image"
+docker run govulncheck-integration ./integration_run.sh