Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/5-internal/WPB-4910
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Include timestamp in s3 upload path for test logs
13 changes: 7 additions & 6 deletions hack/bin/integration-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
}
Expand Down Expand Up @@ -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
Expand Down