Skip to content
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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mitzkia
Copy link
Contributor

@mitzkia mitzkia commented Dec 6, 2024

After this PR when we request a new stable image job the axosyslog patch version will increment automatically

@mitzkia mitzkia marked this pull request as draft December 6, 2024 14:00
requirements.txt Outdated Show resolved Hide resolved
@mitzkia mitzkia force-pushed the axosyslog_image_rebuild branch from 2762970 to c6c4a45 Compare December 6, 2024 14:32
@mitzkia
Copy link
Contributor Author

mitzkia commented Dec 6, 2024

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:
it seems works :) :
https://github.com/mitzkia/axosyslog/actions/runs/12154279030/job/33894119353

@mitzkia mitzkia marked this pull request as ready for review December 6, 2024 14:57
@mitzkia mitzkia force-pushed the axosyslog_image_rebuild branch from c6c4a45 to ab1ede8 Compare December 9, 2024 10:27
@mitzkia mitzkia force-pushed the axosyslog_image_rebuild branch from 9ec7b0c to ff36c55 Compare December 11, 2024 11:49
@mitzkia mitzkia marked this pull request as draft December 13, 2024 12:28
- this is for automatically update python libraries

Signed-off-by: Andras Mitzki <[email protected]>
@mitzkia mitzkia force-pushed the axosyslog_image_rebuild branch from b78243d to 4391192 Compare January 14, 2025 08:49
@mitzkia
Copy link
Contributor Author

mitzkia commented Jan 14, 2025

The PR is ready for the review.
I have the following proof runs:

  1. When the actual git tag version is greater than the previous docker tag version

for example:
CI job link (in my fork): https://github.com/mitzkia/axosyslog/actions/runs/12752419559/job/35542271733
actual git tag: 4.99.0
previous docker tag: 4.9.0-2
next docker tag will be: 4.99.0-1

  1. When the actual git tag version is equals with the previous docker tag version

for example:
CI job link (in my fork): https://github.com/mitzkia/axosyslog/actions/runs/12753284689/job/35545260970
actual git tag: 4.9.0
previous docker tag: 4.9.0-2
next docker tag will be: 4.9.0-3

  1. When the actual git tag version is less than the previous docker tag version in this case the compare script
    will display a warning and will exit

  2. Check the generated docker image tags with:

skopeo inspect docker://ghcr.io/mitzkia/axosyslog:latest | jq '.RepoTags'
[
  "dev-main",
  "dev-main-dbg",
  "4.9.0-3",
  "4.9.0",
  "latest",
  "4.9.0-dbg",
  "4.9.0-3-dbg",
  "latest-dbg",
  "4.99.0-1",
  "4.99.0",
  "4.99.0-dbg",
  "4.99.0-1-dbg"
]

@mitzkia mitzkia marked this pull request as ready for review January 14, 2025 08:58
@MrAnno MrAnno self-requested a review January 14, 2025 17:45
Copy link
Member

@MrAnno MrAnno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This must have been really difficult to test properly, thank you for going through everything.

.github/workflows/axosyslog-docker.yml Outdated Show resolved Hide resolved
.github/workflows/axosyslog-docker.yml Outdated Show resolved Hide resolved
.github/workflows/axosyslog-docker.yml Show resolved Hide resolved
.github/workflows/axosyslog-docker.yml Outdated Show resolved Hide resolved
.github/workflows/axosyslog-docker.yml Outdated Show resolved Hide resolved
.github/workflows/axosyslog-docker.yml Outdated Show resolved Hide resolved
- after this change next docker tag will automatically
calculated in a following way:
  - if actual git tag version is greater than previous docker tag
    example:
       current git tag: 4.10.0
       last docker tag: 4.9.0-2
       next docker tag: 4.10.0-1
  - if actual git tag version is equals with previous docker tag
    example:
       current git tag: 4.9.0
       last docker tag: 4.9.0-2
       next docker tag: 4.9.0-3
  - if actual git tag version is less than previous docker tag, than
    compare script will display a warning and will exit

Signed-off-by: Andras Mitzki <[email protected]>
@mitzkia mitzkia force-pushed the axosyslog_image_rebuild branch from 4391192 to 3220ae0 Compare January 22, 2025 12:24
Copy link
Member

@MrAnno MrAnno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. LGTM.

I think we need to test 3 scenarios and we can merge it:

  • axosyslog-nightly.yml should produce a nightly without problems
  • 4.99.0 release should produce an image with tags 4.99.0-1, 4.99.0, latest
  • triggering a rebuild on 4.9.0 should bump the rebuild version: 4.9.0-3, 4.9.0, latest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants