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 config updates
Rich Turner7855db41f8ff
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.ymlindex 465c8504a..29e21193f 100644--- a/.github/workflows/deploy.yml+++ b/.github/workflows/deploy.yml@@ -151,6 +151,11 @@ jobs:secrets = json.loads(os.getenv('secret'))for key, value in secrets.items():+ if key.startswith("_"):+ if not key.startswith("_" + os.getenv('environment') + "_"):+ continue+ else:+ key = key.lstrip("_" + os.getenv('environment') + "_")print(f"Setting {key} ...")lines = len(value.split("\n"))if lines > 1:@@ -161,6 +166,7 @@ jobs:os.system(f"echo '{key}={value}' >> $GITHUB_ENV")env:secret: ${{ toJSON(secrets) }}+ environment: ${{ github.event.inputs.environment }}- name: Determine host nameid: host-name@@ -333,13 +339,13 @@ jobs:distribution: 'temurin'java-version: '17'cache: 'gradle'-+- name: Grant execute permission for gradlew and make image-cacheif: ${{ env.MANAGER_BUILD == 'true' || env.DEPLOYMENT_BUILD == 'true' }}run: |chmod +x gradlewmkdir -p ~/image-cache-+- name: Get yarn cache directory pathif: ${{ env.MANAGER_BUILD == 'true' || env.DEPLOYMENT_BUILD == 'true' }}id: yarn-cache-dir-path@@ -354,7 +360,7 @@ jobs:key: ${{ runner.os }}-yarn---${{ hashFiles('**/yarn.lock') }}restore-keys: |${{ runner.os }}-yarn----+- name: Do code buildif: ${{ env.MANAGER_BUILD == 'true' || env.DEPLOYMENT_BUILD == 'true' }}run: |@@ -379,13 +385,13 @@ jobs:- name: Build and save manager imageif: ${{ env.MANAGER_BUILD == 'true' }}run: |- docker build --build-arg GIT_COMMIT=$MANAGER_VERSION --platform $PLATFORM -t openremote/manager:$MANAGER_VERSION $MANAGER_PATH+ docker build --load --build-arg GIT_COMMIT=$MANAGER_VERSION --platform $PLATFORM -t openremote/manager:$MANAGER_VERSION $MANAGER_PATHdocker save openremote/manager:$MANAGER_VERSION | gzip > temp/manager.tar.gz- name: Build and save deployment imageif: ${{ env.DEPLOYMENT_BUILD == 'true' }}run: |- docker build --build-arg GIT_COMMIT=$DEPLOYMENT_VERSION --platform $PLATFORM -t openremote/deployment:$DEPLOYMENT_VERSION $DEPLOYMENT_PATH+ docker build --load --build-arg GIT_COMMIT=$DEPLOYMENT_VERSION --platform $PLATFORM -t openremote/deployment:$DEPLOYMENT_VERSION $DEPLOYMENT_PATHdocker save openremote/deployment:$DEPLOYMENT_VERSION | gzip > temp/deployment.tar.gz- name: Copy files to host@@ -452,7 +458,7 @@ jobs:# Start the stackdocker-compose -f temp/docker-compose.yml -p or up -d-+- name: Wait for up to 5 mins for manager webserver to be runningrun: |echo "Waiting for manager web server https://$HOST..."