getwud/wud

Semver check only as default and prerelease added to it

Closed this issue · 5 comments

Hi, I just came across your software - it's really helpful!

As far as I understand the documentation, if I (only) want a semver check for updates (that is, show only candidates for update which changed in the x.y.z area of the tag) I have to add the label wud.tag.include=^\d+\.\d+\.\d+$$ to my container. Is it possible to set this as a default for all containers via a variable, too?

How would I adjust the line wud.tag.include=^\d+\.\d+\.\d+$$ to include the "-prerelease" part, too, but not more?

Thank you very much!

Regards

Hi,

Is it possible to set this as a default for all containers via a variable, too?

Currently is not possible to set a global wud.tag.include to apply to all containers.

How would I adjust the line wud.tag.include=^\d+.\d+.\d+$$ to include the "-prerelease" part, too, but not more?

Somethink like wud.tag.include=^\d+\.\d+\.\d+-.*$$?
Can you share an example of a container you want to configure that way so I can help you more precisely?

Thank you!

I've let myself get disconcerted by the collabora/code one. Actually this isn't really "prerelease", I think it doesn't follow semver-rules. But I think I found wud.tag.include=^\d\d\.\d\d\.\d\.\d\.\d$$ works with this one!

Ah, I was mistaken. It does not work with the container collabora/code and my include statement.

compose.yaml:

services:
  collaboracode:
    image: collabora/code:24.04.9.1.1
    restart: unless-stopped
    container_name: collaboracode
    ports:
      - 9980:9980
    environment:
      - aliasgroup1=https://cloud.mydomain.de:443
      - server_name=collabora.mydomain.de
    tty: true
    cap_add:
      - MKNOD
    labels:
      - wud.tag.include=^\d\d\.\d\d\.\d\.\d\.\d$$

When I have a look at https://hub.docker.com/r/collabora/code/tags there should be newer versions, 24.04.9.2.1 and 24.04.10.1.1. But WUD shows "all containers are up to date".

Hi,

2 things to change to make it work:

1. Your regex doesn't capture the 3rd tag (24.04.10.1.1)
=> Better use ^\d+\.\d+\.\d+\.\d+\.\d+$

2. The Collabora tags don't comply with semver tags
So we also need to transform them so wud can compare them
wud.tag.transform=^(\d+\.\d+\.\d+)\.(.*)$ => $1-$2

In summary

services:
  collaboracode:
   ...
    labels:
      - wud.tag.include=^\d+\.\d+\.\d+\.\d+\.\d+$$
      - wud.tag.transform=^(\d+\.\d+\.\d+)\.(.*)$ => $1-$2

And here we go! 😃
image

Thank you again, your help is very much appreciated!