未验证 提交 239b4c9d 编辑于 作者: Mike McQuaid's avatar Mike McQuaid
浏览文件

Remove last Jenkins references

- remove Jenkins Testing support from `brew pull`
- update reference to MacStadium Orka
- remove reference to DigitalOcean
上级 ecea0e5a
......@@ -11,18 +11,6 @@ require "pkg_version"
require "bottle_publisher"
require "formula_info"
module GitHub
module_function
# Return the corresponding test-bot user name for the given GitHub organization.
def test_bot_user(user, test_bot)
return test_bot if test_bot
return "BrewTestBot" if user.casecmp("homebrew").zero?
"#{user.capitalize}TestBot"
end
end
module Homebrew
module_function
......@@ -35,7 +23,7 @@ module Homebrew
Optionally, publish updated bottles for any formulae changed by the patch.
Each <patch> may be the number of a pull request in `homebrew/core`, the URL of any pull request
or commit on GitHub or a "https://jenkins.brew.sh/job/..." testing job URL.
or commit on GitHub.
EOS
switch "--bump",
description: "For one-formula PRs, automatically reword commit message to our preferred format."
......@@ -50,14 +38,6 @@ module Homebrew
description: "Do not warn if pulling to a branch besides master (useful for testing)."
switch "--no-pbcopy",
description: "Do not copy anything to the system clipboard."
switch "--no-publish",
description: "Do not publish bottles to Bintray."
switch "--warn-on-publish-failure",
description: "Do not exit if there's a failure publishing bottles on Bintray."
flag "--bintray-org=",
description: "Publish bottles to the specified Bintray <organisation>."
flag "--test-bot-user=",
description: "Pull the bottle block commit from the specified <user> on GitHub."
switch :verbose
switch :debug
min_named 1
......@@ -92,18 +72,7 @@ module Homebrew
args.named.each do |arg|
arg = "#{CoreTap.instance.default_remote}/pull/#{arg}" if arg.to_i.positive?
if (testing_match = arg.match %r{/job/Homebrew.*Testing/(\d+)})
tap = ARGV.value("tap")
tap = if tap&.start_with?("homebrew/")
Tap.fetch("homebrew", tap.delete_prefix("homebrew/"))
elsif tap
odie "Tap option did not start with \"homebrew/\": #{tap}"
else
CoreTap.instance
end
_, testing_job = *testing_match
url = "https://github.com/Homebrew/homebrew-#{tap.repo}/compare/master...BrewTestBot:testing-#{testing_job}"
elsif (api_match = arg.match HOMEBREW_PULL_API_REGEX)
if (api_match = arg.match HOMEBREW_PULL_API_REGEX)
_, user, repo, issue = *api_match
url = "https://github.com/#{user}/#{repo}/pull/#{issue}"
tap = Tap.fetch(user, repo) if repo.match?(HOMEBREW_OFFICIAL_REPO_PREFIXES_REGEX)
......@@ -114,7 +83,7 @@ module Homebrew
odie "Not a GitHub pull request or commit: #{arg}"
end
odie "No pull request detected!" if !testing_job && issue.nil?
odie "No pull request detected!" if issue.blank?
if tap
tap.install unless tap.installed?
......@@ -162,7 +131,6 @@ module Homebrew
end
end
fetch_bottles = false
changed_formulae_names.each do |name|
next if Homebrew::EnvConfig.disable_load_formula?
......@@ -219,33 +187,7 @@ module Homebrew
safe_system "git", "commit", "--amend", "--signoff", "--allow-empty", "-q", "-m", message
end
if fetch_bottles
bottle_commit_url = if testing_job
bottle_branch = "testing-bottle-#{testing_job}"
url
else
bottle_branch = "pull-bottle-#{issue}"
bot_username = GitHub.test_bot_user(user, args.test_bot_user)
"https://github.com/#{bot_username}/homebrew-#{tap.repo}/compare/#{user}:master...pr-#{issue}"
end
curl "--silent", "--fail", "--output", "/dev/null", "--head", bottle_commit_url
if merge_commit
fetch_merge_patch(bottle_commit_url, args, issue)
else
fetch_bottles_patch(bottle_commit_url, args, bottle_branch, branch, orig_revision)
end
BottlePublisher.new(
tap,
changed_formulae_names,
args.bintray_org,
args.no_publish?,
args.warn_on_publish_failure?,
).publish_and_check_bottles
elsif merge_commit
fetch_merge_patch(url, args, issue)
end
fetch_merge_patch(url, args, issue) if merge_commit
ohai "Patch changed:"
safe_system "git", "diff-tree", "-r", "--stat", orig_revision, end_revision
......@@ -274,15 +216,6 @@ module Homebrew
Utils.popen_read("git", "rev-parse", fetched ? "FETCH_HEAD" : "HEAD").strip
end
def fetch_bottles_patch(bottle_commit_url, args, bottle_branch, branch, orig_revision)
safe_system "git", "checkout", "--quiet", "-B", bottle_branch, orig_revision
PatchPuller.new(bottle_commit_url, args, "bottle commit").pull_patch
safe_system "git", "rebase", "--quiet", branch
safe_system "git", "checkout", "--quiet", branch
safe_system "git", "merge", "--quiet", "--ff-only", "--no-edit", bottle_branch
safe_system "git", "branch", "--quiet", "-D", bottle_branch
end
def fetch_merge_patch(url, args, issue)
PatchPuller.new(url, args, "merge commit").pull_merge_commit(issue)
end
......
......@@ -72,13 +72,10 @@ Code is under the [BSD 2-clause "Simplified" License](LICENSE.txt).
Documentation is under the [Creative Commons Attribution license](https://creativecommons.org/licenses/by/4.0/).
## Sponsors
Our macOS continuous integration infrastructure is hosted by [MacStadium](https://www.macstadium.com).
Our macOS continuous integration infrastructure is hosted by [MacStadium's Orka](https://www.macstadium.com/customers/homebrew).
[![Powered by MacStadium](https://cloud.githubusercontent.com/assets/125011/22776032/097557ac-eea6-11e6-8ba8-eff22dfd58f1.png)](https://www.macstadium.com)
Our Jenkins CI installation is hosted by [DigitalOcean](https://m.do.co/c/7e39c35d5581).
![DigitalOcean](https://cloud.githubusercontent.com/assets/125011/26827038/4b7b5ade-4ab3-11e7-811b-fed3ab0e934d.png)
Our bottles (binary packages) are hosted by [Bintray](https://bintray.com/homebrew).
......
......@@ -903,8 +903,7 @@ Get a patch from a GitHub commit or pull request and apply it to Homebrew.
Optionally, publish updated bottles for any formulae changed by the patch.
Each *`patch`* may be the number of a pull request in `homebrew/core`, the URL of
any pull request or commit on GitHub or a "https://jenkins.brew.sh/job/..."
testing job URL.
any pull request or commit on GitHub.
* `--bump`:
For one-formula PRs, automatically reword commit message to our preferred format.
......@@ -918,14 +917,6 @@ testing job URL.
Do not warn if pulling to a branch besides master (useful for testing).
* `--no-pbcopy`:
Do not copy anything to the system clipboard.
* `--no-publish`:
Do not publish bottles to Bintray.
* `--warn-on-publish-failure`:
Do not exit if there's a failure publishing bottles on Bintray.
* `--bintray-org`:
Publish bottles to the specified Bintray *`organisation`*.
* `--test-bot-user`:
Pull the bottle block commit from the specified *`user`* on GitHub.
### `release-notes` [*`options`*] [*`previous_tag`*] [*`end_ref`*]
......
......@@ -1164,7 +1164,7 @@ Run Homebrew with the Ruby profiler, e\.g\. \fBbrew prof readall\fR\.
Get a patch from a GitHub commit or pull request and apply it to Homebrew\. Optionally, publish updated bottles for any formulae changed by the patch\.
.
.P
Each \fIpatch\fR may be the number of a pull request in \fBhomebrew/core\fR, the URL of any pull request or commit on GitHub or a "https://jenkins\.brew\.sh/job/\.\.\." testing job URL\.
Each \fIpatch\fR may be the number of a pull request in \fBhomebrew/core\fR, the URL of any pull request or commit on GitHub\.
.
.TP
\fB\-\-bump\fR
......@@ -1190,22 +1190,6 @@ Do not warn if pulling to a branch besides master (useful for testing)\.
\fB\-\-no\-pbcopy\fR
Do not copy anything to the system clipboard\.
.
.TP
\fB\-\-no\-publish\fR
Do not publish bottles to Bintray\.
.
.TP
\fB\-\-warn\-on\-publish\-failure\fR
Do not exit if there\'s a failure publishing bottles on Bintray\.
.
.TP
\fB\-\-bintray\-org\fR
Publish bottles to the specified Bintray \fIorganisation\fR\.
.
.TP
\fB\-\-test\-bot\-user\fR
Pull the bottle block commit from the specified \fIuser\fR on GitHub\.
.
.SS "\fBrelease\-notes\fR [\fIoptions\fR] [\fIprevious_tag\fR] [\fIend_ref\fR]"
Print the merged pull requests on Homebrew/brew between two Git refs\. If no \fIprevious_tag\fR is provided it defaults to the latest tag\. If no \fIend_ref\fR is provided it defaults to \fBorigin/master\fR\.
.
......
Supports Markdown
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册