Skip to content
This repository has been archived by the owner on May 12, 2018. It is now read-only.

Commit

Permalink
configurable path for build script
Browse files Browse the repository at this point in the history
this is to fix builds on systems where /tmp is mounted with noexec
  • Loading branch information
Valeriy Trubachev committed Apr 8, 2015
1 parent 43096a2 commit 1fb44f7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/build.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ def initialize(data)
end

def run
@run_file = Tempfile.new("executor")
FileUtils.mkdir_p(config.jobs_dir) unless File.exists?(config.jobs_dir)

@run_file = Tempfile.new("executor", config.jobs_dir)
@run_file.chmod(0700)

@commands.unshift(checkout_cmd)
Expand Down
4 changes: 4 additions & 0 deletions lib/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ def builds_dir
@builds_path ||= File.join($root_path, 'tmp', 'builds')
end

def jobs_dir
@jobs_path ||= File.join($root_path, 'tmp', 'jobs')
end

def write(key, value)
@config[key] = value

Expand Down

0 comments on commit 1fb44f7

Please sign in to comment.