From d94e74ada5900bb0b37170bde4af4883f4cbb2fb Mon Sep 17 00:00:00 2001 From: Jenia Peimer Date: Thu, 11 Jul 2024 11:45:44 +0300 Subject: [PATCH 1/2] Add command arguments to the build-and-push-container --- README.md | 4 +++- example.config.yaml | 4 ++-- webhook_server_container/libs/github_api.py | 8 +++++++- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f6f0c993..28da05a3 100644 --- a/README.md +++ b/README.md @@ -224,7 +224,9 @@ reviewers: - `/retest tox`: run tox - `/retest build-container`: run build-container - `/retest python-module-install`: run python-module-install command -- `/build-and-push-container`: build and push container image (tag will be the PR number). +- `/build-and-push-container`: build and push container image (tag will be the PR number) + - You can add extra args to the Docker build command + - Example: `/build-and-push-container --build-arg OPENSHIFT_PYTHON_WRAPPER_COMMIT=` - `/assign-reviewers`: assign reviewers based on OWNERS file ### Supported user labels diff --git a/example.config.yaml b/example.config.yaml index 1ec00c0b..72f8c501 100644 --- a/example.config.yaml +++ b/example.config.yaml @@ -57,8 +57,8 @@ repositories: tag: release: true # Push image to registry on new release with release as the tag build-args: # build args to send to podman build command - - build-arg1=1 - - build-arg2=2 + - my-build-arg1=1 + - my-build-arg2=2 args: # args to send to podman build command - --format docker diff --git a/webhook_server_container/libs/github_api.py b/webhook_server_container/libs/github_api.py index ff20917b..9abee80c 100644 --- a/webhook_server_container/libs/github_api.py +++ b/webhook_server_container/libs/github_api.py @@ -160,6 +160,8 @@ def __init__(self, hook_data: Dict[Any, Any], headers: Headers): * Multiple target branches can be cherry-picked, separated by spaces. (`/cherry-pick branch1 branch2`) * Cherry-pick will be started when PR is merged * To build and push container image command `/build-and-push-container` in the PR (tag will be the PR number). + * You can add extra args to the Docker build command + * Example: `/build-and-push-container --build-arg OPENSHIFT_PYTHON_WRAPPER_COMMIT=` * To add a label by comment use `/