Skip to content

Instantly share code, notes, and snippets.

@ngyuki
Created June 30, 2024 02:31
Show Gist options
  • Save ngyuki/6c3dede6163cc92bad0005b02ea7dfdb to your computer and use it in GitHub Desktop.
Save ngyuki/6c3dede6163cc92bad0005b02ea7dfdb to your computer and use it in GitHub Desktop.
CodeBuild の実行時間をざっくり俯瞰するためのスニペット
aws codebuild list-builds-for-project --project-name XXXXX --max-items 100 \
| jq '.ids[]' -r \
| xargs aws codebuild batch-get-builds --ids \
| jq '.builds | sort_by(.buildNumber) | .[] | {buildNumber,startTime,buildStatus} * (.phases|map({key:.phaseType,value:.durationInSeconds})|from_entries)' \
| mlr --j2p cat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment