diff options
Diffstat (limited to 'contrib/cirrus')
-rwxr-xr-x | contrib/cirrus/build_vm_images.sh | 4 | ||||
-rwxr-xr-x | contrib/cirrus/integration_test.sh | 6 | ||||
-rw-r--r-- | contrib/cirrus/lib.sh | 11 | ||||
-rwxr-xr-x | contrib/cirrus/ooe.sh | 6 | ||||
-rwxr-xr-x | contrib/cirrus/setup_environment.sh | 5 | ||||
-rwxr-xr-x | contrib/cirrus/unit_test.sh | 4 |
6 files changed, 33 insertions, 3 deletions
diff --git a/contrib/cirrus/build_vm_images.sh b/contrib/cirrus/build_vm_images.sh index ecdf1d877..ee45b1ead 100755 --- a/contrib/cirrus/build_vm_images.sh +++ b/contrib/cirrus/build_vm_images.sh @@ -23,6 +23,8 @@ SCRIPT_BASE $SCRIPT_BASE PACKER_BASE $PACKER_BASE " +record_timestamp "cache-image build start" + show_env_vars # Everything here is running on the 'image-builder-image' GCE image @@ -50,3 +52,5 @@ make libpod_images \ SCRIPT_BASE=$SCRIPT_BASE \ PACKER_BASE=$PACKER_BASE \ BUILT_IMAGE_SUFFIX=$BUILT_IMAGE_SUFFIX + +record_timestamp "cache-image build end" diff --git a/contrib/cirrus/integration_test.sh b/contrib/cirrus/integration_test.sh index a50bd448f..627864f47 100755 --- a/contrib/cirrus/integration_test.sh +++ b/contrib/cirrus/integration_test.sh @@ -9,6 +9,8 @@ OS_RELEASE_ID $OS_RELEASE_ID OS_RELEASE_VER $OS_RELEASE_VER " +record_timestamp "integration test start" + clean_env set -x @@ -24,8 +26,12 @@ case "${OS_RELEASE_ID}-${OS_RELEASE_VER}" in centos-7) ;& rhel-7) make install PREFIX=/usr ETCDIR=/etc + make podman-remote + install bin/podman-remote /usr/bin make test-binaries make localintegration ;; *) bad_os_id_ver ;; esac + +record_timestamp "integration test end" diff --git a/contrib/cirrus/lib.sh b/contrib/cirrus/lib.sh index 9e9639223..32b2c91a5 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} +TIMESTAMPS_FILEPATH="${TIMESTAMPS_FILEPATH:-/var/tmp/timestamps}" if ! [[ "$PATH" =~ "/usr/local/bin" ]] then @@ -135,6 +136,16 @@ ircmsg() { set -e } +record_timestamp() { + set +x # sometimes it's turned on + req_env_var "TIMESTAMPS_FILEPATH $TIMESTAMPS_FILEPATH" + echo "." # cirrus webui strips blank-lines + STAMPMSG="The $1 time at the tone will be:" + echo -e "$STAMPMSG\t$(date --iso-8601=seconds)" | \ + tee -a $TIMESTAMPS_FILEPATH + echo -e "BLEEEEEEEEEEP!\n." +} + # Run sudo in directory with GOPATH set cdsudo() { DIR="$1" diff --git a/contrib/cirrus/ooe.sh b/contrib/cirrus/ooe.sh index d79e574b2..3c8a0409d 100755 --- a/contrib/cirrus/ooe.sh +++ b/contrib/cirrus/ooe.sh @@ -7,10 +7,10 @@ set -eo pipefail -SCRIPT_PATH="$0" +SCRIPT_BASEDIR="$(basename $0)" badusage() { - echo "Incorrect usage: $(basename $SCRIPT_PATH) <command> [options]" > /dev/stderr + echo "Incorrect usage: $SCRIPT_BASEDIR) <command> [options]" > /dev/stderr echo "ERROR: $1" exit 121 } @@ -18,7 +18,7 @@ badusage() { COMMAND="$@" [[ -n "$COMMAND" ]] || badusage "No command specified" -OUTPUT_TMPFILE="$(mktemp -p '' $(basename $0)_output_XXXX)" +OUTPUT_TMPFILE="$(mktemp -p '' ${SCRIPT_BASEDIR}_output_XXXX)" output_on_error() { RET=$? set +e diff --git a/contrib/cirrus/setup_environment.sh b/contrib/cirrus/setup_environment.sh index 174bd3daf..bcfe7e396 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 +record_timestamp "env. setup start" + req_env_var " USER $USER HOME $HOME @@ -82,3 +85,5 @@ then # Only testing-VMs need deps installed [[ -n "$PACKER_BUILDS" ]] || install_testing_dependencies # must exist in $GOPATH fi + +record_timestamp "env. setup end" diff --git a/contrib/cirrus/unit_test.sh b/contrib/cirrus/unit_test.sh index 61d9dc73d..15403b7a7 100755 --- a/contrib/cirrus/unit_test.sh +++ b/contrib/cirrus/unit_test.sh @@ -9,6 +9,8 @@ OS_RELEASE_ID $OS_RELEASE_ID OS_RELEASE_VER $OS_RELEASE_VER " +record_timestamp "unit test start" + clean_env set -x @@ -29,3 +31,5 @@ case "${OS_RELEASE_ID}-${OS_RELEASE_VER}" in ;; *) bad_os_id_ver ;; esac + +record_timestamp "unit test end" |