Skip to content

Commit 93aee75

Browse files
authored
Merge pull request #703 from willcl-ark/tidy-build
Tidy up build command
2 parents e992801 + 7af515b commit 93aee75

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

src/warnet/image.py

+10-6
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ def image():
1313
@image.command()
1414
@click.option("--repo", required=True, type=str)
1515
@click.option("--commit-sha", required=True, type=str)
16-
@click.option("--registry", required=True, type=str)
1716
@click.option(
1817
"--tags",
1918
required=True,
@@ -23,11 +22,16 @@ def image():
2322
@click.option("--build-args", required=False, type=str)
2423
@click.option("--arches", required=False, type=str)
2524
@click.option("--action", required=False, type=str, default="load")
26-
def build(repo, commit_sha, registry, tags, build_args, arches, action):
27-
"""
28-
Build bitcoind and bitcoin-cli from <repo> at <commit_sha> with the specified <tags>.
29-
Optionally deploy to remote registry using --action=push, otherwise image is loaded to local registry.
25+
def build(repo, commit_sha, tags, build_args, arches, action):
26+
"""Build a Bitcoin Core Docker image with specified parameters.
27+
28+
\b
29+
Usage Examples:
30+
# Build an image for Warnet repository
31+
warnet image build --repo bitcoin/bitcoin --commit-sha d6db87165c6dc2123a759c79ec236ea1ed90c0e3 --tags bitcoindevproject/bitcoin:v29.0-rc2 --arches amd64,arm64,armhf --action push
32+
# Build an image for local testing
33+
warnet image build --repo bitcoin/bitcoin --commit-sha d6db87165c6dc2123a759c79ec236ea1ed90c0e3 --tags bitcoindevproject/bitcoin:v29.0-rc2 --action load
3034
"""
31-
res = build_image(repo, commit_sha, registry, tags, build_args, arches, action)
35+
res = build_image(repo, commit_sha, tags, build_args, arches, action)
3236
if not res:
3337
sys.exit(1)

src/warnet/image_build.py

-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ def run_command(command):
1717
def build_image(
1818
repo: str,
1919
commit_sha: str,
20-
docker_registry: str,
2120
tags: str,
2221
build_args: str,
2322
arches: str,
@@ -41,7 +40,6 @@ def build_image(
4140

4241
print(f"{repo=:}")
4342
print(f"{commit_sha=:}")
44-
print(f"{docker_registry=:}")
4543
print(f"{tags=:}")
4644
print(f"{build_args=:}")
4745
print(f"{build_arches=:}")

0 commit comments

Comments
 (0)