Implement recipe upgrade/sync/release #39

Closed
opened 2021-08-03 09:59:11 +00:00 by decentral1se · 4 comments
Owner

I'm gonna try finish off the recipe sub-command 🥳

I'm gonna try finish off the recipe sub-command 🥳
decentral1se self-assigned this 2021-08-03 09:59:11 +00:00
Author
Owner

OK abra recipe lint <recipe> is done and seeing how easy all the Docker bindings make it to parse compose files and work with them really makes me think we've gone in the right direction here: 9378db1979/cli/recipe/recipe.go (L152)

On to the abra recipe release stuff...

OK `abra recipe lint <recipe>` is done and seeing how easy all the Docker bindings make it to parse compose files and work with them really makes me think we've gone in the right direction here: https://git.coopcloud.tech/coop-cloud/go-abra/src/commit/9378db1979c2b81ab0d6ffc2ad64ed65eab4be1e/cli/recipe/recipe.go#L152 On to the `abra recipe release` stuff...
Author
Owner

We used https://github.com/containers/skopeo which I see also has little in the way of a public API so I might have to vendor inspect.go to do image meta retrieval like we did in abra-bash. I think we also used skopeo login to avoid rate limits.

Other options:

We used https://github.com/containers/skopeo which I see also has little in the way of a public API so I might have to vendor `inspect.go` to do image meta retrieval like we did in `abra-bash`. I think we also used `skopeo login` to avoid rate limits. Other options: - https://github.com/heroku/docker-registry-client - https://pkg.go.dev/github.com/moby/moby/registry (no additional dependency?) - https://stackoverflow.com/a/39454426 (just HTTP and away we go, the winner)
Author
Owner

We discussed this and came up with a design (from this pad):

3 abra commands:

  1. recipe upgrade <recipe> (skopeo) -> update image tags to latest [renovate-bot]
  2. recipe sync <recipe> update labels based on image tags, git tag ..., push to recipe repo
  3. recipe release <recipe> update apps.json (open PR on that repo. push a branch?)
    • clone existing apps.json repo
    • read in what's there
    • read new tags'n'labels
    • add new version / app sections
    • PR to the repository

And the apps.json will sit in a separate repository.

We discussed this and came up with a design (from [this pad](https://pad.autonomic.zone/yMa8a-FSTLGl6D0saXtuAw?edit)): 3 abra commands: 1. `recipe upgrade <recipe>` (skopeo) -> update image tags to latest [renovate-bot] 2. `recipe sync <recipe>` update labels based on image tags, `git tag` ..., push to recipe repo 3. `recipe release <recipe>` update apps.json (open PR on that repo. push a branch?) - clone existing apps.json repo - read in what's there - read new tags'n'labels - add new version / app sections - PR to the repository And the `apps.json` will sit in a separate repository.
decentral1se changed title from Implement recipe release/lint to Implement recipe upgrade/sync/release 2021-08-09 11:54:52 +00:00
Author
Owner

OK, abra recipe upgrade and abra recipe sync are in! They don't do any Git operations, just update the compose files on the local file system. It doesn't generate tags yet. No skopeo or external binaries required 🥳

I actually started to have my doubts about the abra recipe release command and tag generation because I am not sure how "releasing" interacts with the app test suite we want to do. Maybe we'll still want to upgrade/sync ourselves and push that up for CI to run the test suite, generate the tag and make the final release?

Idk but it felt like right now it'd be better to just leave things manual, get on with the rest and see how we go from there.

OK, `abra recipe upgrade` and `abra recipe sync` are in! They don't do any Git operations, just update the compose files on the local file system. It doesn't generate tags yet. No skopeo or external binaries required 🥳 I actually started to have my doubts about the `abra recipe release` command and tag generation because I am not sure how "releasing" interacts with the app test suite we want to do. Maybe we'll still want to upgrade/sync ourselves and push that up for CI to run the test suite, generate the tag and make the final release? Idk but it felt like right now it'd be better to just leave things manual, get on with the rest and see how we go from there.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: toolshed/abra#39
No description provided.