-
-
Notifications
You must be signed in to change notification settings - Fork 68
#44 Nightly builds #46
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
Conversation
|
Thanks for working on this! |
Makefile
Outdated
| .PHONY: build-alpine | ||
|
|
||
|
|
||
| NIGHTLY_TAG := jakzal/phpqa:nightly-$(shell date +%y%m%d) |
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.
Shall we just use latest and alpine? These are meant for the latest versions of both image flavours.
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.
No, I did it this way because I want a way to lock to specific version. Otherwise, same image pulled down later will get you tools with higher version, incompatible with your project.
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.
Hm.. this is not how daily builds usually work, so I got confused :) There's usually one (latest) daily build available.
I usually create tags right after new features or fixes are merged, and then a merge triggers a build.
How would creating a tag each day improve the situation for you? I'm worried we'd be generating lots of tags on docker hub.
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.
Generating lot of tags on docker hub is not a problem, I did mention this in OG post in this PR. But yes, it would be nice to optimize this later to NOT create new tag if nothing changed (no new versions of packages). But I suggest to do it later and not complicate this at this stage.
Here's how it improves situation for me:
- New patch release of Easy Coding Standard has been released which solves some issues I have
- There is no new release of phpqa (no, new releases are definitely not done often enough), but there is new nightly build, so I just require jakzal/phpqa:nightly-currentday
- New major release of Easy Coding Standard has been released, which changes configuration format from .neon to .yaml
- Build of my project is triggered again
- Nothing is broken because I've locked to nightly-currentday instead of :latest
Makefile
Outdated
| NIGHTLY_TAG := jakzal/phpqa:nightly-$(shell date +%y%m%d) | ||
| build-nightly: | ||
| docker build -t $(NIGHTLY_TAG) . | ||
| @docker login -u ${DOCKERHUB_LOGIN} -p ${DOCKERHUB_PASSWORD} |
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.
Is the login/pass the only way? No tokens?
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 don't think so
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.
There's a way to trigger builds on docker hub afterall: #48
Haven't tested it yet.
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.
That approach couldn't be used because I want new tag based on %currentday.
|
|
||
| NIGHTLY_TAG := jakzal/phpqa:nightly-$(shell date +%y%m%d) | ||
| build-nightly: | ||
| docker build -t $(NIGHTLY_TAG) . |
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.
Since the image was already built in the current job we could probably push that one instead of building it again.
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.
Don't worry this doesn't build it from scratch. It reuses all layers and just slaps new tag on it, it's quick. Didn't find a way how to do it differently
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.
Perhaps creating a new tag and pushing it would work. The Current way does take ~3min for some reason.
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.
That's weird, it was quick for me. Of course provided other build steps were run before.
|
Did some more digging, it really looks like there is no way to create custom tags when building via their API. Regarding login credentials, quay.io allows to login via token. But I don't think this is worth migration. They also don't say anything about usage limits. |
|
Anything new? Or are you uncomfortable going forward? If that is so, let me know and I will create fork. |
|
I'll review this soon. Thanks again! 🍺 |
|
|
Ok, let's try it on In the same time we should work on:
|
|
Seems to work :) https://hub.docker.com/r/jakzal/phpqa-nightly/tags/ |
So I have tested this one out on my fork, seems it works like a charm.
Here's what you got to do in Travis:
Notes: