diff --git a/changelog.d/5-internal/WPB-4910 b/changelog.d/5-internal/WPB-4910 new file mode 100644 index 00000000000..4d2155b181c --- /dev/null +++ b/changelog.d/5-internal/WPB-4910 @@ -0,0 +1 @@ +Include timestamp in s3 upload path for test logs diff --git a/hack/bin/integration-test.sh b/hack/bin/integration-test.sh index 841a3172fd8..0667ebeac28 100755 --- a/hack/bin/integration-test.sh +++ b/hack/bin/integration-test.sh @@ -14,7 +14,7 @@ CHART=wire-server tests=(integration stern galley cargohold gundeck federator spar brig) cleanup() { - if (( CLEANUP_LOCAL_FILES > 0 )); then + if ((CLEANUP_LOCAL_FILES > 0)); then for t in "${tests[@]}"; do rm -f "stat-$t" rm -f "logs-$t" @@ -24,11 +24,12 @@ cleanup() { # Copy to the concourse output (indetified by $OUTPUT_DIR) for propagation to # following steps. -copyToAwsS3(){ - if (( UPLOAD_LOGS > 0 )); then +copyToAwsS3() { + build_ts=$(date +%s) + if ((UPLOAD_LOGS > 0)); then for t in "${tests[@]}"; do - echo "Copy logs-$t to s3://wire-server-test-logs/test-logs-$VERSION/$t-$VERSION.log" - aws s3 cp "logs-$t" "s3://wire-server-test-logs/test-logs-$VERSION/$t-$VERSION.log" + echo "Copy logs-$t to s3://wire-server-test-logs/test-logs-$VERSION/$t-$VERSION-$build_ts.log" + aws s3 cp "logs-$t" "s3://wire-server-test-logs/test-logs-$VERSION/$t-$VERSION-$build_ts.log" done fi } @@ -89,7 +90,7 @@ if ((exit_code > 0)); then x=$(cat "stat-$t") if ((x > 0)); then echo "=== (relevant) logs for failed $t-integration ===" - "$DIR/integration-logs-relevant-bits.sh" < "logs-$t" + "$DIR/integration-logs-relevant-bits.sh" <"logs-$t" fi done summary