-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
22091c1
commit d7efdfe
Showing
1 changed file
with
92 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
class AnsibleBuilder < Formula | ||
include Language::Python::Virtualenv | ||
|
||
desc "CLI tool for building Ansible Execution Environments (Containers)" | ||
homepage "https://ansible-builder.readthedocs.io/" | ||
url "https://files.pythonhosted.org/packages/3c/d5/c94e86098107209a82de9401ec31413fabd4236af0be9427c57a5bdbf855/ansible_builder-3.1.0.tar.gz" | ||
sha256 "d2dc573e26a7bd5095e98aeb37ee9b00bc9f5005abea7147d74229c0f3426fcb" | ||
license "Apache-2.0" | ||
|
||
depends_on "libyaml" | ||
depends_on "[email protected]" | ||
depends_on "rust" => :build | ||
Check failure on line 12 in Formula/ansible-builder.rb GitHub Actions / test-bot (ubuntu-latest)
|
||
|
||
resource "attrs" do | ||
url "https://files.pythonhosted.org/packages/fc/0f/aafca9af9315aee06a89ffde799a10a582fe8de76c563ee80bbcdc08b3fb/attrs-24.2.0.tar.gz" | ||
sha256 "5cfb1b9148b5b086569baec03f20d7b6bf3bcacc9a42bebf87ffaaca362f6346" | ||
end | ||
|
||
resource "bindep" do | ||
url "https://files.pythonhosted.org/packages/8e/89/689d7f17c559dea2849d27365f53bd40f134056392db9e88a2590eb3dc29/bindep-2.11.0.tar.gz" | ||
sha256 "acb2f259bce1fd1508873479609bbde5b9aae508378476a68d6b6a19002e7e2f" | ||
end | ||
|
||
resource "distro" do | ||
url "https://files.pythonhosted.org/packages/fc/f8/98eea607f65de6527f8a2e8885fc8015d3e6f5775df186e443e0964a11c3/distro-1.9.0.tar.gz" | ||
sha256 "2fa77c6fd8940f116ee1d6b94a2f90b13b5ea8d019b98bc8bafdcabcdd9bdbed" | ||
end | ||
|
||
resource "jsonschema" do | ||
url "https://files.pythonhosted.org/packages/38/2e/03362ee4034a4c917f697890ccd4aec0800ccf9ded7f511971c75451deec/jsonschema-4.23.0.tar.gz" | ||
sha256 "d71497fef26351a33265337fa77ffeb82423f3ea21283cd9467bb03999266bc4" | ||
end | ||
|
||
resource "jsonschema-specifications" do | ||
url "https://files.pythonhosted.org/packages/10/db/58f950c996c793472e336ff3655b13fbcf1e3b359dcf52dcf3ed3b52c352/jsonschema_specifications-2024.10.1.tar.gz" | ||
sha256 "0f38b83639958ce1152d02a7f062902c41c8fd20d558b0c34344292d417ae272" | ||
end | ||
|
||
resource "packaging" do | ||
url "https://files.pythonhosted.org/packages/51/65/50db4dda066951078f0a96cf12f4b9ada6e4b811516bf0262c0f4f7064d4/packaging-24.1.tar.gz" | ||
sha256 "026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002" | ||
end | ||
|
||
resource "parsley" do | ||
url "https://files.pythonhosted.org/packages/06/52/cac2f9e78c26cff8bb518bdb4f2b5a0c7058dec7a62087ed48fe87478ef0/Parsley-1.3.tar.gz" | ||
sha256 "9444278d47161d5f2be76a767809a3cbe6db4db822f46a4fd7481d4057208d41" | ||
end | ||
|
||
resource "pbr" do | ||
url "https://files.pythonhosted.org/packages/b2/35/80cf8f6a4f34017a7fe28242dc45161a1baa55c41563c354d8147e8358b2/pbr-6.1.0.tar.gz" | ||
sha256 "788183e382e3d1d7707db08978239965e8b9e4e5ed42669bf4758186734d5f24" | ||
end | ||
|
||
resource "pyyaml" do | ||
url "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz" | ||
sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e" | ||
end | ||
|
||
resource "referencing" do | ||
url "https://files.pythonhosted.org/packages/99/5b/73ca1f8e72fff6fa52119dbd185f73a907b1989428917b24cff660129b6d/referencing-0.35.1.tar.gz" | ||
sha256 "25b42124a6c8b632a425174f24087783efb348a6f1e0008e63cd4466fedf703c" | ||
end | ||
|
||
resource "rpds-py" do | ||
url "https://files.pythonhosted.org/packages/55/64/b693f262791b818880d17268f3f8181ef799b0d187f6f731b1772e05a29a/rpds_py-0.20.0.tar.gz" | ||
sha256 "d72a210824facfdaf8768cf2d7ca25a042c30320b3020de2fa04640920d4e121" | ||
end | ||
|
||
def install | ||
virtualenv_install_with_resources | ||
end | ||
|
||
test do | ||
test_tmp = testpath/"tmp" | ||
(testpath/"execution-environment.yml").write <<~EOS | ||
--- | ||
version: 3 | ||
images: | ||
base_image: | ||
name: quay.io/ansible/awx-ee:latest | ||
options: | ||
skip_ansible_check: True | ||
EOS | ||
|
||
system bin/"ansible-builder", "create", "-c", test_tmp, | ||
"--output-filename", "Containerfile", | ||
"--file", testpath/"execution-environment.yml" | ||
assert_predicate test_tmp/"Containerfile", :exist? | ||
|
||
assert_match version.to_s, shell_output("#{bin}/ansible-builder --version") | ||
end | ||
end |