Skip to content

Commit

Permalink
Merge pull request #1243 from FarmBot/nerves_hub_removal
Browse files Browse the repository at this point in the history
v12.0.0
  • Loading branch information
RickCarlino authored Sep 18, 2020
2 parents 8688d32 + 64eb092 commit ef0f862
Show file tree
Hide file tree
Showing 53 changed files with 3,694 additions and 4,510 deletions.
77 changes: 19 additions & 58 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,6 @@ install_arduino: &install_arduino
name: Run setup script
command: bash .circleci/setup-arduino.sh

install_slack_helpers: &install_slack_helpers
run:
name: Install Slack Helpers
command: |
wget https://gist.githubusercontent.com/ConnorRigby/03e722be4be70f8588f5ed74420e4eaa/raw/28a51d8f52ec7d569e8f7f20b83349816ddf63cf/slack_message.ex
cp .circleci/fwup_meta_slack.sh /usr/bin/
install_ghr: &install_ghr
run:
name: Install ghr (Github Releases)
Expand Down Expand Up @@ -142,7 +135,7 @@ build_firmware_clean_steps: &build_firmware_clean_steps
paths:
- "/nerves/deploy/system"

deploy_nerves_hub_firmware_steps: &deploy_nerves_hub_firmware_steps
deploy_ota_firmware_steps: &deploy_ota_firmware_steps
steps:
- checkout
- run: git submodule update --init --recursive
Expand All @@ -158,20 +151,6 @@ deploy_nerves_hub_firmware_steps: &deploy_nerves_hub_firmware_steps
- <<: *install_elixir
- <<: *install_hex_archives
- <<: *install_jq
- <<: *install_slack_helpers
- run:
name: Sign Image
working_directory: /nerves/build/farmbot_os
command: |
mix deps.get
mix nerves_hub.firmware sign --key notreal /nerves/deploy/system/artifacts/farmbot-${MIX_TARGET}-$(cat ../VERSION).fw
- run:
name: Publish to NervesHub
working_directory: /nerves/build/farmbot_os
command: mix nerves_hub.firmware publish --deploy ${NERVES_HUB_DEPLOY} ${NERVES_HUB_TTL} /nerves/deploy/system/artifacts/farmbot-${MIX_TARGET}-$(cat ../VERSION).fw
- run:
name: Send Slack Message
command: ./.circleci/fwup_meta_slack.sh -i /nerves/deploy/system/artifacts/farmbot-${MIX_TARGET}-$(cat VERSION).fw

jobs:

Expand Down Expand Up @@ -432,8 +411,8 @@ jobs:
environment:
MIX_TARGET: rpi
MIX_ENV: prod
NERVES_HUB_DEPLOY: rpi-prod-stable
<<: *deploy_nerves_hub_firmware_steps
OTA_DEPLOY: rpi-prod-stable
<<: *deploy_ota_firmware_steps

################################################################################
# target=rpi3 app_env=prod channel=stable #
Expand All @@ -444,8 +423,8 @@ jobs:
environment:
MIX_TARGET: rpi3
MIX_ENV: prod
NERVES_HUB_DEPLOY: rpi3-prod-stable
<<: *deploy_nerves_hub_firmware_steps
OTA_DEPLOY: rpi3-prod-stable
<<: *deploy_ota_firmware_steps

################################################################################
# target=rpi app_env=prod channel=beta #
Expand All @@ -456,9 +435,7 @@ jobs:
environment:
MIX_TARGET: rpi
MIX_ENV: prod
NERVES_HUB_DEPLOY: rpi-prod-beta
NERVES_HUB_TTL: "--ttl 3600"
<<: *deploy_nerves_hub_firmware_steps
<<: *deploy_ota_firmware_steps

################################################################################
# target=rpi3 app_env=prod channel=beta #
Expand All @@ -469,9 +446,7 @@ jobs:
environment:
MIX_TARGET: rpi3
MIX_ENV: prod
NERVES_HUB_DEPLOY: rpi3-prod-beta
NERVES_HUB_TTL: "--ttl 3600"
<<: *deploy_nerves_hub_firmware_steps
<<: *deploy_ota_firmware_steps

################################################################################
# target=rpi3 app_env=prod channel=staging #
Expand All @@ -482,9 +457,8 @@ jobs:
environment:
MIX_TARGET: rpi3
MIX_ENV: prod
NERVES_HUB_DEPLOY: rpi3-prod-staging
NERVES_HUB_TTL: "--ttl 900"
<<: *deploy_nerves_hub_firmware_steps
OTA_DEPLOY: rpi3-prod-staging
<<: *deploy_ota_firmware_steps

################################################################################
# target=rpi3 app_env=prod channel=qa #
Expand All @@ -495,9 +469,8 @@ jobs:
environment:
MIX_TARGET: rpi3
MIX_ENV: prod
NERVES_HUB_DEPLOY: rpi3-prod-qa
NERVES_HUB_TTL: "--ttl 900"
<<: *deploy_nerves_hub_firmware_steps
OTA_DEPLOY: rpi3-prod-qa
<<: *deploy_ota_firmware_steps

################################################################################
# target=rpi app_env=prod channel=qa #
Expand All @@ -508,9 +481,8 @@ jobs:
environment:
MIX_TARGET: rpi
MIX_ENV: prod
NERVES_HUB_DEPLOY: rpi-prod-qa
NERVES_HUB_TTL: "--ttl 900"
<<: *deploy_nerves_hub_firmware_steps
OTA_DEPLOY: rpi-prod-qa
<<: *deploy_ota_firmware_steps

################################################################################
# TARGET FIRMWARE NERVES GITHUB RELEASE BETA #
Expand All @@ -536,7 +508,6 @@ jobs:
- <<: *install_elixir
- <<: *install_hex_archives
- <<: *install_ghr
- <<: *install_slack_helpers
- <<: *install_jq
- add_ssh_keys:
fingerprints:
Expand All @@ -560,12 +531,6 @@ jobs:
- run:
name: Publish Github Release
command: ./ghr -t $GITHUB_TOKEN -u farmbot -r farmbot_os -prerelease -recreate -prerelease -b "$(cat RELEASE_NOTES)" -c $(git rev-parse --verify HEAD) "v$(cat VERSION)" /nerves/deploy/system/artifacts/
- run:
name: Slack message
command: |
export OTA_URL=$(wget https://api.github.com/repos/farmbot/farmbot_os/releases -qO- | jq '.[0].url' | sed -e 's/^"//' -e 's/"$//')
export SLACK_MESSAGE="New Farmbot Beta: $OTA_URL"
elixir slack_message.ex $SLACK_MESSAGE

################################################################################
# TARGET FIRMWARE NERVES GITHUB RELEASE MASTER #
Expand All @@ -591,7 +556,6 @@ jobs:
- <<: *install_elixir
- <<: *install_hex_archives
- <<: *install_ghr
- <<: *install_slack_helpers
- add_ssh_keys:
fingerprints:
- "97:92:32:5d:d7:96:e1:fa:f3:6b:f3:bd:d6:aa:84:c6"
Expand All @@ -614,9 +578,6 @@ jobs:
- run:
name: Publish Github Release
command: ./ghr -t $GITHUB_TOKEN -u farmbot -r farmbot_os -recreate -prerelease -draft -delete -b "$(cat RELEASE_NOTES)" -c $(git rev-parse --verify HEAD) "v$(cat VERSION)" /nerves/deploy/system/artifacts
- run:
name: Send Slack Message
command: elixir slack_message.ex "New Farmbot Prod release $(cat VERSION)"

workflows:
version: 2
Expand Down Expand Up @@ -674,7 +635,7 @@ workflows:
- /^qa\/.*/

# master branch to staging.farmbot.io
nerves_hub_prod_stable_staging:
ota_prod_stable_staging:
jobs:
- build_clean_rpi_prod:
context: farmbot-staging
Expand All @@ -698,7 +659,7 @@ workflows:
- build_clean_rpi3_prod

# master branch to my.farmbot.io
nerves_hub_prod_stable_production:
ota_prod_stable_production:
jobs:
- build_clean_rpi_prod:
context: farmbot-production
Expand Down Expand Up @@ -727,7 +688,7 @@ workflows:
- build_clean_rpi3_prod

# any tag containint an `-rcXXX` tag to staging.farmbot.io
nerves_hub_prod_beta_staging:
ota_prod_beta_staging:
jobs:
- build_rpi_prod:
context: farmbot-staging
Expand Down Expand Up @@ -763,7 +724,7 @@ workflows:
- build_rpi3_prod

# any tag containint an `-rcXXX` tag to my.farmbot.io
nerves_hub_prod_beta_production:
ota_prod_beta_production:
jobs:
- build_rpi_prod:
context: farmbot-production
Expand Down Expand Up @@ -809,7 +770,7 @@ workflows:
- build_rpi3_prod

# any branch matching qa/** to staging.farmbot.io
nerves_hub_prod_staging_staging:
ota_prod_staging_staging:
jobs:
- build_rpi3_prod:
context: farmbot-staging
Expand Down Expand Up @@ -844,7 +805,7 @@ workflows:
- build_rpi_prod

# any branch matching qa/** to production.farmbot.io
nerves_hub_prod_staging_production:
ota_prod_staging_production:
jobs:
- build_rpi3_prod:
context: farmbot-production
Expand Down
92 changes: 0 additions & 92 deletions .circleci/fwup_meta_slack.sh

This file was deleted.

1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ RELEASE_NOTES
.make_state

.elixir_ls
nerves-hub
*.pem
*.db
*.db-journal
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

# 12.0.0

* Migrate OTA system to an in-house solution.
* Express v1.0 firmware updates.
* Fix bug where sequences would crash when a `coordinate` is passed as a variable (Thanks, @jsimmonds2).

# 11.1.0

* Bug fix related to usage of tools in MOVE block.
Expand Down
3 changes: 1 addition & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# Contributing
To get started, <a href="https://www.clahub.com/agreements/FarmBot/farmbot_os">sign the Contributor License Agreement</a>.

After that, read through the [documentation](docs/index.md)
Please read through the [documentation](docs/index.md)
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
11.1.0
12.0.0
3 changes: 0 additions & 3 deletions docs/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ This file contains a basic glossary of commonly used terms
* Nerves - Framework that allows cross compilation of Elixir code
* [More info](https://nerves-project.org/)
* [Docs](https://hexdocs.pm/nerves/getting-started.html)
* NervesHub - Cloud based firmware management
* [More info](https://www.nerves-hub.org/)
* [Docs](https://github.com/nerves-hub/documentation)
* Firmware - Usually refers to the code that gets deployed onto the Raspberry Pi

## OTP Terms
Expand Down
Loading

0 comments on commit ef0f862

Please sign in to comment.