-
Notifications
You must be signed in to change notification settings - Fork 800
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
feat: publish official docker images on release #12828
base: master
Are you sure you want to change the base?
Conversation
The new PR pipeline isn't running here due to the settings of the repo not allowing to run newly added actions without approving them first (which is good!), IDK if you as maintainer have an option to run newly added actions here if you want, otherwise if you want to see examples you can look at my repo: https://github.com/maybeanerd/mage/actions/runs/10760332986 |
@JayDi85 just saw you do a version bump 👀 (eeada90) (edit: ah well it also was the release then, unlucky) |
I’ll research it and integrate later. |
awesome! I saw too late that the release also had happened, I thought I could sneak this in before 😁 |
Another release without official image 😢 |
f874a78
to
dd32109
Compare
Very interested in this :) I made one a while back that grabbed the current version by scraping the version from HTML...this would be better! |
@JayDi85 hi, any plans on when you will take a closer look at this? |
@JayDi85 hoping to bring you attention to this, including it would be really helpful and this PR appears thoroughly safe :) |
@maybeanerd FYI I've been using this and it's been serving me well! |
That's great to hear! ❤️ We've also been exclusively using our own instance running the image since I first opened this PR, and it works perfectly. |
This creates an image with hardcoded version of the contained mage for testing. Afterwards a process needs to be defined to either pass the version onto the container whenever a release triggers it, or actually build from source.
* feat: build image from source * attempt to use latest maven to build * Update Dockerfile * fix: move unzip to final image * style: format Dockerfile * fix: typo in envvar * feat: provide usable docker-compose - both usable for local development, as well as deployment (to copy paste and work off of) * refactor: rename envvars
@JayDi85 hey, any news on integrating this? |
@Grath can you describe your current CI/CD build and release process? Docker, manual steps, etc. |
I've been running my own builds because I want to get the latest cards and updates and the beta update cadence is too slow for my tastes. I have a Python script that I run on my home Linux server that
This script is mostly using After I push a build, I go manually close my server, update XMage via the launcher, and relaunch with the new version. I'm not using any docker in my system (I just manually run my private server via a shell script) but the only manual steps per release are
Bonus: Hosting the releases directly on Github means that the update process is substantially faster than xmage.today updates due to the speed at which the files can be downloaded. |
I don't quite understand what's the point you're trying to make here by bringing this workflow up? This seems like it solves something very different, as my PR adds image releases to the "official" stable release versions , and your solution is neither containerized, nor fully automated, nor follows the stable release pattern. What you describe makes sense, but solves an entirely different issue IMO |
Yeah, my workflow solves my issue (bypassing JayDi's inconsistent and infrequent update cadence) and is entirely unrelated to container solutions. No idea why JayDi asked me to talk about it here, but I laid out what I'm doing as requested. |
I thought Graph used automatically scheduled builds (once per week). XMage must have two "release" channels:
And docker builds must be a main part in both use cases, not custom scripts like nowadays. |
Yes, that's what I've been experimenting with, but this PR isn't about building new builds of XMage. This is about building an official Docker image for XMage, and doing a new image automatically when there's new releases. |
We could run the pipeline I prepared here on a weekly or daily schedule as well. That should be very straight forward, we just need a bit of changes to determine the tag then Should I propose the necessary changes in this PR, or could we stagger it? (Meaning first merge this, then add more later) |
this fixes #12748
This PR adds a few things:
The pipelines run in two cases:
1. on tag/release
Whenever a tag is committed (which happens when a GitHub release is made), the pipeline will be triggered on this tag.
It will use the version the tag provides to tag the resulting image publish it on this repository using the GitHub registry. It will also tag the release as "latest" version as well.
It will build and publish both linux/amd64 and linux/arm64 variants of the image.
You can see an example of the resulting images on my fork, where I published them for testing: https://github.com/maybeanerd/mage/pkgs/container/mage
2. on pull requests
Whenever a PR is opened, it will run the image build, which will only succeed if the server can be built.
It will not publish this image anywhere.
This is IMO useful to make sure no single PR will break the entire build process of the image (which might break even if the Travis CI/CD doesn't), but the builds take time (~25mins, since its done for multiple architectures) so one could think about making this check optional before merging, or even disabling it entirely.
Since I personally prefer running these things on PRs, this proposal includes it. The nice thing is also that, since this repo is open source, GitHub gives us unlimited build minutes - so there's no fear of running out of CI/CD minutes or needing to pay at some point.