100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps
Java asset-managementbuildingdashboarddataplatformdevice-managementedge-computingenergyenergy-managementenergy-monitorfleet-managementfleet-telematicsiotiot-applicationiot-platformmodbusmqttmqtt-brokerota-updaterules-enginesmartcity
Cleanup of CI/CD variable names
Rich Turner35effd117e32
diff --git a/.ci_cd/aws/cloudformation-create-ec2.yml b/.ci_cd/aws/cloudformation-create-ec2.ymlindex 66671a1de..6bd5062d5 100644--- a/.ci_cd/aws/cloudformation-create-ec2.yml+++ b/.ci_cd/aws/cloudformation-create-ec2.yml@@ -68,9 +68,6 @@ Parameters:SMTPSecret:Type: AWS::SSM::Parameter::Value<String>Default: SMTP-User-Secret- SShWhitelistRoleArn:- Type: AWS::SSM::Parameter::Value<String>- Default: SSH-Whitelist-Access-Role-ArnConditions:CreateDNSRecord: !Equals [!Ref DNSHostedZoneRoleArn, ""]@@ -107,6 +104,9 @@ Resources:Properties:GroupDescription: "Access OpenRemote stack services"GroupName: !Ref Host+ Tags:+ - Key: Name+ Value: !Ref HostSecurityGroupIngress:- IpProtocol: tcpFromPort: '80'@@ -582,7 +582,7 @@ Resources:- Ref: StandardSecurityGroupIpv6AddressCount: 1Tags:- - Key: "Name"+ - Key: NameValue: !Ref HostIamInstanceProfile: !Ref 'InstanceRoleProfile'UserData:@@ -612,12 +612,12 @@ Resources:Condition: AssignElasticIPProperties:Tags:- - Key: "Name"+ - Key: NameValue: !Ref HostIPAssoc:Type: AWS::EC2::EIPAssociationCondition: AssignElasticIPProperties:- InstanceId: !Ref 'EC2Instance'- EIP: !Ref 'IPAddress'+ InstanceId: !Ref EC2Instance+ EIP: !Ref IPAddressdiff --git a/.ci_cd/aws/get_account_id.sh b/.ci_cd/aws/get_account_id.shindex d48dc1842..48fe2043c 100644--- a/.ci_cd/aws/get_account_id.sh+++ b/.ci_cd/aws/get_account_id.sh@@ -1,9 +1,9 @@#!/bin/bash-# Sets ACCOUNT_ID by looking up the requested ACCOUNT_NAME+# Sets AWS_ACCOUNT_ID by looking up the requested AWS_ACCOUNT_NAME-if [ -z "$ACCOUNT_NAME" ]; then- echo "ACCOUNT_NAME must be set to use this script"+if [ -z "$AWS_ACCOUNT_NAME" ]; then+ echo "AWS_ACCOUNT_NAME must be set to use this script"exit 1fi@@ -16,20 +16,20 @@ fi# Optionally login if AWS_ENABLED != 'true'source "${awsDir}login.sh"-ACCOUNT_ID=$(aws ssm get-parameter --name "/Account-Ids/$ACCOUNT_NAME" --query "Parameter.Value" --output text 2>/dev/null)+AWS_ACCOUNT_ID=$(aws ssm get-parameter --name "/Account-Ids/$AWS_ACCOUNT_NAME" --query "Parameter.Value" --output text 2>/dev/null)-if [ -z "$ACCOUNT_ID" ]; then+if [ -z "$AWS_ACCOUNT_ID" ]; thenecho "Looking for account in organization"- ACCOUNT_ID=$(aws organizations list-accounts --query "Accounts[?Name=='$ACCOUNT_NAME'].Id" --output text 2>/dev/null)+ AWS_ACCOUNT_ID=$(aws organizations list-accounts --query "Accounts[?Name=='$AWS_ACCOUNT_NAME'].Id" --output text 2>/dev/null)- if [ -n "$ACCOUNT_ID" ]; then+ if [ -n "$AWS_ACCOUNT_ID" ]; thenecho "Storing account ID for future reference"- aws ssm put-parameter --name "/Account-Ids/$ACCOUNT_NAME" --value "$ACCOUNT_ID" --type String &>/dev/null+ aws ssm put-parameter --name "/Account-Ids/$AWS_ACCOUNT_NAME" --value "$AWS_ACCOUNT_ID" --type String &>/dev/nullfifi-if [ -z "$ACCOUNT_ID" ]; then- echo "Failed to find account ID for ACCOUNT_NAME: $ACCOUNT_NAME"+if [ -z "$AWS_ACCOUNT_ID" ]; then+ echo "Failed to find account ID for AWS_ACCOUNT_NAME: $AWS_ACCOUNT_NAME"else- echo "$ACCOUNT_ID"+ echo "$AWS_ACCOUNT_ID"fidiff --git a/.ci_cd/aws/get_account_id_from_host.sh b/.ci_cd/aws/get_account_id_from_host.shindex aee9bd553..64c485a7e 100644--- a/.ci_cd/aws/get_account_id_from_host.sh+++ b/.ci_cd/aws/get_account_id_from_host.sh@@ -35,7 +35,7 @@ while [ $COUNT -le $MAX ]; doif [ "$accName" == "$NAME" ]; thenecho "Possible account match '$accName'"# Look for host in this account- ACCOUNT_ID=$accId+ AWS_ACCOUNT_ID=$accIdsource "${awsDir}set_github-da_account_arn.sh"instanceId=$(aws ec2 describe-instances --filters "Name=tag:Name,Values=$HOST" --output text --query 'Reservations[*].Instances[*].InstanceId' --profile github-da)if [ -n "$instanceId" ]; then@@ -43,7 +43,7 @@ while [ $COUNT -le $MAX ]; doreturnelseecho "Account doesn't contain an instance named '$HOST'"- unset ACCOUNT_ID+ unset AWS_ACCOUNT_IDfifidonediff --git a/.ci_cd/aws/provision_account.sh b/.ci_cd/aws/provision_account.shindex a67b7f216..59510ddde 100644--- a/.ci_cd/aws/provision_account.sh+++ b/.ci_cd/aws/provision_account.sh@@ -15,10 +15,10 @@## Arguments:# 1 - OU - Name of organizational unit where account should be provisioned (defaults to account root if not set)-# 1 - ACCOUNT_NAME - Name of the new account (required)+# 1 - AWS_ACCOUNT_NAME - Name of the new account (required)# 2 - PARENT_DNS_ZONE - name of parent hosted domain zone in management account# 3 - HOSTED_DNS - If set to 'true' a sub domain hosted zone will be provisioned in the new account and delegated from the-# PARENT_DNS_ZONE in the callee account (e.g. x.y -> ACCOUNT_NAME.x.y)+# PARENT_DNS_ZONE in the callee account (e.g. x.y -> AWS_ACCOUNT_NAME.x.y)# 4 - PROVISION_EFS set to 'false' to not provision an EFS volume for the default VPC using (cloudformation-create-efs.yml)if [[ $BASH_SOURCE = */* ]]; then@@ -28,14 +28,14 @@ elsefiOU=${1}-ACCOUNT_NAME=${2,,}+AWS_ACCOUNT_NAME=${2,,}PARENT_DNS_ZONE=${3,,}HOSTED_DNS=${4,,}PROVISION_EFS=${5,,}ACCOUNT_PROFILE='--profile github-da'-if [ -z "$ACCOUNT_NAME" ]; then- echo "ACCOUNT_NAME must be set"+if [ -z "$AWS_ACCOUNT_NAME" ]; then+ echo "AWS_ACCOUNT_NAME must be set"exit 1fi@@ -43,14 +43,14 @@ fisource "${awsDir}login.sh"# Get github account ID from github profile-CALLER_ACCOUNT_ID=$(aws sts get-caller-identity --query 'Account' --output text)+CALLER_AWS_ACCOUNT_ID=$(aws sts get-caller-identity --query 'Account' --output text)# Check account doesn't already existsource "${awsDir}get_account_id.sh"-CatalogName="account-$ACCOUNT_NAME"+CatalogName="account-$AWS_ACCOUNT_NAME"-if [ -n "$ACCOUNT_ID" ]; then+if [ -n "$AWS_ACCOUNT_ID" ]; thenecho "Account already exists so skipping initial provisioning step"elseRandomToken=$(echo $(( $RANDOM * 99999999999 )) | cut -c 1-13)@@ -72,7 +72,7 @@ elseecho "Provisioning artifact ID: $pa_id"fi- PARAMS="Key=SSOUserFirstName,Value=$ACCOUNT_NAME Key=SSOUserLastName,Value=$ACCOUNT_NAME Key=SSOUserEmail,[email protected] Key=AccountEmail,[email protected] Key=AccountName,Value=$ACCOUNT_NAME"+ PARAMS="Key=SSOUserFirstName,Value=$AWS_ACCOUNT_NAME Key=SSOUserLastName,Value=$AWS_ACCOUNT_NAME Key=SSOUserEmail,[email protected] Key=AccountEmail,[email protected] Key=AccountName,Value=$AWS_ACCOUNT_NAME"if [ -n "$OU" ]; thenROOT_ID=$(aws organizations list-roots --query "Roots[0].Id" --output text)OU_ID=$(aws organizations list-organizational-units-for-parent --parent-id $ROOT_ID --query "OrganizationalUnits[?Name=='$OU'].Id" --output text)@@ -107,17 +107,17 @@ else# Get account ID of newly provisioned accountProvisionedProductId=$(aws servicecatalog scan-provisioned-products --query "ProvisionedProducts[?Name=='$CatalogName'].Id" --output text)- ACCOUNT_ID=$(aws servicecatalog get-provisioned-product-outputs --provisioned-product-id $ProvisionedProductId --query "Outputs[?OutputKey=='AccountId'].OutputValue" --output text 2>/dev/null)+ AWS_ACCOUNT_ID=$(aws servicecatalog get-provisioned-product-outputs --provisioned-product-id $ProvisionedProductId --query "Outputs[?OutputKey=='AccountId'].OutputValue" --output text 2>/dev/null)fi-if [ -z "$ACCOUNT_ID" ]; then+if [ -z "$AWS_ACCOUNT_ID" ]; thenecho "Failed to get ID of new account"exit 1fi# Store account ID in SSM (aws organizations list-accounts doesn't support server side filtering)echo "Storing account ID for future reference"-aws ssm put-parameter --name "/Account-Ids/$ACCOUNT_NAME" --value "$ACCOUNT_ID" --type String &>/dev/null+aws ssm put-parameter --name "/Account-Ids/$AWS_ACCOUNT_NAME" --value "$AWS_ACCOUNT_ID" --type String &>/dev/null# Wait for control tower customisations to completeSTATUS=$(aws codepipeline list-pipeline-executions --pipeline-name Custom-Control-Tower-CodePipeline --query "pipelineExecutionSummaries[0].status" --output text)@@ -182,7 +182,7 @@ fi# Create/remove hosted zone as requestedif [ -n "$PARENT_DNS_ZONE" ]; then- HOSTED_ZONE="$ACCOUNT_NAME.$PARENT_DNS_ZONE"+ HOSTED_ZONE="$AWS_ACCOUNT_NAME.$PARENT_DNS_ZONE"PARENT_HOSTED_ZONE_ID=$(aws route53 list-hosted-zones --query "HostedZones[?Name=='$PARENT_DNS_ZONE.'].Id" --output text 2>/dev/null)SUB_HOSTED_ZONE_ID=$(aws route53 list-hosted-zones --query "HostedZones[?Name=='$HOSTED_ZONE.'].Id" --output text $ACCOUNT_PROFILE 2>/dev/null)@@ -200,7 +200,7 @@ if [ -n "$PARENT_DNS_ZONE" ]; thenread -r -d '' RECORDSET << EOF{- "Comment": "Creating NS record for account '$ACCOUNT_ID' subdomain",+ "Comment": "Creating NS record for account '$AWS_ACCOUNT_ID' subdomain","Changes": [{"Action": "UPSERT",@@ -231,12 +231,12 @@ fi# Update SSH Whitelist for this accountif [ -n "$SGID" ]; then- "${awsDir}refresh_ssh_whitelist.sh" "" "" $ACCOUNT_ID+ "${awsDir}refresh_ssh_whitelist.sh" "" "" $AWS_ACCOUNT_IDfi# Provision EFS unless set to falseif [ "$PROVISION_EFS" != 'false' ]; then- echo "Provisioning EFS for account '$ACCOUNT_NAME' using cloud formation template"+ echo "Provisioning EFS for account '$AWS_ACCOUNT_NAME' using cloud formation template"if [ -f "${awsDir}cloudformation-create-efs.yml" ]; thenTEMPLATE_PATH="${awsDir}cloudformation-create-efs.yml"diff --git a/.ci_cd/aws/provision_host.sh b/.ci_cd/aws/provision_host.shindex ba54e6c75..e328affe8 100644--- a/.ci_cd/aws/provision_host.sh+++ b/.ci_cd/aws/provision_host.sh@@ -3,12 +3,13 @@# Provisions the standard stack of resources using CloudFormation template (cloudformation-create-ec2.yml) in the# specified AWS member account; if no account specified then the account of the authenticated user will be used.# The account must already exist and be provisioned in the standard way (see provision_account.sh). To access the-# account the developers-access role in that account will be assumed. This script will determine the DNS hosted+# account the $AWS_ROLE_NAME role in that account will be assumed (this role must exist and must have sufficient+# privileges to run the commands contained in this script). This script will determine the DNS hosted# zone into which the A record for the host should be inserted by searching up the domain levels of the hosts FQDN.# Will also provision an S3 bucket with the name of host (periods replaced with hyphens) unless set to false.## To be called with arguments:-# 1 - ACCOUNT_NAME where resources should be created (defaults to callers account)+# 1 - AWS_ACCOUNT_NAME where resources should be created (defaults to callers account)# 2 - HOST FQDN for e.g. staging.demo.openremote.app# 3 - INSTANCE_TYPE EC2 instance type see cloud formation template parameter# 4 - PROVISION_S3_BUCKET set to 'false' to not provision an S3 bucket for this host@@ -20,7 +21,7 @@ elseawsDir=./fi-ACCOUNT_NAME=${1,,}+AWS_ACCOUNT_NAME=${1,,}HOST=${2,,}INSTANCE_TYPE=${3,,}PROVISION_S3_BUCKET=${4,,}@@ -46,8 +47,8 @@ fisource "${awsDir}login.sh"ACCOUNT_PROFILE=-if [ -n "$ACCOUNT_NAME" ]; then- # Update github-da profile with ARN for ACCOUNT_ID+if [ -n "$AWS_ACCOUNT_NAME" ]; then+ # Update github-da profile with ARN for AWS_ACCOUNT_IDsource "${awsDir}set_github-da_account_arn.sh"ACCOUNT_PROFILE="--profile github-da"fi@@ -62,8 +63,8 @@ if [ -n "$STATUS" ] && [ "$STATUS" != 'DELETE_COMPLETE' ]; thenSTACK_ID=$(aws cloudformation describe-stacks --stack-name $STACK_NAME --query "Stacks[0].StackId" --output text $ACCOUNT_PROFILE 2>/dev/null)else#Configure parameters- CALLER_ACCOUNT_ID=$(aws sts get-caller-identity --query 'Account' --output text)- SMTP_ARN="arn:aws:ses:$AWS_REGION:$CALLER_ACCOUNT_ID:identity/openremote.io"+ CALLER_AWS_ACCOUNT_ID=$(aws sts get-caller-identity --query 'Account' --output text)+ SMTP_ARN="arn:aws:ses:$AWS_REGION:$CALLER_AWS_ACCOUNT_ID:identity/openremote.io"PARAMS="ParameterKey=Host,ParameterValue=$HOST ParameterKey=SMTPORArn,ParameterValue=$SMTP_ARN"if [ -n "$INSTANCE_TYPE" ]; thendiff --git a/.ci_cd/aws/refresh_ssh_whitelist.sh b/.ci_cd/aws/refresh_ssh_whitelist.shindex e98522820..04cff6f74 100644--- a/.ci_cd/aws/refresh_ssh_whitelist.sh+++ b/.ci_cd/aws/refresh_ssh_whitelist.sh@@ -17,8 +17,8 @@ elsefiOUS=$1-ACCOUNT_NAMES=$2-ACCOUNT_IDS=$3+AWS_ACCOUNT_NAMES=$2+AWS_ACCOUNT_IDS=$3ACCOUNT_PROFILE="--profile github-da"echo "Attempting to set the SSH whitelist for the specified account(s)"@@ -35,22 +35,22 @@ if [ -n "$OUS" ]; thenecho "Couldn't resolve OU '$ou'"exit 1fi- ACCOUNT_IDS=$(aws organizations list-accounts-for-parent --parent-id ou-hbsh-9i66giju --query "Accounts[?Status=='ACTIVE'].Id" --output text)+ AWS_ACCOUNT_IDS=$(aws organizations list-accounts-for-parent --parent-id ou-hbsh-9i66giju --query "Accounts[?Status=='ACTIVE'].Id" --output text)done-elif [ -n "$ACCOUNT_NAMES" ]; then+elif [ -n "$AWS_ACCOUNT_NAMES" ]; thenIFS=$','- for ACCOUNT_NAME in $ACCOUNT_NAMES; do- # Get ACCOUNT_ID+ for AWS_ACCOUNT_NAME in $AWS_ACCOUNT_NAMES; do+ # Get AWS_ACCOUNT_IDsource "${awsDir}get_account_id.sh" &>/dev/nullif [ $? -ne 0 ]; then- echo "Couldn't resolve Account name '$ACCOUNT_NAME'"+ echo "Couldn't resolve Account name '$AWS_ACCOUNT_NAME'"exit 1fi- ACCOUNT_IDS="$ACCOUNT_IDS $ACCOUNT_ID"+ AWS_ACCOUNT_IDS="$AWS_ACCOUNT_IDS $AWS_ACCOUNT_ID"donefi-if [ -z "$ACCOUNT_IDS" ]; then+if [ -z "$AWS_ACCOUNT_IDS" ]; thenecho "Failed to resolve OUs or accounts or no account IDs provided"exit 1fi@@ -58,11 +58,11 @@ fiSSH_LIST=$(aws ssm get-parameters-by-path --path "/SSH-Whitelist" --query "Parameters[*].[Name,Value]" --output text)IFS=$' \t'-for ACCOUNT_ID in $ACCOUNT_IDS; do- # Update github-da profile with ARN for ACCOUNT_ID+for AWS_ACCOUNT_ID in $AWS_ACCOUNT_IDS; do+ # Update github-da profile with ARN for AWS_ACCOUNT_IDsource "${awsDir}set_github-da_account_arn.sh"- echo "Revoking existing SSH Whitelist for Account '$ACCOUNT_ID'"+ echo "Revoking existing SSH Whitelist for Account '$AWS_ACCOUNT_ID'"LIST=$(aws ec2 describe-security-groups --filters Name=ip-permission.from-port,Values=22 Name=group-name,Values=ssh-access --query 'SecurityGroups[0].IpPermissions[?(IpProtocol==`tcp` && FromPort==`22`)]' --output json $ACCOUNT_PROFILE)if [ -n "$LIST" ] && [ "$LIST" != "null" ]; thenaws ec2 revoke-security-group-ingress --group-name ssh-access --ip-permissions "$LIST" $ACCOUNT_PROFILEdiff --git a/.ci_cd/aws/set_github-da_account_arn.sh b/.ci_cd/aws/set_github-da_account_arn.shindex f64299ed0..00a8431ba 100644--- a/.ci_cd/aws/set_github-da_account_arn.sh+++ b/.ci_cd/aws/set_github-da_account_arn.sh@@ -1,6 +1,6 @@#!/bin/bash-# Updates/creates the github-da AWS profile with developers-access assumed role so scripts can switch between which+# Updates/creates the github-da AWS profile with AWS_ROLE_NAME assumed role so scripts can switch between which# credentials are used.if [[ $BASH_SOURCE = */* ]]; then@@ -9,16 +9,16 @@ elseawsDir=./fi-if [ -z "$ACCOUNT_ID" ]; then- if [ -z "$ACCOUNT_NAME" ]; then- echo "ACCOUNT_ID or ACCOUNT_NAME must be set to use this script"+if [ -z "$AWS_ACCOUNT_ID" ]; then+ if [ -z "$AWS_ACCOUNT_NAME" ]; then+ echo "AWS_ACCOUNT_ID or AWS_ACCOUNT_NAME must be set to use this script"exit 1fisource "${awsDir}get_account_id.sh"fi-if [ -z "$ACCOUNT_ID" ]; then+if [ -z "$AWS_ACCOUNT_ID" ]; thenecho "Cannot determine account ID"exit 1fi@@ -28,16 +28,22 @@ if [ "$RETRY" == 'true' ]; thencount=0fi+# Verify that the role name is set+if [ -z "$AWS_ROLE_NAME" ]; then+ echo "AWS_ROLE_NAME must be set"+ exit 1+fi+# Verify that the role can be assumed-ROLE_ARN="arn:aws:iam::$ACCOUNT_ID:role/developers-access-$AWS_REGION"+ROLE_ARN="arn:aws:iam::$AWS_ACCOUNT_ID:role/$AWS_ROLE_NAME-$AWS_REGION"aws configure --profile github-da set source_profile githubaws configure --profile github-da set role_arn $ROLE_ARNecho "Setting github-da role ARN to '$ROLE_ARN'"# Try and assume the role-aws sts assume-role --role-arn $ROLE_ARN --role-session-name "github-developers-access-$AWS_REGION" --duration-seconds=900 &>/dev/null+aws sts assume-role --role-arn $ROLE_ARN --role-session-name "github-$AWS_ROLE_NAME-$AWS_REGION" --duration-seconds=900 &>/dev/null-until [ $count -ge 20 ] || aws sts assume-role --role-arn $ROLE_ARN --role-session-name "github-developers-access-$AWS_REGION" --duration-seconds=900 &>/dev/null; do+until [ $count -ge 20 ] || aws sts assume-role --role-arn $ROLE_ARN --role-session-name "github-$AWS_ROLE_NAME-$AWS_REGION" --duration-seconds=900 &>/dev/null; doecho "Failed to assume role .. Sleeping 30 seconds"sleep 30count=$((count+1))diff --git a/.ci_cd/aws/start_stop_host.sh b/.ci_cd/aws/start_stop_host.shindex fcbfc708e..251d3fa54 100644--- a/.ci_cd/aws/start_stop_host.sh+++ b/.ci_cd/aws/start_stop_host.sh@@ -5,7 +5,7 @@# Arguments:# 1 - start/stop# 2 - HOST name of the instance (host FQDN)-# 3 - ACCOUNT_NAME name of the account that contains the instance (optional)+# 3 - AWS_ACCOUNT_NAME name of the account that contains the instance (optional)if [[ $BASH_SOURCE = */* ]]; thenawsDir=${BASH_SOURCE%/*}/@@ -15,7 +15,7 @@ fiACTION=${1,,}HOST=${2,,}-ACCOUNT_NAME=${3,,}+AWS_ACCOUNT_NAME=${3,,}source "${awsDir}login.sh"@@ -24,16 +24,16 @@ if [ -z "$HOST" ]; thenexit 1fi-if [ -z "$ACCOUNT_NAME" ]; then+if [ -z "$AWS_ACCOUNT_NAME" ]; thenecho "Attempting to find owning account for host '$HOST'"source "${awsDir}get_account_id_from_host.sh" $HOST- if [ -z "$ACCOUNT_ID" ]; then+ if [ -z "$AWS_ACCOUNT_ID" ]; thenecho "Failed to find owning account"exit 1fifi-# Update github-da profile with ARN for ACCOUNT_ID+# Update github-da profile with ARN for AWS_ACCOUNT_IDsource "${awsDir}set_github-da_account_arn.sh"ACCOUNT_PROFILE="--profile github-da"diff --git a/.ci_cd/deploy.sh b/.ci_cd/deploy.shindex 8f14c7ef8..dae89b831 100644--- a/.ci_cd/deploy.sh+++ b/.ci_cd/deploy.sh@@ -99,33 +99,14 @@ if [ -n "$SSH_USER" ]; thenhostStr="${SSH_USER}@$hostStr"fi-# Cannot ping from github runners so commenting this out-# Check host is reachable (ping must be enabled)-#if [ "$SKIP_HOST_PING" != 'true' ]; then-# echo "Attempting to ping host"-# ping -c1 -W1 -q $OR_HOSTNAME &>/dev/null-# if [ $? -ne 0 ]; then-# echo "Host is not reachable by PING"-# if [ "$SKIP_AWS_EC2_START" != 'true' ] && [ "$AWS_ENABLED" == 'true' ]; then-# "temp/aws/start_stop_host.sh" "START" "$OR_HOSTNAME"-# if [ $? -ne 0 ]; then-# # Don't exit as it might just not be reachable by PING we'll fail later on-# echo "EC2 instance start failed"-# else-# echo "EC2 instance start succeeded"-# fi-# fi-# fi-#fi-# Grant SSH access to this runner's public IP on AWSif [ "$SKIP_SSH_WHITELIST" != 'true' ]; thenif [ -n "$CIDR" ]; then- if [ -z "$ACCOUNT_NAME" ] && [ -z "$ACCOUNT_ID" ]; then+ if [ -z "$AWS_ACCOUNT_NAME" ] && [ -z "$AWS_ACCOUNT_ID" ]; thenecho "Account ID or name is not set so searching for it"source temp/aws/get_account_id_from_host.sh- if [ -z "$ACCOUNT_ID" ]; then+ if [ -z "$AWS_ACCOUNT_ID" ]; thenecho "Unable to determine account for host '$HOST'"exit 1fi@@ -143,7 +124,7 @@ fi# Determine host platform via ssh for deployment image building (can't export/import manifests)PLATFORM=$($sshCommandPrefix $hostStr -- uname -m)-if [ "$?" != 0 -o -z "$PLATFORM" ]; then+if [ $? -ne 0 ] || [ -z "$PLATFORM" ]; thenecho "Failed to determine host platform, most likely SSH credentials and/or settings are invalid"revoke_sshexit 1diff --git a/.ci_cd/env/.env b/.ci_cd/env/.envindex c26db6f33..f537ea2c0 100644--- a/.ci_cd/env/.env+++ b/.ci_cd/env/.env@@ -1,4 +1,4 @@-ACCOUNT_NAME=openremote+AWS_ACCOUNT_NAME=openremoteCLEAN_INSTALL=trueDAILY_RESTART=trueDAILY_BACKUP=false