diff --git a/.github/workflows/builds.sh b/.github/workflows/builds.sh index be5fecb8..c44111db 100644 --- a/.github/workflows/builds.sh +++ b/.github/workflows/builds.sh @@ -14,3 +14,21 @@ do fi done + +# Format the README file +regex_pattern="## Sample Application Descriptions" +file_path="README.md" + +cat << EOF > built_apps/README.md +These files are sample SDK Applications that are ready to use for testing and do not require modification or "building" of the app from source files. + +## How to use these files: ## +Download the .tar.gz file, then upload to your NetCloud Manager account and assign to groups. + +Additional documentation: +https://customer.cradlepoint.com/s/article/NetCloud-Manager-Tools-Tab#sdk_apps + +---------- +EOF + +sed -n "/$regex_pattern/,\$p" "$file_path" >> built_apps/README.md \ No newline at end of file diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml index d1894e6f..d1dae1fc 100644 --- a/.github/workflows/manual.yml +++ b/.github/workflows/manual.yml @@ -3,8 +3,6 @@ on: push: branches: - master - tags: - - v* pull_request: branches: - master @@ -32,26 +30,34 @@ jobs: ./.github/workflows/csclient_compare.sh shell: bash - name: Run make build and clean - if: github.event_name == 'pull_request' run: | chmod +x ./.github/workflows/builds.sh ./.github/workflows/builds.sh shell: bash - name: Tag - if: github.event_name == 'push' && !startsWith(github.ref, 'refs/tags/v') - run: | - git config --global user.name 'Github actions auto build packages' - git config --global user.email 'Github_actions_auto_build_packages@users.noreply.github.com' - chmod +x ./.github/workflows/builds.sh - ./.github/workflows/builds.sh - git tag -a v1 -m "v1" - git push origin --tags - shell: bash + if: github.event_name == 'push' + uses: actions/github-script@v3 + with: + github-token: ${{ github.token }} + script: | + github.git.deleteRef({ + owner: context.repo.owner, + repo: context.repo.repo, + ref: "tags/built_apps" + }) + github.git.createRef({ + owner: context.repo.owner, + repo: context.repo.repo, + ref: "refs/tags/built_apps", + sha: context.sha + }) + setTimeout(() => { console.log("Done") }, 3000) - name: Publish - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') + if: github.event_name == 'push' uses: softprops/action-gh-release@v1 - # TODO: if any of the build step fails, the release should be deleted. with: - files: 'built_apps/*' - env: - GITHUB_TOKEN: ${{ secrets.TOKEN }} \ No newline at end of file + files: 'built_apps/*.tar.gz' + tag_name: "built_apps" + token: ${{ secrets.TOKEN }} + body_path: ./built_apps/README.md + name: "Built Apps" \ No newline at end of file diff --git a/README.md b/README.md index 234908d5..08924b92 100755 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ This directory contains the NCOS SDK tools and sample applications. -The Application Developmers Guide is the best document to read first. +The Application Developers Guide is the best document to read first. ## Documents @@ -13,7 +13,16 @@ The Application Developmers Guide is the best document to read first. - **Cradlepoint NCOS SDK v3.1 Application Developers Guide.html** - The main document that describes application development. -## Sample Application Directories +## Files + +- **make.py** + - The main python tool used to build application packages and install, uninstall, start, stop, or purge from a locally connected device that is in DEV mode. +- **sdk_settings.ini** + - This is the ini file that contains the settings used by python make.py. +- **tools/** + - Contains support files for the SDK. There is also a simple python syslog server that can be used during application development. + +## Sample Application Descriptions - **5GSpeed** - Run Ookla speedtests via NCM API. Results are put in asset_id field (configurable in SDK Data). Clearing the results starts a new test. This can be done easily via NCM API v2 /routers/ endpoint. @@ -100,19 +109,6 @@ The Application Developmers Guide is the best document to read first. - **throttle_cellular_datacap_rate_tiered** - Upon *any* Modem interface reaching 70, 80, 90 or 100% of the monthly data capacity limit, manual QoS will be enabled globally and bandwidth throttling will be enforced on ALL Modem profiles to the configured limit as set by the rate tier (minbwup and minbwdown variables). -- **built_apps/** - - Ready to use sample apps - Download the .tar.gz file, then upload to your NetCloud Manager account and assign to groups. - -- **tools/** - - Contains support files for the SDK. There is also a simple python syslog server that can be used during application development. - -## Files - -- **make.py** - - The main python tool used to build application packages and install, uninstall, start, stop, or purge from a locally connected device that is in DEV mode. -- **sdk_settings.ini** - - This is the ini file that contains the settings used by python make.py. - ---------- This software, including any sample applications, and associated documentation (the "Software"), are subject to the Cradlepoint Terms of Service and License Agreement available at https://cradlepoint.com/terms-of-service (“TSLA”). diff --git a/built_apps/5GSpeed.tar.gz b/built_apps/5GSpeed.tar.gz deleted file mode 100644 index 58a3f7c6..00000000 Binary files a/built_apps/5GSpeed.tar.gz and /dev/null differ diff --git a/built_apps/AutoInstall.tar.gz b/built_apps/AutoInstall.tar.gz deleted file mode 100644 index d31ea9b3..00000000 Binary files a/built_apps/AutoInstall.tar.gz and /dev/null differ diff --git a/built_apps/Boot2.tar.gz b/built_apps/Boot2.tar.gz deleted file mode 100644 index e1b4c2fa..00000000 Binary files a/built_apps/Boot2.tar.gz and /dev/null differ diff --git a/built_apps/Installer_UI.tar.gz b/built_apps/Installer_UI.tar.gz deleted file mode 100644 index a79c2dc0..00000000 Binary files a/built_apps/Installer_UI.tar.gz and /dev/null differ diff --git a/built_apps/Mobile_Site_Survey.tar.gz b/built_apps/Mobile_Site_Survey.tar.gz deleted file mode 100644 index 0c4d905a..00000000 Binary files a/built_apps/Mobile_Site_Survey.tar.gz and /dev/null differ diff --git a/built_apps/OBDII_monitor.tar.gz b/built_apps/OBDII_monitor.tar.gz deleted file mode 100644 index 85b9c245..00000000 Binary files a/built_apps/OBDII_monitor.tar.gz and /dev/null differ diff --git a/built_apps/README.md b/built_apps/README.md index 74990afe..4ffec8c6 100755 --- a/built_apps/README.md +++ b/built_apps/README.md @@ -1,80 +1 @@ -# Built Apps -These files are sample SDK Applications that are ready to use for testing and do not require modification or "building" of the app from source files. - -## How to use these files: ## -Download the .tar.gz file, then upload to your NetCloud Manager account and assign to groups. - -Additional documentation: -https://customer.cradlepoint.com/s/article/NetCloud-Manager-Tools-Tab#sdk_apps - ----------- - -## App Descriptions ## - -- **5GSpeed** - - Run Ookla speedtests via NCM API. Results are put in asset_id field (configurable in SDK Data). Clearing the results starts a new test. This can be done easily via NCM API v2 /routers/ endpoint. -- **Autoinstall** - - Automatically choose fastest SIM on install. On bootup, AutoInstall detects SIMs, and ensures (clones) they have unique WAN profiles for prioritization. Then the app collects diagnostics and runs Ookla speedtests on each SIM. Then the app prioritizes the SIMs WAN Profiles by TCP download speed. Results are written to the log, set as the description field, and sent as a custom alert. The app can be manually triggered again by clearing out the description field in NCM. -- **Installer_UI** - - Provide a web interface for installers to configure WiFi and run speedtests. -- **Mobile_Site_Survey** - - Robust Site Survey app with cloud aggregating and reporting via 5g-ready.io -- **cp_shell_** - - Web interface for running linux shell commands. -- **cpu_usage** - - Gets cpu and memory usage information from the router every 30 seconds and writes a csv file to a usb stick formatted in fat32. -- **ftp_client** - - Creates a file and uploads it to an FTP server. -- **ftp_server** - - Creates an FTP server in the device. A USB memory device is used as the FTP directory. -- **geofences** - - Send alert when entering or exiting geofences. Configure geofences in SDK app data after loading app. -- **gpio_any_wan_connected** - - Set GPIO out high when any wan (not just modems) is connected. -- **gps_probe** - - Probe the GPS hardware and log the results. -- **hello_world** - - Outputs a 'Hello World!' log every 10 seconds. -- **hspt** - - Sets up a custom Hot Spot landing page. -- **ibr1700_gnss** - - Demonstrates how to access the gyroscope and accelerometer data on the IBR1700 -- **ibr1700_obdII** - - Demonstrates how to access OBD-II PIDs on the IBR1700 -- **logfile** - - Writes router logs to flash available for download via HTTP/NCM LAN Manager port 8000. -- **mosquitto** - - Demonstrates launching embedded mosquitto server -- **mqtt_app** - - Demonstrated MQTT using the paho library -- **mqtt_azure_client** - - Sample Application which uses SDK to send sensor data to Microsoft Azure IoT Central. -- **mqtt_azure_tls** - - Sample Application which uses SDK to send sensor data to Microsoft Azure IoT Central over TLS connection. -- **OBDII_monitor** - - Monitor OBD-II values, put latest values in asset_id, and alert on conditions defined in SDK AppData. -- **ping_sample** - - Contains ping function and example usage. -- **ports_status** - - Sets the device description to visually show the LAN/WAN/WWAN/Modem/IP Verify status -- **python_module_list** - - This app will log the python version and modules in the device. It is intended to help with app development to show the python environment within the device. -- **send_to_server** - - Gets the '/status' from the device config store and send it to a test server. -- **simple_custom_dashboard** - - Creates a simple dashboard using HTML and JS. Note that any 'server function' requires the router firewall to be correctly changed to allow client access to the router. -- **simple_web_server** - - A simple web server to receive messages. Note that any 'server function' requires the router firewall to be correctly changed to allow client access to the router. -- **system_monitor** - - Get various system diagnostics, alert on thresholds, and put current status in asset_id field. -- **tornado_sample** - - A webserver using Tornado with NCM-themed example to set WiFi SSIDs. - - ----------- - -This software, including any sample applications, and associated documentation (the "Software"), are subject to the Cradlepoint Terms of Service and License Agreement available at https://cradlepoint.com/terms-of-service (“TSLA”). - -NOTWITHSTANDING ANY PROVISION CONTAINED IN THE TSLA, CRADLEPOINT DOES NOT WARRANT THAT THE SOFTWARE OR ANY FUNCTION CONTAINED THEREIN WILL MEET CUSTOMER’S REQUIREMENTS, BE UNINTERRUPTED OR ERROR-FREE, THAT DEFECTS WILL BE CORRECTED, OR THAT THE SOFTWARE IS FREE OF VIRUSES OR OTHER HARMFUL COMPONENTS. THE SOFTWARE IS PROVIDED “AS-IS,” WITHOUT ANY WARRANTIES OF ANY KIND. ANY USE OF THE SOFTWARE IS DONE AT CUSTOMER’S SOLE RISK AND CUSTOMER WILL BE SOLELY RESPONSIBLE FOR ANY DAMAGE, LOSS OR EXPENSE INCURRED AS A RESULT OF OR ARISING OUT OF CUSTOMER’S USE OF THE SOFTWARE. CRADLEPOINT MAKES NO OTHER WARRANTY, EITHER EXPRESSED OR IMPLIED, WITH RESPECT TO THE SOFTWARE. CRADLEPOINT SPECIFICALLY DISCLAIMS THE IMPLIED WARRANTIES OR CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE OR NON-INFRINGEMENT. - -Copyright © 2018 Cradlepoint, Inc. All rights reserved. +You can find the already compiled sample applications under the Github releases tab: https://github.com/cradlepoint/sdk-samples/releases/tag/built_apps \ No newline at end of file diff --git a/built_apps/app_template_csclient.tar.gz b/built_apps/app_template_csclient.tar.gz deleted file mode 100644 index fef0d479..00000000 Binary files a/built_apps/app_template_csclient.tar.gz and /dev/null differ diff --git a/built_apps/cli_sample.tar.gz b/built_apps/cli_sample.tar.gz deleted file mode 100644 index 77883a4b..00000000 Binary files a/built_apps/cli_sample.tar.gz and /dev/null differ diff --git a/built_apps/cp_shell.tar.gz b/built_apps/cp_shell.tar.gz deleted file mode 100755 index 1284b6e5..00000000 Binary files a/built_apps/cp_shell.tar.gz and /dev/null differ diff --git a/built_apps/cpu_usage.tar.gz b/built_apps/cpu_usage.tar.gz deleted file mode 100644 index 95502756..00000000 Binary files a/built_apps/cpu_usage.tar.gz and /dev/null differ diff --git a/built_apps/ftp_client.tar.gz b/built_apps/ftp_client.tar.gz deleted file mode 100644 index 063492b6..00000000 Binary files a/built_apps/ftp_client.tar.gz and /dev/null differ diff --git a/built_apps/ftp_server.tar.gz b/built_apps/ftp_server.tar.gz deleted file mode 100644 index 50e01027..00000000 Binary files a/built_apps/ftp_server.tar.gz and /dev/null differ diff --git a/built_apps/geofences.tar.gz b/built_apps/geofences.tar.gz deleted file mode 100644 index 8fc83679..00000000 Binary files a/built_apps/geofences.tar.gz and /dev/null differ diff --git a/built_apps/gpio_any_wan_connected.tar.gz b/built_apps/gpio_any_wan_connected.tar.gz deleted file mode 100644 index 9fd3317f..00000000 Binary files a/built_apps/gpio_any_wan_connected.tar.gz and /dev/null differ diff --git a/built_apps/gps_probe.tar.gz b/built_apps/gps_probe.tar.gz deleted file mode 100644 index bea851cc..00000000 Binary files a/built_apps/gps_probe.tar.gz and /dev/null differ diff --git a/built_apps/hello_world.tar.gz b/built_apps/hello_world.tar.gz deleted file mode 100644 index 63a3c4c6..00000000 Binary files a/built_apps/hello_world.tar.gz and /dev/null differ diff --git a/built_apps/hspt.tar.gz b/built_apps/hspt.tar.gz deleted file mode 100644 index e3a98167..00000000 Binary files a/built_apps/hspt.tar.gz and /dev/null differ diff --git a/built_apps/ibr1700_gnss.tar.gz b/built_apps/ibr1700_gnss.tar.gz deleted file mode 100644 index fa20e2d9..00000000 Binary files a/built_apps/ibr1700_gnss.tar.gz and /dev/null differ diff --git a/built_apps/ibr1700_obdII.tar.gz b/built_apps/ibr1700_obdII.tar.gz deleted file mode 100644 index 09c1b2fb..00000000 Binary files a/built_apps/ibr1700_obdII.tar.gz and /dev/null differ diff --git a/built_apps/ipverify_custom_action.tar.gz b/built_apps/ipverify_custom_action.tar.gz deleted file mode 100644 index 0970e9f0..00000000 Binary files a/built_apps/ipverify_custom_action.tar.gz and /dev/null differ diff --git a/built_apps/logfile.tar.gz b/built_apps/logfile.tar.gz deleted file mode 100644 index e12e3fa7..00000000 Binary files a/built_apps/logfile.tar.gz and /dev/null differ diff --git a/built_apps/mosquitto.tar.gz b/built_apps/mosquitto.tar.gz deleted file mode 100644 index 6652d7d3..00000000 Binary files a/built_apps/mosquitto.tar.gz and /dev/null differ diff --git a/built_apps/mqtt_app.tar.gz b/built_apps/mqtt_app.tar.gz deleted file mode 100644 index 5d434a4c..00000000 Binary files a/built_apps/mqtt_app.tar.gz and /dev/null differ diff --git a/built_apps/mqtt_azure_client.tar.gz b/built_apps/mqtt_azure_client.tar.gz deleted file mode 100644 index aa3b41f3..00000000 Binary files a/built_apps/mqtt_azure_client.tar.gz and /dev/null differ diff --git a/built_apps/mqtt_azure_tls.tar.gz b/built_apps/mqtt_azure_tls.tar.gz deleted file mode 100644 index 9fce648e..00000000 Binary files a/built_apps/mqtt_azure_tls.tar.gz and /dev/null differ diff --git a/built_apps/ping_sample.tar.gz b/built_apps/ping_sample.tar.gz deleted file mode 100644 index ba653b02..00000000 Binary files a/built_apps/ping_sample.tar.gz and /dev/null differ diff --git a/built_apps/ports_status.tar.gz b/built_apps/ports_status.tar.gz deleted file mode 100644 index 4bd435d1..00000000 Binary files a/built_apps/ports_status.tar.gz and /dev/null differ diff --git a/built_apps/python_module_list.tar.gz b/built_apps/python_module_list.tar.gz deleted file mode 100644 index 5f284631..00000000 Binary files a/built_apps/python_module_list.tar.gz and /dev/null differ diff --git a/built_apps/send_to_server.tar.gz b/built_apps/send_to_server.tar.gz deleted file mode 100644 index b544dc5a..00000000 Binary files a/built_apps/send_to_server.tar.gz and /dev/null differ diff --git a/built_apps/serial_temp.tar.gz b/built_apps/serial_temp.tar.gz deleted file mode 100644 index 29a7cfd4..00000000 Binary files a/built_apps/serial_temp.tar.gz and /dev/null differ diff --git a/built_apps/serial_vibration_test.tar.gz b/built_apps/serial_vibration_test.tar.gz deleted file mode 100644 index d27cfde8..00000000 Binary files a/built_apps/serial_vibration_test.tar.gz and /dev/null differ diff --git a/built_apps/shell_sample.tar.gz b/built_apps/shell_sample.tar.gz deleted file mode 100644 index 15884a5e..00000000 Binary files a/built_apps/shell_sample.tar.gz and /dev/null differ diff --git a/built_apps/simple_custom_dashboard.tar.gz b/built_apps/simple_custom_dashboard.tar.gz deleted file mode 100644 index e049a537..00000000 Binary files a/built_apps/simple_custom_dashboard.tar.gz and /dev/null differ diff --git a/built_apps/simple_web_server.tar.gz b/built_apps/simple_web_server.tar.gz deleted file mode 100644 index d62976ca..00000000 Binary files a/built_apps/simple_web_server.tar.gz and /dev/null differ diff --git a/built_apps/system_monitor.tar.gz b/built_apps/system_monitor.tar.gz deleted file mode 100644 index d926491f..00000000 Binary files a/built_apps/system_monitor.tar.gz and /dev/null differ diff --git a/built_apps/throttle_cellular_datacap.tar.gz b/built_apps/throttle_cellular_datacap.tar.gz deleted file mode 100644 index 5f6c3be5..00000000 Binary files a/built_apps/throttle_cellular_datacap.tar.gz and /dev/null differ diff --git a/built_apps/throttle_cellular_datacap_rate_tiered.tar.gz b/built_apps/throttle_cellular_datacap_rate_tiered.tar.gz deleted file mode 100644 index a3286fab..00000000 Binary files a/built_apps/throttle_cellular_datacap_rate_tiered.tar.gz and /dev/null differ diff --git a/built_apps/tornado_sample.tar.gz b/built_apps/tornado_sample.tar.gz deleted file mode 100644 index a8fa3d43..00000000 Binary files a/built_apps/tornado_sample.tar.gz and /dev/null differ