Skip to content

Commit

Permalink
add job attempt to logs (#17091)
Browse files Browse the repository at this point in the history
For the used-to-be-rare-but-not-so-much-anymore case where the job fails
after having pushed its logs (without this the push fails as we can't
overwrite artifacts).
  • Loading branch information
garyverhaegen-da committed Jul 6, 2023
1 parent 53556da commit 242fe0f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ bazel build //... `
`-`-experimental_profile_include_target_label `
`-`-build_event_json_file build-events.json `
`-`-build_event_publish_all_actions `
`-`-experimental_execution_log_file ${ARTIFACT_DIRS}/logs/build_execution_windows.log `
`-`-experimental_execution_log_file ${ARTIFACT_DIRS}/logs/build_execution_windows$env:SYSTEM_JOBATTEMPT.log `
`-`-build_tag_filters=-canton-ee

bazel shutdown
Expand All @@ -85,6 +85,6 @@ if ($env:SKIP_TESTS -ceq "False") {
`-`-experimental_profile_include_target_label `
`-`-build_event_json_file test-events.json `
`-`-build_event_publish_all_actions `
`-`-experimental_execution_log_file ${ARTIFACT_DIRS}/logs/test_execution_windows.log `
`-`-experimental_execution_log_file ${ARTIFACT_DIRS}/logs/test_execution_windows_$env:SYSTEM_JOBATTEMPT.log `
`-`-test_tag_filters=-canton-ee
}
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -euo pipefail

eval "$("$(dirname "$0")/dev-env/bin/dade-assist")"

execution_log_postfix=${1:-}
execution_log_postfix=${1:-}${2:-}

export LC_ALL=en_US.UTF-8

Expand Down
5 changes: 3 additions & 2 deletions ci/build-unix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@ steps:
- bash: |
set -euo pipefail
p="_${{parameters.name}}"
a="_$(System.JobAttempt)"
if [ "$p" == "_m1" ]; then
./build.sh $p || ./build.sh $p || ./build.sh $p || ./build.sh $p
./build.sh $p $a || ./build.sh $p $a || ./build.sh $p $a || ./build.sh $p $a
else
./build.sh $p
./build.sh $p $a
fi
displayName: 'Build'
env:
Expand Down

0 comments on commit 242fe0f

Please sign in to comment.