abra recipe <app> release #134

Closed
opened 2021-04-04 18:08:15 +00:00 by decentral1se · 1 comment
Owner

abra recipe mediawiki release:

  1. git pull & checkout main/master of the mediawiki recipe repo
  2. see if we're on a git tag
    if so, bail, otherwise see if the tag (and digest, via skopeo?) of the services have changed since the latest version in apps.json, and prepare to increment the version if so (either using the new app version, or incrementing the _1 at the end if the app version is unchanged)
  3. make sure the services.*.deploy.labels entry for the version matches; update it if not
  4. if we're not updating the version, bail, otherwisegit commit with a message about the new version, and git tag the new commit according to the version calculated in #3

end result:

  • services.*.deploy.labels matches metadata from services.*.image
  • if any image versions have changed, new tagged release added to the recipe repo, ready for pulling in by apps-json.py
> `abra recipe mediawiki release:` > > 1. git pull & checkout main/master of the `mediawiki` recipe repo > 2. see if we're on a git tag > if so, bail, otherwise see if the tag (and digest, via skopeo?) of the services have changed since the latest version in apps.json, and prepare to increment the version if so (either using the new app version, or incrementing the _1 at the end if the app version is unchanged) > 3. make sure the services.*.deploy.labels entry for the version matches; update it if not > 4. if we're not updating the version, bail, otherwisegit commit with a message about the new version, and git tag the new commit according to the version calculated in #3 > > end result: > - `services.*.deploy.labels` matches metadata from `services.*.image` > - if any image versions have changed, new tagged release added to the recipe repo, ready for pulling in by `apps-json.py`
decentral1se added this to the Beta release milestone 2021-04-04 18:08:15 +00:00
decentral1se added the
enhancement
label 2021-04-04 18:08:15 +00:00
Owner

New non-app image tag, verbose mode:

➜ abra -v recipe rocketchat release
INFO: fetching mongo:3.7 metadata from Docker Hub
SUCCESS: All compose files updated; new version is 3.12.3_1
Commit your changes to git? (y/[n])? y
[main d5e09cf] Sync label for new Mongo version
 1 file changed, 32 insertions(+), 34 deletions(-)
Tag this as `3.12.3_1`? (y/[n])? y

(increments the "release", adding _1)

New app image tag, debug mode:

➜ abra -d recipe keyoxide release 
DEBUG: yq is already vendored
DEBUG: jq is already vendored
jq: error (at /home/fox/.abra/apps.json:735): null (null) has no keys
INFO: No previous releases found
DEBUG: Processing 'app'
INFO: Fetching keyoxide/keyoxide:2.5.0 metadata from Docker Hub
DEBUG: Replacing version label on app with coop-cloud.${STACK_NAME}.app.version=2.5.0-a8f9b906
DEBUG: Calculated new version 2.5.0
SUCCESS: All compose files updated; new version is 2.5.0
Commit your changes to git? (y/[n])? y
[main dad7423] Version 2.5.0
 1 file changed, 1 insertion(+), 1 deletion(-)
Tag this as `2.5.0`? (y/[n])? y

(uses the new tag as the version)

It'll also check if you're in "detached HEAD" state and offer to checkout main/master, to avoid the footgun of committing and tagging while not on a branch.

New non-`app` image tag, verbose mode: ``` ➜ abra -v recipe rocketchat release INFO: fetching mongo:3.7 metadata from Docker Hub SUCCESS: All compose files updated; new version is 3.12.3_1 Commit your changes to git? (y/[n])? y [main d5e09cf] Sync label for new Mongo version 1 file changed, 32 insertions(+), 34 deletions(-) Tag this as `3.12.3_1`? (y/[n])? y ``` (increments the "release", adding `_1`) New `app` image tag, debug mode: ``` ➜ abra -d recipe keyoxide release DEBUG: yq is already vendored DEBUG: jq is already vendored jq: error (at /home/fox/.abra/apps.json:735): null (null) has no keys INFO: No previous releases found DEBUG: Processing 'app' INFO: Fetching keyoxide/keyoxide:2.5.0 metadata from Docker Hub DEBUG: Replacing version label on app with coop-cloud.${STACK_NAME}.app.version=2.5.0-a8f9b906 DEBUG: Calculated new version 2.5.0 SUCCESS: All compose files updated; new version is 2.5.0 Commit your changes to git? (y/[n])? y [main dad7423] Version 2.5.0 1 file changed, 1 insertion(+), 1 deletion(-) Tag this as `2.5.0`? (y/[n])? y ``` (uses the new tag as the version) It'll also check if you're in "detached HEAD" state and offer to checkout main/master, to avoid the footgun of committing and tagging while not on a branch.
This repo is archived. You cannot comment on issues.
No Milestone
No Assignees
2 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: coop-cloud/abra#134
No description provided.