Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Commit

Permalink
feat(slugbuilder): build without using a pipe for git archive
Browse files Browse the repository at this point in the history
Ref #785
Ref deis/slugbuilder#9

This will break builds if the corresponding slugbuilder patch is not
merged first.
  • Loading branch information
Sam Dodrill committed Aug 21, 2014
1 parent 6685120 commit 136e1fb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions builder/templates/builder
Expand Up @@ -74,11 +74,11 @@ if __name__ == '__main__':
# some applications do not have a Procfile, so only check for a Dockerfile
if not os.path.exists(dockerfile):
if os.path.exists('/buildpacks'):
build_cmd = "docker run -i -a stdin {config_env} -v {cache_dir}:/tmp/cache:rw -v /buildpacks:/tmp/buildpacks deis/slugbuilder".format(**locals())
build_cmd = "docker run -i -a stdin {config_env} -v {temp_dir}:/tmp/app -v {cache_dir}:/tmp/cache:rw -v /buildpacks:/tmp/buildpacks deis/slugbuilder".format(**locals())
else:
build_cmd = "docker run -i -a stdin {config_env} -v {cache_dir}:/tmp/cache:rw deis/slugbuilder".format(**locals())
build_cmd = "docker run -i -a stdin {config_env} -v {temp_dir}:/tmp/app -v {cache_dir}:/tmp/cache:rw deis/slugbuilder".format(**locals())
# run slugbuilder in the background
p = subprocess.Popen("git archive {branch} | ".format(**locals()) + build_cmd, shell=True, cwd=repo_dir, stdout=subprocess.PIPE)
p = subprocess.Popen(build_cmd, shell=True, cwd=repo_dir, stdout=subprocess.PIPE)
container = p.stdout.read().strip('\n')
# attach to slugbuilder output
p = subprocess.Popen('docker attach {container}'.format(**locals()), shell=True, cwd=temp_dir)
Expand Down

0 comments on commit 136e1fb

Please sign in to comment.