feat: teach recipe sync to understand new versions #105

Merged
decentral1se merged 1 commits from new-recipe-sync into main 2021-10-05 09:33:12 +00:00
Owner

Decisions I made:

  • we don't need to add a label to every service anymore, we just add it to the app service (or whatever the "main" service is of the recipe)

  • we use a simpler label format: coop-cloud.${STACK_NAME}.version=${RECIPE_TAG}

When I ran this logic on the Gitea recipe, it produced this diff:

diff --git a/compose.yml b/compose.yml
index 8ce5abe..424228b 100644
--- a/compose.yml
+++ b/compose.yml
@@ -51,7 +51,7 @@ services:
         - "traefik.tcp.routers.${STACK_NAME}-ssh.rule=HostSNI(`*`)"
         - "traefik.tcp.routers.${STACK_NAME}-ssh.entrypoints=gitea-ssh"
         - "traefik.tcp.services.${STACK_NAME}-ssh.loadbalancer.server.port=${GITEA_SSH_PORT}"
-        - coop-cloud.${STACK_NAME}.app.version=1.14.3-rootless-597e2e5d
+        - coop-cloud.${STACK_NAME}.version=1.0.0+1.14.5-rootless
 
   db:
     image: "mariadb:10.6"

Closes coop-cloud/organising#177.

Decisions I made: - we don't need to add a label to every service anymore, we just add it to the `app` service (or whatever the "main" service is of the recipe) - we use a simpler label format: `coop-cloud.${STACK_NAME}.version=${RECIPE_TAG}` When I ran this logic on the Gitea recipe, it produced this diff: ```diff diff --git a/compose.yml b/compose.yml index 8ce5abe..424228b 100644 --- a/compose.yml +++ b/compose.yml @@ -51,7 +51,7 @@ services: - "traefik.tcp.routers.${STACK_NAME}-ssh.rule=HostSNI(`*`)" - "traefik.tcp.routers.${STACK_NAME}-ssh.entrypoints=gitea-ssh" - "traefik.tcp.services.${STACK_NAME}-ssh.loadbalancer.server.port=${GITEA_SSH_PORT}" - - coop-cloud.${STACK_NAME}.app.version=1.14.3-rootless-597e2e5d + - coop-cloud.${STACK_NAME}.version=1.0.0+1.14.5-rootless db: image: "mariadb:10.6" ``` Closes https://git.coopcloud.tech/coop-cloud/organising/issues/177.
decentral1se added 1 commit 2021-10-05 08:32:45 +00:00
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
c616907b71
feat: teach recipe sync to understand new versions
Closes coop-cloud/organising#177.
Owner

getting rid of the additional labels is a great idea! I'm not getting any errors, this looks ready to be merged

getting rid of the additional labels is a great idea! I'm not getting any errors, this looks ready to be merged
decentral1se merged commit c616907b71 into main 2021-10-05 09:33:12 +00:00
decentral1se deleted branch new-recipe-sync 2021-10-05 09:33:20 +00:00
Owner
-        - coop-cloud.${STACK_NAME}.app.version=1.14.3-rootless-597e2e5d
+        - coop-cloud.${STACK_NAME}.version=1.0.0+1.14.5-rootless

Are we deciding we don't care about upstreams overwriting the same Docker tag with a different image, or is there another way to guard against that instead of tracking the hash in a label? 🤔

Or maybe I'm misunderstanding, this hash business confuses me a bit.

``` - - coop-cloud.${STACK_NAME}.app.version=1.14.3-rootless-597e2e5d + - coop-cloud.${STACK_NAME}.version=1.0.0+1.14.5-rootless ``` Are we deciding we don't care about upstreams overwriting the same Docker tag with a different image, or is there another way to guard against that instead of tracking the hash in a label? 🤔 Or maybe I'm misunderstanding, this hash business confuses me a bit.
Author
Owner

another way to guard against that instead of tracking the hash in a label

coop-cloud/organising#67

> another way to guard against that instead of tracking the hash in a label https://git.coopcloud.tech/coop-cloud/organising/issues/67
Sign in to join this conversation.
No description provided.