diff --git a/workers/dockerfilebuild.py b/workers/dockerfilebuild.py index 1cf1c2170..1a3625940 100644 --- a/workers/dockerfilebuild.py +++ b/workers/dockerfilebuild.py @@ -248,6 +248,7 @@ class DockerfileBuildWorker(Worker): self._mime_processors = { 'application/zip': DockerfileBuildWorker.__prepare_zip, + 'application/x-zip-compressed': DockerfileBuildWorker.__prepare_zip, 'text/plain': DockerfileBuildWorker.__prepare_dockerfile, 'application/octet-stream': DockerfileBuildWorker.__prepare_dockerfile, } @@ -305,7 +306,11 @@ class DockerfileBuildWorker(Worker): log_appender(filetype_msg) if c_type not in self._mime_processors: - raise RuntimeError('Invalid dockerfile content type: %s' % c_type) + log_appender('error', build_logs.PHASE) + repository_build.phase = 'error' + repository_build.save() + log_appender('Unknown mime-type: %s' % c_type, build_logs.ERROR) + return True build_dir = self._mime_processors[c_type](docker_resource) log_appender('building', build_logs.PHASE)