uploader: The Codecov uploader doesn't work in Docker containers that runs in TeamCity with corporate proxy

Describe the bug

Pinging Codecov: https://codecov.io/upload/v4?package=uploader-0.1.0&token=*******&branch=undefined&build=&build_url=&commit=75607b5fa42ddbaf29f3cc80593de9a1c71a9b6b&job=&pr=&service=teamcity&slug=&name=&tag=&flags=&parent=
Error!: Error: Error uploading to https://codecov.io: Error: Error uploading to Codecov: Error: connect ETIMEDOUT 34.120.215.12:443

To Reproduce Steps to reproduce the behavior:

  1. Download codecov from curl -Os https://uploader.codecov.io/latest/linux/codecov
  2. Run docker container in TeamCity using codecov env script
# request codecov to detect CI environment to pass through to docker
ci_env=`bash <(curl -s https://codecov.io/env)`
docker run $ci_env -e CI=true ...
 |----- inside docker container
 | # exec tests
 | # Your Codecov Uploader approach here
 | # See more at https://docs.codecov.com/docs/codecov-uploader
 | ./codecov

Expected behavior Bash uploader works well in the case.

Judging by parameters of the query string and by https://github.com/codecov/uploader/blob/master/src/ci_providers/provider_teamcity.js file, the new uploader does not work with TeamCity variables defined by env script:

elif [ "$TEAMCITY_VERSION" != "" ];
then
  add "TEAMCITY_VERSION"
  add "TEAMCITY_BUILD_BRANCH"
  add "TEAMCITY_BUILD_ID"
  add "TEAMCITY_BUILD_URL"
  add "TEAMCITY_BUILD_COMMIT"
  add "TEAMCITY_BUILD_COMMIT"
  add "BUILD_VCS_NUMBER"
  add "TEAMCITY_BUILD_REPOSITORY"

Version of env script - 1.0.3 (Also note, that line add "TEAMCITY_BUILD_COMMIT" is repeated twice - maybe typo)

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 19 (11 by maintainers)

Most upvoted comments

@anmyachev Can you remove --proxy from the string passed to -U? Proxy usage should be -U "${http_proxy}".

@mitchell-codecov Thanks a lot! I somehow did not notice that the interface has changed 😦

@drazisil-codecov upload was successful, sorry about that