Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CODEBUILD_ env variables are reserved for internal use #1

Open
joebowbeer opened this issue Jul 24, 2018 · 2 comments
Open

CODEBUILD_ env variables are reserved for internal use #1

joebowbeer opened this issue Jul 24, 2018 · 2 comments

Comments

@joebowbeer
Copy link

The Build Specification Reference for AWS CodeBuild states:

Do not set any environment variable with a name that begins with CODEBUILD_. This prefix is reserved for internal use.

Choose a different prefix for the added env variables?

@thii
Copy link
Owner

thii commented Jul 25, 2018

I know. I didn’t want to make their names too long so I just used the same prefix. I believe there’s no conflict with any internal one for now.

@jdrydn
Copy link

jdrydn commented Jul 3, 2020

The Build Specification Reference for AWS CodeBuild states:

Do not set any environment variable with a name that begins with CODEBUILD_. This prefix is reserved for internal use.

So for (nearly) the past 2 years, this has been a documented-yet-unenforced point, so when CodeBuild is triggered by CodePipeline (and the resulting git data is lost) all I need to do was set CODEBUILD_GIT_BRANCH as an environment variable in the pipeline, and this script continued to work (rather nicely, too).

Due to recent changes in CodePipeline (literally, within the past few days, last build that executed cleanly was June 30th), that custom environment variable "fix" now errors with:

No user environment variables can start with CODEBUILD_

It may be worth changing the prefix now? CODEBUILDEXTRAS_ seems logical enough?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants