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 (#671)
Rich Turner9ff1b108c8dc
diff --git a/.ci_cd/aws/cloudformation-create-ec2.yml b/.ci_cd/aws/cloudformation-create-ec2.ymlindex 222479638..940bc9cc4 100644--- a/.ci_cd/aws/cloudformation-create-ec2.yml+++ b/.ci_cd/aws/cloudformation-create-ec2.yml@@ -486,10 +486,11 @@ Resources:01_output_smtp_credentials:command: !Sub |PASS=$(python3 /home/ec2-user/smtp_credentials_generate.py ${SMTPSecret} ${AWS::Region})- echo "OR_EMAIL_HOST=email-smtp.${AWS::Region}.amazonaws.com" >> /etc/environment+ echo "OR_EMAIL_HOST=email-smtp.${AWS::Region}.amazonaws.com" > /etc/environmentecho "OR_EMAIL_USER=${SMTPKey}" >> /etc/environmentecho "OR_EMAIL_PASSWORD=$PASS" >> /etc/environmentecho 'OR_EMAIL_X_HEADERS="X-SES-SOURCE-ARN: ${SMTPORArn}"' >> /etc/environment+ echo "AWS_REGION=${AWS::Region}" >> /etc/environmentdocker_setup:packages:@@ -534,7 +535,7 @@ Resources:[main]stack=${AWS::StackId}region=${AWS::Region}- interval=1+ interval=10mode: 000400owner: rootgroup: rootdiff --git a/.ci_cd/deploy.sh b/.ci_cd/deploy.shindex 0594ca925..eff6b6f23 100644--- a/.ci_cd/deploy.sh+++ b/.ci_cd/deploy.sh@@ -28,7 +28,7 @@ if [ -f "temp/env" ]; thenecho "Loading environment variables: 'temp/env'"set -a. ./temp/env- set +x+ set +aecho "Environment variables loaded:"cat temp/env@@ -43,10 +43,10 @@ HOST="$OR_HOSTNAME"# Load temp environment variables into this sessionif [ -f "temp.env" ]; then- echo "Loading SSH password environment variable: 'temp.env'"+ echo "Loading temp environment variables: 'temp.env'"set -a. ./temp.env- set +x+ set +afi# Copy CI/CD files into temp dirdiff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.ymlindex 149b9fda3..b8925e895 100644--- a/.github/workflows/ci_cd.yml+++ b/.github/workflows/ci_cd.yml@@ -672,7 +672,7 @@ jobs:os.putenv("ENVIRONMENT", env)# Clean stale ssh credentials and temp files- os.system("rm ssh.env 2>/dev/null")+ os.system("rm temp.env 2>/dev/null")os.system("rm ssh.key 2>/dev/null")os.system("rm -r temp 2>/dev/null")os.system("mkdir temp")@@ -716,7 +716,7 @@ jobs:if key == "SSH_KEY":os.system(f"echo \"{value}\" > ssh.key")elif key == "SSH_PASSWORD" or key == "AWS_ACCESS_KEY_ID" or key == "AWS_SECRET_ACCESS_KEY":- os.system(f"echo '{key}=\"{value}\"' > temp.env")+ os.system(f"echo '{key}=\"{value}\"' >> temp.env")else:lines = len(value.split("\n"))if lines > 1:diff --git a/profile/dev-ui.yml b/profile/dev-ui.ymlindex 04588e45b..4f4a475b0 100644--- a/profile/dev-ui.yml+++ b/profile/dev-ui.yml@@ -49,7 +49,8 @@ services:volumes:- temp-data:/tmpenvironment:- OR_SETUP_RUN_ON_RESTART: "true"- OR_DEV_MODE: "true"+ OR_SETUP_RUN_ON_RESTART: ${OR_SETUP_RUN_ON_RESTART:-true}+ OR_DEV_MODE: ${OR_DEV_MODE:-true}+ KEYCLOAK_FRONTEND_URL:ports:- "8080:8080"