chore: Update incorrect docker tagging and add fargate tag in deployment telemetry (#33472)
## Description
> [!TIP]
> _Add a TL;DR when the description is longer than 500 words or
extremely technical (helps the content, marketing, and DevRel team)._
>
> _Please also include relevant motivation and context. List any
dependencies that are required for this change. Add links to Notion,
Figma or any other documents that might be relevant to the PR._
Fixes #`Issue Number`
_or_
Fixes `Issue URL`
> [!WARNING]
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._
## Automation
/ok-to-test tags=""
### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results -->
> [!CAUTION]
> If you modify the content in this section, you are likely to disrupt
the CI result for your PR.
<!-- end of auto-generated comment: Cypress test results -->
## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No
---------
Co-authored-by: Goutham Pratapa <goutham@appsmith.com>
This commit is contained in:
parent
cf5b36a630
commit
921807d80b
|
|
@ -9,20 +9,30 @@ mount_path="/appsmith-stacks"
|
|||
function get_cloud_provider() {
|
||||
release_details=$(uname -r)
|
||||
if [[ $release_details == *"amzn"* ]];then
|
||||
# Example: 5.10.192-183.736.amzn2.x86_64
|
||||
cloud_provider="amazon";
|
||||
elif [[ $release_details == *"azure"* ]];then
|
||||
# Example: 5.15.0-1059-azure
|
||||
cloud_provider="azure";
|
||||
elif [[ $release_details == *"cloud"* ]];then
|
||||
# Example: 6.1.0-18-cloud-amd64
|
||||
cloud_provider="gcp";
|
||||
elif [[ $release_details == *"generic"* ]];then
|
||||
# Example: 6.8.0-31-generic
|
||||
cloud_provider="digitalocean"
|
||||
elif [[ $release_details == *"ecs"* ]];then
|
||||
cloud_provider="alibaba"
|
||||
elif [[ -n "${DYNO}" ]];then
|
||||
cloud_provider="heroku"
|
||||
else
|
||||
cloud_provider="local";
|
||||
cloud_provider="others(including local)";
|
||||
fi
|
||||
}
|
||||
|
||||
## Get deployment tool details
|
||||
function get_tool() {
|
||||
if [[ -z "${KUBERNETES_SERVICE_HOST}" ]]; then
|
||||
dep_tool="docker";
|
||||
dep_tool="likely docker";
|
||||
else
|
||||
dep_tool="kubernetes";
|
||||
fi
|
||||
|
|
@ -47,14 +57,21 @@ function get_current_time(){
|
|||
currentTime="$(date -u -Iseconds)"
|
||||
}
|
||||
|
||||
## Check if it's a ECS Fargate deployment
|
||||
function check_for_fargate() {
|
||||
if [[ $cloud_provider == "amazon" && $dep_tool == "likely docker" && $efs == "present" ]]; then
|
||||
dep_tool="ecs-fargate"
|
||||
fi
|
||||
}
|
||||
|
||||
## Main Block
|
||||
get_cloud_provider
|
||||
get_tool
|
||||
get_hostname
|
||||
check_for_efs
|
||||
check_for_fargate
|
||||
get_current_time
|
||||
|
||||
|
||||
infra_json='{"cloudProvider":"'"$cloud_provider"'","tool":"'"$dep_tool"'","efs":"'"$efs"'","hostname":"'"$hostname"'", "currentTime": "'"$currentTime"'"}'
|
||||
echo "$infra_json"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user