-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rebuild axosyslog image with auto patch version increment #411
base: main
Are you sure you want to change the base?
Conversation
2762970
to
c6c4a45
Compare
I would like to provide a test job run (from my fork) here (AxoSyslog stable image), but until now it fails every time on image build. update: |
- id: docker-metadata-tags | ||
name: Extract metadata (AxoSyslog version) for Docker | ||
run: | | ||
last_full_version=$(skopeo inspect docker://ghcr.io/axoflow/axosyslog:latest | jq '.RepoTags' | sed 's/ \|"\|,//g' | grep "^[0-9]*.[0-9]*.[0-9]*$\|^[0-9]*.[0-9]*.[0-9]*-[0-9]*$" | tail -n 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The summary of the patch contains everything twice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review notice, fixed.
- query the latest released version - create new patch version or increment latest patch version Signed-off-by: Andras Mitzki <[email protected]>
- this is for automatically update python libraries Signed-off-by: Andras Mitzki <[email protected]>
c6c4a45
to
ab1ede8
Compare
- id: docker-metadata-tags | ||
name: Extract metadata (AxoSyslog version) for Docker | ||
run: | | ||
last_full_version=$(skopeo inspect docker://ghcr.io/axoflow/axosyslog:latest | jq '.RepoTags' | sed 's/ \|"\|,//g' | grep "^[0-9]*.[0-9]*.[0-9]*$\|^[0-9]*.[0-9]*.[0-9]*-[0-9]*$" | tail -n 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this won't work properly if we want to do a new AxoSyslog release: 4.9.0 -> 4.10.0
When doing a stable release, this job is usually executed on a git tag.
I think it would be the safest and cleanest to extract the X.Y.Z version information always from the git tag, and optionally, from an input parameter when we are forced to do a rebuild from a custom branch (that won't happen often).
docker/metadata-action@v5
is a good tool to get such git tag information.
When we want to calculate the container-rebuild-version R
(X.Y.Z-R
), we can do what you did: check the previous container tag (but let's be strict: check if the last container tag's X.Y.Z prefix matches the git tag information we extracted from docker/metadata-action@v5 or from the input parameter), and increment R
by one.
When doing a new AxoSyslog release 4.9.0 -> 4.10.0
, the X.Y.Z prefix won't match, in that case we should start from 1
: 4.10.0-1
.
9ec7b0c
to
ff36c55
Compare
Signed-off-by: Andras Mitzki <[email protected]>
After this PR when we request a new stable image job the axosyslog patch version will increment automatically