Skip to content
This repository was archived by the owner on Jan 10, 2023. It is now read-only.
This repository was archived by the owner on Jan 10, 2023. It is now read-only.

AWS CodeBuild: CODEBUILD_SOURCE_REPO_URL is empty when triggered by pipeline #345

@ghost

Description

When a CodeBuild is triggered by a CodePipeline, the variable CODEBUILD_SOURCE_REPO_URL is empty. This is as designed, according to the documentation:

CODEBUILD_SOURCE_REPO_URL
The URL to the input artifact or source code repository. For Amazon S3, this is s3:// followed by the bucket name and path to the input artifact. For CodeCommit and GitHub, this is the repository's clone URL. If a build originates from CodePipeline, then this might be empty.

However, the script assumes this variable to be set here.
I've tried to set this environment variable from the CodePipeline, but it's not allowed to add environment variables that start with CODEBUILD.
Also tried using codecov-node which has the same issue.

The only solution I see is to set this environment variable in our buildspec.yaml , but I was hoping there is a different solution?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions