ci-annotate-errors 1.6 KB

1234567891011121314151617181920212223242526272829303132333435
  1. #!/usr/bin/env bash
  2. # Copyright Materialize, Inc. and contributors. All rights reserved.
  3. #
  4. # Use of this software is governed by the Business Source License
  5. # included in the LICENSE file at the root of this repository.
  6. #
  7. # As of the Change Date specified in that file, in accordance with
  8. # the Business Source License, use of this software will be governed
  9. # by the Apache License, Version 2.0.
  10. #
  11. # ci-annotate-errors - Detect errors in junit xml as well as log files during
  12. # CI and find associated open GitHub issues in Materialize repository.
  13. HOSTNAME="7vifiksqeftxc6ld3r6zvc8n2.lb.us-east-1.aws.materialize.cloud"
  14. # TODO: Reenable when database-issues#8592 is fixed
  15. # OUTPUT=$(exec "$(dirname "$0")"/ci-builder run stable "$(dirname "$0")"/mzcompose --mz-quiet --find get-cloud-hostname run default --app-password-env-var "PRODUCTION_ANALYTICS_APP_PASSWORD")
  16. #
  17. # if [[ $OUTPUT == *"CalledProcessError"* ]]; then
  18. # OUTPUT="unknown"
  19. # else
  20. # # shellcheck disable=SC2181,SC2319
  21. # if [ $? -eq 0 ]; then
  22. # # Discard all but the last two lines, previous content can be retries when docker pull has problems
  23. # OUTPUT=$(echo "$OUTPUT" | tail -n 2)
  24. #
  25. # # keep only the remaining first line because there is a further line containing the mzcompose result summary
  26. # HOSTNAME=$(echo "$OUTPUT" | head -n 1)
  27. # else
  28. # echo "Failed to get cloud hostname, using fallback value"
  29. # HOSTNAME="7vifiksqeftxc6ld3r6zvc8n2.lb.us-east-1.aws.materialize.cloud"
  30. # fi
  31. # fi
  32. exec "$(dirname "$0")"/pyactivate -m materialize.cli.ci_annotate_errors --cloud-hostname "$HOSTNAME" "$@"