#15 Rebuild docker image when Dockerfile is changed
Merged by cqi. Opened by cqi.
cqi/freshmaker rebuild-docker-image-when-dockerfile-changed  into  master

Download 15.patch

freshmaker is able to build a docker image when changed Dockerfile is
detected. freshmaker listens on fedmsg bus and handles message from
topic git.receive. When Dockerfile is changed, freshmaker will start to
build docker image in Koji immediately. Note that, freshmaker does not
wait for the task to finish, it continues to handle next coming message
instead.

Signed-off-by: Chenxiong Qi cqi@redhat.com

rebased

rebased

+1, we have to do that fo MBS too :)

Your call, but you might be able to remove both of the log.error lines and replace them with a single line:

log.exception("Could not create task to build docker image %s', event.repo)

This will print the stacketrace, the exception message and your custom message.

I find this nice as a sysadmin+dev to be able to see the real traceback which caused the error in addition to the human-friendly explanation of what went wrong.

Looks good to me in general. :+1:

rebased

Update:

  • use log.exception in exception handler
  • rebase on master branch
  • ignore *swp files

still +1, feel free to merge if you are OK with the PR yourself :)

Pull-Request has been merged by cqi

Metadata