brew-test-bot: upload job fixes.

This commit is contained in:
Mike McQuaid 2013-12-10 20:35:21 +00:00
parent 50aa91940d
commit b1331e62b1

View File

@ -246,7 +246,7 @@ class Test
def setup def setup
@category = __method__ @category = __method__
return if ARGV.include? "--skip-setup"
test "brew doctor" test "brew doctor"
test "brew --env" test "brew --env"
test "brew --config" test "brew --config"
@ -374,10 +374,10 @@ class Test
def run def run
cleanup_before cleanup_before
download download
setup unless ARGV.include? "--skip-setup"
if ARGV.include? '--ci-pr-upload' or ARGV.include? '--ci-testing-upload' if ARGV.include? '--ci-pr-upload' or ARGV.include? '--ci-testing-upload'
bottle_upload bottle_upload
else else
setup
homebrew homebrew
formulae.each do |f| formulae.each do |f|
formula(f) formula(f)
@ -394,16 +394,16 @@ class Test
id = ENV['UPSTREAM_BUILD_ID'] id = ENV['UPSTREAM_BUILD_ID']
raise "Missing Jenkins variables!" unless jenkins and job and id raise "Missing Jenkins variables!" unless jenkins and job and id
test "cp #{jenkins}/jobs/'#{job}'/configurations/axis-version/*/builds/#{id}/archive/*.bottle*.* ." test "cp #{jenkins}/jobs/\"#{job}\"/configurations/axis-version/*/builds/#{id}/archive/*.bottle*.* ."
test "brew bottle --merge --write *.bottle*.rb" test "brew bottle --merge --write *.bottle*.rb"
remote = "https://github.com/BrewTestBot/homebrew.git" remote = "git@github.com:BrewTestBot/homebrew.git"
pr = ENV['UPSTREAM_PULL_REQUEST'] pr = ENV['UPSTREAM_PULL_REQUEST']
tag = pr ? "pr-#{pr}" : "testing-#{id}" tag = pr ? "pr-#{pr}" : "testing-#{id}"
test "git push --force #{remote} :refs/tags/#{tag}" test "git push --force #{remote} :refs/tags/#{tag}"
path = "/home/frs/project/m/ma/machomebrew/Bottles/" path = "/home/frs/project/m/ma/machomebrew/Bottles/"
url = "mikemcquaid,machomebrew@frs.sourceforge.net:#{path}" url = "BrewTestBot,machomebrew@frs.sourceforge.net:#{path}"
options = "--partial --progress --human-readable --compress" options = "--partial --progress --human-readable --compress"
test "rsync #{options} *.bottle.tar.gz #{url}" test "rsync #{options} *.bottle.tar.gz #{url}"
test "git tag --force #{tag}" test "git tag --force #{tag}"