Add all dependencies for Kubernetes worker
Adds Kubelet, CNI plugins, containerd, runc and gVisor using a
pre-baked list of dependencies generated using scripts/gazelle-deps/sh.
This moves all dependencies of gVisor, Kubernetes, runc, etc into the
same 'namespace' of Bazel external repositories, giving us ease of
accessing code as libraries, and benefits when it comes to version
auditing.
The gazelle-deps.sh script is a temporary solution that will be replaced
ASAP, see T725.
This unblocks T486.
This is an alternative to D389.
Test Plan: `bazel build //core:image` runs and picks up the new binaries
X-Origin-Diff: phab/D487
GitOrigin-RevId: a28a25071fa2ae76b272d237ce9af777485065ff
diff --git a/build/print-workspace-status.sh b/build/print-workspace-status.sh
new file mode 100755
index 0000000..65bcae8
--- /dev/null
+++ b/build/print-workspace-status.sh
@@ -0,0 +1,29 @@
+#!/usr/bin/env bash
+
+# Workspace status used for build stamping.
+# This is currently only consumed by //third_party/go/kubernetes_version_def.bzl.
+
+set -o errexit
+set -o nounset
+set -o pipefail
+
+KUBERNETES_gitTreeState="clean"
+if [ ! -z "$(git status --porcelain)" ]; then
+ KUBERNETES_gitTreeState="dirty"
+fi
+
+# TODO(q3k): unify with //third_party/go/repsitories.bzl.
+KUBERNETES_gitMajor="1"
+KUBERNETES_gitMinor="19"
+KUBERNETES_gitVersion="v1.19.0-alpha.2+nxt"
+
+cat <<EOF
+KUBERNETES_gitCommit $(git rev-parse "HEAD^{commit}")
+KUBERNETES_gitTreeState $KUBERNETES_gitTreeState
+KUBERNETES_gitVersion $KUBERNETES_gitVersion
+KUBERNETES_gitMajor $KUBERNETES_gitMajor
+KUBERNETES_gitMinor $KUBERNETES_gitMinor
+KUBERNETES_buildDate $(date \
+ ${SOURCE_DATE_EPOCH:+"--date=@${SOURCE_DATE_EPOCH}"} \
+ -u +'%Y-%m-%dT%H:%M:%SZ')
+EOF