Skip to content

Commit

Permalink
WPB-4910 include build timestamp in s3 upload path for test logs (#3621)
Browse files Browse the repository at this point in the history
  • Loading branch information
battermann authored Sep 29, 2023
1 parent 086e5b2 commit 2ca6e3a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
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

0 comments on commit 2ca6e3a

Please sign in to comment.