Publish execution logs on unix platforms (#10194)

Even with the cache retries something still doesn’t seem to be cached
quite like I expect. I can’t really debug this without exec logs so
this PR starts publishing those.

changelog_begin
changelog_end
This commit is contained in:
Moritz Kiefer 2021-07-07 11:37:43 +02:00 committed by GitHub
parent 42693452ce
commit 2326d425bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View File

@ -11,6 +11,7 @@ execution_log_postfix=${1:-}
export LC_ALL=en_US.UTF-8
ARTIFACT_DIRS="${BUILD_ARTIFACTSTAGINGDIRECTORY:-$PWD}"
mkdir -p "${ARTIFACT_DIRS}/logs"
tag_filter=""
if [[ "$execution_log_postfix" == "_Darwin" ]]; then
@ -33,7 +34,8 @@ bazel build //... \
--profile build-profile.json \
--experimental_profile_include_target_label \
--build_event_json_file build-events.json \
--build_event_publish_all_actions
--build_event_publish_all_actions \
--experimental_execution_log_file "$ARTIFACT_DIRS/logs/build_execution${execution_log_postfix}.log"
# Set up a shared PostgreSQL instance.
export POSTGRESQL_ROOT_DIR="${TMPDIR:-/tmp}/daml/postgresql"
@ -77,7 +79,7 @@ bazel test //... \
--experimental_profile_include_target_label \
--build_event_json_file test-events.json \
--build_event_publish_all_actions \
--experimental_execution_log_file "$ARTIFACT_DIRS/test_execution${execution_log_postfix}.log"
--experimental_execution_log_file "$ARTIFACT_DIRS/logs/test_execution${execution_log_postfix}.log"
# Make sure that Bazel query works.
bazel query 'deps(//...)' >/dev/null

View File

@ -38,6 +38,12 @@ steps:
DAML_SDK_RELEASE_VERSION: ${{parameters.release_tag}}
DAML_SCALA_VERSION: ${{parameters.scala_version}}
- task: PublishBuildArtifacts@1
condition: succeededOrFailed()
inputs:
pathtoPublish: '$(Build.StagingDirectory)/logs'
artifactName: 'Bazel Logs'
- task: PublishBuildArtifacts@1
condition: failed()
displayName: 'Publish the bazel test logs'