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
CI/CD: Minor update (#788)
Rich Turner1108e3006934
diff --git a/.ci_cd/aws/refresh_ssh_whitelist.sh b/.ci_cd/aws/refresh_ssh_whitelist.shindex 48cf4c93a..6b8c8de61 100644--- a/.ci_cd/aws/refresh_ssh_whitelist.sh+++ b/.ci_cd/aws/refresh_ssh_whitelist.sh@@ -19,6 +19,7 @@ fiOUS=$1AWS_ACCOUNT_NAMES=$2AWS_ACCOUNT_IDS=$3+AWS_ROLE_NAME="developers-access"ACCOUNT_PROFILE="--profile github-da"echo "Attempting to set the SSH whitelist for the specified account(s)"@@ -59,6 +60,7 @@ SSH_LIST=$(aws ssm get-parameters-by-path --path "/SSH-Whitelist" --query "ParamIFS=$' \t'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"diff --git a/.ci_cd/aws/ssh_whitelist.sh b/.ci_cd/aws/ssh_whitelist.shindex c9d7267ff..8bde9ce06 100644--- a/.ci_cd/aws/ssh_whitelist.sh+++ b/.ci_cd/aws/ssh_whitelist.sh@@ -31,7 +31,11 @@ if [ -n "$CIDR" ]; thenexit 1fi- aws ec2 authorize-security-group-ingress --group-id $SGID --ip-permissions "IpProtocol=tcp,FromPort=22,ToPort=22,IpRanges=[{CidrIp=$CIDR,Description=$DESCRIPTION}]" $PROFILE+ if [[ "$CIDR" == *":"* ]]; then+ aws ec2 authorize-security-group-ingress --group-id $SGID --ip-permissions "IpProtocol=tcp,FromPort=22,ToPort=22,Ipv6Ranges=[{CidrIpv6=$CIDR,Description=$DESCRIPTION}]" $PROFILE+ else+ aws ec2 authorize-security-group-ingress --group-id $SGID --ip-permissions "IpProtocol=tcp,FromPort=22,ToPort=22,IpRanges=[{CidrIp=$CIDR,Description=$DESCRIPTION}]" $PROFILE+ fiif [ $? -ne 0 ]; thenecho "SSH Access failed might not be able to SSH into host(s)"