-
Notifications
You must be signed in to change notification settings - Fork 287
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
Enable incremental builds for node{6,8,10} #201
Conversation
Can one of the admins verify this patch? |
1 similar comment
Can one of the admins verify this patch? |
No function like that currently in the framework. I tried looking if it could be simulated the same way we do regular builds but it seems that
|
Maybe it could get implement as a test case in openshift tests? |
Well, docker in Fedora is 5 (minor) versions old, so that is not much of a surprise… If you have an idea on how the openshift test should look like, I would ask you for one; I'm really not sure how to trigger an incremental build in openshift and verify it is working as expected. |
No idea either. But will look into it. |
@@ -27,6 +27,11 @@ safeLogging () { | |||
} | |||
|
|||
shopt -s dotglob | |||
if [ -d /tmp/artifacts ] && [ "$(ls /tmp/artifacts/ 2>/dev/null)" ]; then | |||
echo "---> Restoring previous build artifacts ..." | |||
mv -T --verbose /tmp/artifacts/node_modules "${HOME}/node_modules" |
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 --verbose
flag supposed to be here? It generates an awful amount of output ...
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 did add it intentionally to get a "log" that something actually happens; and when I test it locally (built with VERSION=8 TARGET=centos7
), it produces one line:
$ s2i build --incremental https://github.com/sclorg/nodejs-ex s2i-nodejs8-incremental hello-node8
...snip...
---> Restoring previous build artifacts ...
'/tmp/artifacts/node_modules' -> '/opt/app-root/src/node_modules'
---> Installing application source ...
...snip...
However, if you are getting lots of output (I assume it is reporting every file it moves), it can be safely removed.
Added a test case for the incremental build feature. Needs sclorg/container-common-scripts#109 mergred first |
[test][test-openshift] |
Openshift failure seems like sclorg/nodejs-ex#212 |
@pkubatrh The fix for sclorg/nodejs-ex#212 might take a while to get shipped. Is there a chance for this to land before that, so that at least node8/6 might benefit from the incremental builds? |
@khardix Agreed, I do not think it is worthwhile want to wait until nodejs10 is fixed, since we do not support nodejs10 images anyway. So I am ok to get this merged even when the CI fails for that version. Would you mind doing the review of the changes I made to the PR? |
The test changes look sane and, barring the Node 10 issue, seems to pass. Therefore I'm OK with merging those. NB: I cannot hit the GH "Approve" button as an original author of this PR, so consider this my approval 😉 |
Thanks for taking a look at it. Merging |
Note: I tried to add a test for the incremental build,
but since the tests use a simulation of
s2i
rather thans2i
itself,I did not figure out how to do it or if it is even supported.
Improvement suggestions welcome!