Skip to content
This repository has been 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

Open
rolandoldengarm opened this issue Aug 27, 2020 · 1 comment

Comments

@rolandoldengarm
Copy link

rolandoldengarm commented Aug 27, 2020

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?

@thomasrockhu
Copy link
Contributor

@rolandoldengarm, what happens if you set the slug using the -r argument described here?

@thomasrockhu thomasrockhu self-assigned this Nov 29, 2020
@thomasrockhu thomasrockhu removed their assignment Jul 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants