jenkins-job-builder 1.1.0 (new formula)
Closes Homebrew/homebrew#37595. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
6c1cda3a8c
commit
bc21c8634b
1 changed files with 63 additions and 0 deletions
63
Formula/jenkins-job-builder.rb
Normal file
63
Formula/jenkins-job-builder.rb
Normal file
|
@ -0,0 +1,63 @@
|
|||
class JenkinsJobBuilder < Formula
|
||||
homepage "http://ci.openstack.org/jjb.html"
|
||||
url "https://pypi.python.org/packages/source/j/jenkins-job-builder/jenkins-job-builder-1.1.0.tar.gz"
|
||||
sha256 "4176a06efec3985823245a460e93fd678d78250defcc9f3109beb58aff34e609"
|
||||
|
||||
depends_on :python if MacOS.version <= :snow_leopard
|
||||
|
||||
resource "argparse" do
|
||||
url "https://pypi.python.org/packages/source/a/argparse/argparse-1.3.0.tar.gz"
|
||||
sha256 "b3a79a23d37b5a02faa550b92cbbbebeb4aa1d77e649c3eb39c19abf5262da04"
|
||||
end
|
||||
|
||||
resource "pyyaml" do
|
||||
url "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-3.11.tar.gz"
|
||||
sha256 "c36c938a872e5ff494938b33b14aaa156cb439ec67548fcab3535bb78b0846e8"
|
||||
end
|
||||
|
||||
resource "ordereddict" do
|
||||
url "https://pypi.python.org/packages/source/o/ordereddict/ordereddict-1.1.tar.gz"
|
||||
sha256 "1c35b4ac206cef2d24816c89f89cf289dd3d38cf7c449bb3fab7bf6d43f01b1f"
|
||||
end
|
||||
|
||||
resource "python-jenkins" do
|
||||
url "https://pypi.python.org/packages/source/p/python-jenkins/python-jenkins-0.4.5.tar.gz"
|
||||
sha256 "e69949ff81064b17bf9f82f89ce511b4c19a8ddd0a69c180494278905e86e85b"
|
||||
end
|
||||
|
||||
resource "pbr" do
|
||||
url "https://pypi.python.org/packages/source/p/pbr/pbr-0.10.8.tar.gz"
|
||||
sha256 "a741650c697abe9dd3da00039a57a45a15a6eed017a16f6b7e4c0161fae2b4b2"
|
||||
end
|
||||
|
||||
resource "six" do
|
||||
url "https://pypi.python.org/packages/source/s/six/six-1.9.0.tar.gz"
|
||||
sha256 "e24052411fc4fbd1f672635537c3fc2330d9481b18c0317695b46259512c91d5"
|
||||
end
|
||||
|
||||
resource "pip" do
|
||||
url "https://pypi.python.org/packages/source/p/pip/pip-6.0.8.tar.gz"
|
||||
sha256 "0d58487a1b7f5be2e5e965c11afbea1dc44ecec8069de03491a4d0d6c85f4551"
|
||||
end
|
||||
|
||||
def install
|
||||
ENV.prepend_create_path "PYTHONPATH", libexec/"vendor/lib/python2.7/site-packages"
|
||||
%w[argparse pyyaml ordereddict python-jenkins pbr six pip].each do |r|
|
||||
resource(r).stage do
|
||||
system "python", *Language::Python.setup_install_args(libexec/"vendor")
|
||||
end
|
||||
end
|
||||
|
||||
ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python2.7/site-packages"
|
||||
system "python", *Language::Python.setup_install_args(libexec)
|
||||
|
||||
bin.install Dir[libexec/"bin/*"]
|
||||
bin.env_script_all_files(libexec/"bin", :PYTHONPATH => ENV["PYTHONPATH"])
|
||||
end
|
||||
|
||||
test do
|
||||
assert_match /Managed by Jenkins Job Builder/,
|
||||
pipe_output("#{bin}/jenkins-jobs test /dev/stdin",
|
||||
"- job:\n name: test-job\n\n", 0)
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue