Use apps.json to power upgrade / rollback, add helper commands #135

Merged
decentral1se merged 8 commits from apps-json into main 2021-04-05 13:50:58 +00:00
Owner

Closes #130, #131 and #134

  • Keep a copy of abra-apps.json as ~/.abra/apps.json, update it as needed (i.e. when remote modified time is more recent than the local mtime)
  • Add abra recipe ls to list all recipes available in apps.json
  • Add abra recipe <recipe> versions to show all a recipe's versions
  • Add abra recipe <recipe> release, replacing bin/app-version.sh, to sync git tags and Docker deploy labels with image versions, using metadata from Skopeo -- this also handles bumping recipe versions according to the logic in coop-cloud/organising#51
  • Make require_yq into a generic vendor_binary function, and use it for both jq and yq
  • Change abra app <app> deploy command to accept an optional <version> argument, and make abra app <app> rollback work the same as abra app <app> deploy <last-version> (i.e. no longer using docker service rollback, which seems like it'll rarely be what people want)
  • Replace require_app_latest with require_app_version, which accepts a recipe name and a version (tag), and only pull from git if we're trying to use a tag that's not available locally.
  • Add checkout_main_or_master to make a generic version of the diabolical logic we're using to handle different primary branch names.

This PR also continues a gradual wafting towards lowercase names for local variables (keeping e.g. ABRA_DIR capitalised, but making e.g. $version lowercase).

Closes #130, #131 and #134 - Keep a copy of `abra-apps.json` as `~/.abra/apps.json`, update it as needed (i.e. when remote modified time is more recent than the local mtime) - Add `abra recipe ls` to list all recipes available in `apps.json` - Add `abra recipe <recipe> versions` to show all a recipe's versions - Add `abra recipe <recipe> release`, replacing `bin/app-version.sh`, to sync git tags and Docker deploy labels with image versions, using metadata from Skopeo -- this also handles bumping recipe versions according to the logic in coop-cloud/organising#51 - Make `require_yq` into a generic `vendor_binary` function, and use it for both `jq` and `yq` - Change `abra app <app> deploy` command to accept an optional `<version>` argument, and make `abra app <app> rollback` work the same as `abra app <app> deploy <last-version>` (i.e. no longer using `docker service rollback`, which seems like it'll rarely be what people want) - Replace `require_app_latest` with `require_app_version`, which accepts a recipe name and a version (tag), and only pull from git if we're trying to use a tag that's not available locally. - Add `checkout_main_or_master` to make a generic version of the diabolical logic we're using to handle different primary branch names. This PR also continues a gradual wafting towards lowercase names for local variables (keeping e.g. `ABRA_DIR` capitalised, but making e.g. `$version` lowercase).
decentral1se was assigned by 3wordchant 2021-04-05 10:48:08 +00:00
3wordchant force-pushed apps-json from 7279b54f51 to a26a0d27d7 2021-04-05 11:26:56 +00:00 Compare
Owner

image

![image](/attachments/c42fd355-eb2c-4dde-aff2-c12665df6d45)
decentral1se merged commit 48a7bb8c2d into main 2021-04-05 13:50:58 +00:00
decentral1se deleted branch apps-json 2021-04-05 13:51:06 +00:00
This repo is archived. You cannot comment on pull requests.
No description provided.