This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws elasticbeanstalk describe-environments | jq ".Environments[].EnvironmentArn" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aws logs describe-log-groups | jq ".logGroups[].logGroupName" | grep -E "homeplus|mcdonalds" | xargs -n 1 -t aws logs describe-log-streams --query "logStreams[*].lastEventTimestamp" --log-group | jq "max/1000|floor" | xargs -t -n 1 date -r | |
# aws logs describe-log-groups | jq ".logGroups[].logGroupName" | |
# Get LogGroup names | |
# grep -E "homeplus|mcdonalds" | |
# (Optional) Filter LogGroup names | |
# xargs -n 1 -t aws logs describe-log-streams --query "logStreams[*].lastEventTimestamp" --log-group | jq "max/1000|floor" | |
# Get last event timestamp for each LogGroup. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cd ${bamboo.build.working.directory} | |
REPO_URL=${bamboo.planRepository.1.repositoryUrl} | |
[[ $REPO_URL =~ github.com\/(.*).git ]] | |
STATUS_UPDATE_URL="https://api.github.com/repos/${BASH_REMATCH[1]}/statuses/${bamboo.repository.revision.number}" | |
if ls **/test-reports/*.xml 1> /dev/null 2>&1; then | |
curl -H "Authorization: token ${bamboo.githubStatusUpdateTokenForMeshkoreaDev}" --request POST --data '{"state": "success", "context": "bamboo/build", "description": "Bamboo build Completed!", "target_url": "${bamboo.buildResultsUrl}"}' $STATUS_UPDATE_URL > /dev/null | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Requires AWS CLI Tools (https://aws.amazon.com/cli) and jq (https://stedolan.github.io/jq) | |
# AWS CLI must be configured with access key with approperiate role/permissions | |
aws elasticbeanstalk describe-application-versions --query "ApplicationVersions[*].ApplicationName" | jq '{"total": length, "lists": group_by(.)} | {"Applications": [ (.lists[] | {"Application": .[0], "Versions": length })], "Total Versions": .total }' |