summaryrefslogtreecommitdiffhomepage
path: root/kokoro/gcp_ubuntu/run_build.sh
diff options
context:
space:
mode:
authorNicolas Lacasse <nlacasse@google.com>2018-05-10 11:39:36 -0700
committerShentubot <shentubot@google.com>2018-05-10 11:40:29 -0700
commit2d3c6dc2efb1d9957836d70d1a59634b96ea74d4 (patch)
treef51e0c525a4750ce68d25135d8ce7e1f46750933 /kokoro/gcp_ubuntu/run_build.sh
parente2720f91dc2abbdb0c74f164e9f7602d37da9581 (diff)
Upload the nightly release to a "nightly/latest" bucket for easy download.
We also upload to a path with the current date, so that previous builds are archived. Since these builds only include the date (and not time) their links are somewhat discoverable as well. PiperOrigin-RevId: 196147475 Change-Id: I54792d7a4ba2a7af24a51cd9b9f153c7744b310b
Diffstat (limited to 'kokoro/gcp_ubuntu/run_build.sh')
-rwxr-xr-xkokoro/gcp_ubuntu/run_build.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/kokoro/gcp_ubuntu/run_build.sh b/kokoro/gcp_ubuntu/run_build.sh
index c727b0862..43b01a1ff 100755
--- a/kokoro/gcp_ubuntu/run_build.sh
+++ b/kokoro/gcp_ubuntu/run_build.sh
@@ -31,5 +31,10 @@ cd git/repo
# Build runsc.
bazel build //runsc
-# Move the built binary to the top of the artifacts directory.
-mv bazel-bin/runsc/linux_amd64_pure_stripped/runsc "${KOKORO_ARTIFACTS_DIR}"/runsc
+# Move the runsc binary into "latest" directory, and also a directory with the
+# current date.
+latest_dir="${KOKORO_ARTIFACTS_DIR}"/nightly/latest
+today_dir="${KOKORO_ARTIFACTS_DIR}"/nightly/"$(date -Idate)"
+mkdir -p "${latest_dir}" "${today_dir}"
+cp bazel-bin/runsc/linux_amd64_pure_stripped/runsc "${latest_dir}"
+cp bazel-bin/runsc/linux_amd64_pure_stripped/runsc "${today_dir}"