aws / aws/aws-codebuild-docker-images
Looking for guidance for Local CodeBuild and using CodeBuild Environement Variables.
- Dominant language
- Dockerfile
- Stars
- 1.2k
- Forks
- 971
- Avg merge
- 2h 47m
- Merged PRs (30d)
- 1
Description
I want to run the below command in my buildspec.yml to identify the list of files that have changed between a specific commit and its parent commit.
` CHANGED_OBJECTS=$(git diff-tree --no-commit-id --name-only -r $CODEBUILD_WEBHOOK_HEAD_REF)`
But when I'm trying to build the project using Local CodeBuild using the command below -
`./codebuild_build.sh -i aws-codebuild-docker-images/ubuntu/standard/5.0:latest -a artifacts -s /project-root-director -e .env -c`
I'm getting this error -
' [Container] 2023/08/23 21:54:17 Command did not exit successfully CHANGED_OBJECTS=$(git diff-tree --no-commit-id --name-only -r $CODEBUILD_WEBHOOK_HEAD_REF) exit status 129
agent_1 | [Container] 2023/08/23 21:54:17 Phase complete: BUILD State: FAILED
agent_1 | [Container] 2023/08/23 21:54:17 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: CHANGED_OBJECTS=$(git diff-tree --no-commit-id --name-only -r $CODEBUILD_WEBHOOK_HEAD_REF). Reason: exit status 129`
Can someone please guide me and explain how to do this in a local code build environment? Thank you!
Contributor guide
Assessment
This issue has not been assessed yet.