Skip to content

Instantly share code, notes, and snippets.

@gkrizek
Last active July 9, 2019 15:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gkrizek/7800dac95bfb28ceff7c8f952c684e9d to your computer and use it in GitHub Desktop.
Save gkrizek/7800dac95bfb28ceff7c8f952c684e9d to your computer and use it in GitHub Desktop.
Example output of running `printenv` inside CodeBuild
CODEBUILD_VPC_AZ=us-west-2b
MAVEN_OPTS=-Dmaven.wagon.httpconnectionManager.maxPerRoute=2
CODEBUILD_LAST_EXIT=0
CODEBUILD_START_TIME=1538752095466
CODEBUILD_BMR_URL=https://CODEBUILD_AGENT:3000
CODEBUILD_SOURCE_VERSION=arn:aws:s3:::bucket/pipeline/App/OGgJCVJ.zip
HOSTNAME=ip-10-10-2-122.us-west-2.compute.internal
CODEBUILD_KMS_KEY_ID=arn:aws:kms:us-west-2:000000011111:alias/aws/s3
CODEBUILD_BUILD_ID=codebuild-project:40b92e01-706b-422a-9305-8bdb16f7c269
HOME=/root
OLDPWD=/codebuild/output/src00011222/src
CODEBUILD_GOPATH=/codebuild/output/src084981953
CODEBUILD_RESOLVED_SOURCE_VERSION=9e0d29404ee30b7b63258414ecccc996bbeb55c6
CODEBUILD_BUILD_SUCCEEDING=1
CODEBUILD_BUILD_ARN=arn:aws:codebuild:us-west-2:000000001111:build/codebuild-project:40b92e01-706b-422a-9305-8bdb16f7c269
AWS_CONTAINER_CREDENTIALS_RELATIVE_URI=/v2/credentials/e5f23b9f-c72e-4384-9ba1-37d08aa052b7
CODEBUILD_INITIATOR=codepipeline/pipeline-name
AWS_DEFAULT_REGION=us-west-2
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
CODEBUILD_LOG_PATH=40b92e01-706b-422a-9305-8bdb16f7c269
CODEBUILD_BUILD_IMAGE=000011112222.dkr.ecr.us-west-2.amazonaws.com/codebuild:docker-image
GOPATH=/codebuild/output/src00011222
AWS_REGION=us-west-2
CODEBUILD_SRC_DIR=/codebuild/output/src00011222/src
CODEBUILD_AUTH_TOKEN=0730f0ab-5299-4235-a2c2-bb1f6ad07033
PWD=/codebuild/output/src00011222/src

Plus any extra env variables set in buildspec or manually

_ This execution was started by CodePipeline_

@shoaib-masood
Copy link

Hi,
How can i change the value of CODEBUILD_SRC_DIR in codebuild or in codepipeline.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment