Open klausbadelt opened 3 years ago
We're testing in a Docker container, so once I passed thru CODEBUILD_BUILD_ID
, CODEBUILD_CI
, CODEBUILD_RESOLVED_SOURCE_VERSION
, CODEBUILD_SOURCE_REPO_URL
, CODEBUILD_SOURCE_VERSION
and CODEBUILD_WEBHOOK_HEAD_REF
as required by this gem, detection started working.
Now the upload fails with NoMethodError
. The env vars are populated differently when using CodePipeline.
_____ _
--
479 | / ____\| \| \|
480 | \| \| ___ __\| \| ___ ___ _____ __
481 | \| \| / _ \ / _\`\|/ _ \/ __/ _ \ \ / /
482 | \| \|___\| (_) \| (_\| \| __/ (_\| (_) \ V /
483 | \_____\___/ \__,_\|\___\|\___\___/ \_/
484 | Ruby-0.2.15
485 | ==> Codebuild CI detected
486 | ==> Appending file network
487 | Formatter SimpleCov::Formatter::Codecov failed with NoMethodError: undefined method `split' for nil:NilClass (/bundle/ruby/2.6.0/bundler/gems/codecov-ruby-f360765cebce/lib/codecov.rb:166:in `build_params')
@klausbadelt what is the value of CODEBUILD_WEBHOOK_HEAD_REF
?
@thomasrockhu It's not set. Here's all CODEBUILD_*
env vars set when using CodePipeline:
CODEBUILD_AGENT_ENDPOINT=http://127.0.0.1:7831
CODEBUILD_AUTH_TOKEN=***
CODEBUILD_BMR_URL=https://CODEBUILD_AGENT:3000
CODEBUILD_BUILD_ARN=arn:aws:codebuild:us-east-1:***:build/RailsBuild-***:ff4472d5-****-****-****-7778d08afca2
CODEBUILD_BUILD_ID=RailsBuild-***:ff4472d5-****-****-****-7778d08afca2
CODEBUILD_BUILD_IMAGE=aws/codebuild/standard:4.0
CODEBUILD_BUILD_NUMBER=153
CODEBUILD_BUILD_SUCCEEDING=1
CODEBUILD_BUILD_URL=https://us-east-1.console.aws.amazon.com/codebuild/home?region=us-east-1#/builds/RailsBuild-***:ff4472d5-****-****-****-7778d08afca2/view/new
CODEBUILD_CI=true
CODEBUILD_CONTAINER_NAME=default
CODEBUILD_EXECUTION_ROLE_BUILD=
CODEBUILD_FE_REPORT_ENDPOINT=https://codebuild.us-east-1.amazonaws.com/
CODEBUILD_GOPATH=/codebuild/output/src107763158
CODEBUILD_INITIATOR=codepipeline/ci-dev-RailsPipeline-****
CODEBUILD_KMS_KEY_ID=arn:aws:kms:us-east-1:***:alias/aws/s3
CODEBUILD_LAST_EXIT=0
CODEBUILD_LOG_PATH=uuid***
CODEBUILD_PROJECT_UUID=uuid***
CODEBUILD_RESOLVED_SOURCE_VERSION=a4845d69a276b747ab4c4bc59c917fa5430989d0
CODEBUILD_SOURCE_VERSION=arn:aws:s3:::ci-dev-deploybucket-***/ci-dev-RailsPipeline/RailsSourc/*****
CODEBUILD_SRC_DIR=/codebuild/output/src107763158/src
CODEBUILD_START_TIME=1610666751389
@klausbadelt I see, I'll look into getting this changed! Thanks for your patience.
Haha thank you. Sorry for the delay in response.
I think I had this covered in #35 but things have probably changed since then. Lemme know if a PR would help you.
😆 sorry about that @klausbadelt. Yes, another PR would be extremely helpful
You probably saw - #131 has been posted
@klausbadelt, I'll push a new version of the uploader next week, thanks for the PR!
When running CodeBuild via CodePipeline, the CI provider is not detected. Also, there's no git repository with CodePipeline as source provider in CodeBuild, so branch and commit detection fail too.