1 Answer
- Newest
- Most votes
- Most comments
0
Hello.
The command "aws codebuild describe-project" does not exist.
https://awscli.amazonaws.com/v2/documentation/api/latest/reference/codebuild/index.html
You must use "batch-get-projects" to retrieve CodeBuild project settings.
This is just a guess, but I think you are running a non-existent command called "aws codebuild describe-project" and the correct environment variables are not recorded in "sample.json".
You can execute the following commands.
aws codebuild batch-get-projects --names kobayashi --query "projects"[]."environment" | jq .[] > sample.json
aws codebuild update-project --name kobayashi --environment file://sample.json
By the way, the contents of "sample.json" are as follows.
{
"type": "LINUX_CONTAINER",
"image": "aws/codebuild/amazonlinux2-x86_64-standard:5.0",
"computeType": "BUILD_GENERAL1_SMALL",
"environmentVariables": [
{
"name": "test",
"value": "test-kobayashi-test-kobayashi",
"type": "PLAINTEXT"
},
{
"name": "abc",
"value": "test-kobayashi-test-kobayashi",
"type": "PLAINTEXT"
}
],
"privilegedMode": false,
"imagePullCredentialsType": "CODEBUILD"
}
Relevant content
- asked 5 years ago
- Accepted Answerasked a year ago
- asked 7 months ago
- asked 10 months ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated a year ago