summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-01-10 10:58:25 -0800
committerGitHub <noreply@github.com>2019-01-10 10:58:25 -0800
commite4525cf844535014923a2253e8531d92d9e556e5 (patch)
treee4c28e46852c3e67fe3a909ae28c0d9f40920087 /contrib
parent2169b9fe14516b724b257437ed97e32046a4d611 (diff)
parent4e7a7ffe9d73797110f47ac57a39ce02c95e5152 (diff)
downloadpodman-e4525cf844535014923a2253e8531d92d9e556e5.tar.gz
podman-e4525cf844535014923a2253e8531d92d9e556e5.tar.bz2
podman-e4525cf844535014923a2253e8531d92d9e556e5.zip
Merge pull request #2129 from cevich/timestamp
Cirrus: (Minor) Print timestamp
Diffstat (limited to 'contrib')
-rw-r--r--contrib/cirrus/lib.sh8
-rwxr-xr-xcontrib/cirrus/setup_environment.sh3
2 files changed, 11 insertions, 0 deletions
diff --git a/contrib/cirrus/lib.sh b/contrib/cirrus/lib.sh
index 9e9639223..d50c1e1a3 100644
--- a/contrib/cirrus/lib.sh
+++ b/contrib/cirrus/lib.sh
@@ -17,6 +17,7 @@ PACKER_BASE=${PACKER_BASE:-./contrib/cirrus/packer}
CIRRUS_BUILD_ID=${CIRRUS_BUILD_ID:-DEADBEEF} # a human
CIRRUS_BASE_SHA=${CIRRUS_BASE_SHA:-HEAD}
CIRRUS_CHANGE_IN_REPO=${CIRRUS_CHANGE_IN_REPO:-FETCH_HEAD}
+START_STAMP_FILEPATH="${START_STAMP_FILEPATH:-/var/tmp/start.timestamp}"
if ! [[ "$PATH" =~ "/usr/local/bin" ]]
then
@@ -135,6 +136,13 @@ ircmsg() {
set -e
}
+start_timestamp() {
+ req_env_var "START_STAMP_FILEPATH $START_STAMP_FILEPATH"
+ [[ -r "$START_STAMP_FILEPATH" ]] || \
+ echo -e ".\nThe time at the tone will be:\n$(date --iso-8601=seconds | \
+ tee $START_STAMP_FILEPATH)\nBLEEEEEEEEEEP!\n.\n" # Cirrus strips blank lines from output
+}
+
# Run sudo in directory with GOPATH set
cdsudo() {
DIR="$1"
diff --git a/contrib/cirrus/setup_environment.sh b/contrib/cirrus/setup_environment.sh
index 174bd3daf..5899dca2d 100755
--- a/contrib/cirrus/setup_environment.sh
+++ b/contrib/cirrus/setup_environment.sh
@@ -1,8 +1,11 @@
#!/bin/bash
set -e
+
source $(dirname $0)/lib.sh
+start_timestamp
+
req_env_var "
USER $USER
HOME $HOME