Strider-CD / strider-docker-build

Build (and push) Docker images in Strider
16 stars 7 forks source link

option to automatically push #2

Closed kfatehi closed 9 years ago

kfatehi commented 9 years ago

@knownasilya im putting this here so we have a place to continue our discussion and decide if we want to add this to strider-docker-build, or maybe to a different plugin. I think this plugin is an appropriate place to add the feature -- we could rename the plugin to something else, like strider-docker

in the options we could add a checkbox to signify if we should automatically push too.

in order to push the image, you'll just need to use https://github.com/apocas/dockerode/blob/master/lib/docker.js#L163 to get the image and then follow up with https://github.com/apocas/dockerode/blob/master/lib/image.js#L82 to push it

the right place to inject that code (like check config and see if we should push) would be right here https://github.com/Strider-CD/strider-docker-build/blob/master/worker.js#L58 because here is where you know the build completed, and you can either stop or move onto a push routine

knownasilya commented 9 years ago

I guess my question now is, how does it actually build? I installed it and it doesn't seem to do anything..

kfatehi commented 9 years ago

@knownasilya it builds during the deploy phase per the algo. I dont quite remember how I did it. I think I archive the project directory and feed it into dockerode's build API

knownasilya commented 9 years ago

Addressed by PR #5