From eedf4484bc6b39e3fdc0f03c5c89aa2aa60877c1 Mon Sep 17 00:00:00 2001 From: VakarisZ Date: Tue, 19 Oct 2021 12:12:25 +0300 Subject: [PATCH] Deployments: fix the extraction of commit number in docker.sh --- build_scripts/docker/docker.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build_scripts/docker/docker.sh b/build_scripts/docker/docker.sh index 860667de6..af719fb0d 100755 --- a/build_scripts/docker/docker.sh +++ b/build_scripts/docker/docker.sh @@ -15,6 +15,8 @@ setup_build_dir() { copy_entrypoint_to_build_dir "$build_dir" + build_commit=$(git rev-parse --git-dir "$monkey_repo" --short HEAD) + copy_monkey_island_to_build_dir "$monkey_repo/monkey" "$build_dir" copy_server_config_to_build_dir "$build_dir" modify_deployment "$deployment_type" "$build_dir" @@ -40,9 +42,9 @@ build_package() { pushd ./docker if [ -n "$1" ]; then - version="v$(git rev-parse --short HEAD)" - else version="v$version" + else + version="v$build_commit" fi docker_image_name="guardicore/monkey-island:$version"