Add config and script for packages Kokoro job

Change-Id: I2210a8c7b673985c36a3a1b5d74d302899317f76
diff --git a/kokoro/packages.cfg b/kokoro/packages.cfg
new file mode 100644
index 0000000..d627b8b
--- /dev/null
+++ b/kokoro/packages.cfg
@@ -0,0 +1,10 @@
+build_file: "continuous-build/build/kokoro/packages.sh"
+gfile_resources: "/x20/teams/spacepark/enterprise/kokoro/prod/spacepark/enterprise/rootfs/latest/rootfs.raw.img"
+gfile_resources: "/x20/teams/spacepark/enterprise/kokoro/prod/spacepark/enterprise/rootfs/latest/rootfs.raw.img.sha256sum"
+gfile_resources: "/x20/teams/spacepark/enterprise/kokoro/prod/spacepark/enterprise/docker/aiy-board-builder.tar"
+gfile_resources: "/x20/teams/spacepark/enterprise/kokoro/prod/spacepark/enterprise/pbuilder/base.tgz"
+action {
+  define_artifacts {
+    regex: "packages.tgz"
+  }
+}
diff --git a/kokoro/packages.sh b/kokoro/packages.sh
new file mode 100644
index 0000000..ae7862c
--- /dev/null
+++ b/kokoro/packages.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+set -e
+set -x
+
+# Symlink the Makefile, like it would be if repo checked this out.
+# Otherwise, sourcing setup.sh doesn't work as expected.
+ln -sfr git/continuous-build/build/Makefile git/continuous-build/Makefile
+
+# Sourcing this only works in the directory above build...
+pushd git/continuous-build
+source build/setup.sh
+popd
+
+export IS_GLINUX=true
+export TARBALL_FETCH_ROOT_DIRECTORY=${KOKORO_GFILE_DIR}
+export PREBUILT_MODULES_ROOT=${KOKORO_GFILE_DIR}
+export PREBUILT_DOCKER_ROOT=${KOKORO_GFILE_DIR}
+export FETCH_PBUILDER_DIRECTORY=${KOKORO_GFILE_DIR}
+export PACKAGES_FETCH_ROOT_DIRECTORY=${KOKORO_GFILE_DIR}
+export PACKAGES_REVISION=.
+export ROOTFS_REVISION=.
+export FETCH_PACKAGES=false
+
+# Install haveged on the host to provide extra entropy.
+sudo apt-get install -y haveged
+sudo /etc/init.d/haveged start
+
+m docker-packages-tarball
+
+cp ${ROOTDIR}/cache/packages.tgz ${KOKORO_ARTIFACTS_DIR}