Skip to content

Commit 136e1fb

Browse files
author
Sam Dodrill
committed
feat(slugbuilder): build without using a pipe for git archive
Ref #785 Ref deis/slugbuilder#9 This will break builds if the corresponding slugbuilder patch is not merged first.
1 parent 6685120 commit 136e1fb

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

builder/templates/builder

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ if __name__ == '__main__':
7474
# some applications do not have a Procfile, so only check for a Dockerfile
7575
if not os.path.exists(dockerfile):
7676
if os.path.exists('/buildpacks'):
77-
build_cmd = "docker run -i -a stdin {config_env} -v {cache_dir}:/tmp/cache:rw -v /buildpacks:/tmp/buildpacks deis/slugbuilder".format(**locals())
77+
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())
7878
else:
79-
build_cmd = "docker run -i -a stdin {config_env} -v {cache_dir}:/tmp/cache:rw deis/slugbuilder".format(**locals())
79+
build_cmd = "docker run -i -a stdin {config_env} -v {temp_dir}:/tmp/app -v {cache_dir}:/tmp/cache:rw deis/slugbuilder".format(**locals())
8080
# run slugbuilder in the background
81-
p = subprocess.Popen("git archive {branch} | ".format(**locals()) + build_cmd, shell=True, cwd=repo_dir, stdout=subprocess.PIPE)
81+
p = subprocess.Popen(build_cmd, shell=True, cwd=repo_dir, stdout=subprocess.PIPE)
8282
container = p.stdout.read().strip('\n')
8383
# attach to slugbuilder output
8484
p = subprocess.Popen('docker attach {container}'.format(**locals()), shell=True, cwd=temp_dir)

0 commit comments

Comments
 (0)