From 3b04fbce7fc9290e51448b62070ddae6592a7ec3 Mon Sep 17 00:00:00 2001 From: Matthijs van der Burgh Date: Sat, 9 Dec 2023 18:06:28 +0100 Subject: [PATCH] (CI) fix command to reproduce docker build --- ci/build-docker-image.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ci/build-docker-image.sh b/ci/build-docker-image.sh index 5c87a241a..e6a014e97 100755 --- a/ci/build-docker-image.sh +++ b/ci/build-docker-image.sh @@ -129,13 +129,16 @@ fi echo -e "\e[35;1m This build can be reproduced locally using the following commands: +\`\`\` tue-get install docker -cd ${TUE_DIR} +cd "'${TUE_DIR}'" git checkout ${CI_COMMIT} -"'${TUE_DIR}'"/ci/build-docker-package.sh --image=${CI_DOCKER_IMAGE_NAME} --branch=${CI_BRANCH} --pullrequest=${CI_PULL_REQUEST} --commit=${CI_COMMIT} --push_image=${CI_DOCKER_PUSH_IMAGE} --registry=${CI_DOCKER_REGISTRY} --ref-name=${CI_REF_NAME} --platforms=${CI_DOCKER_PLATFORMS} --push_image=${CI_DOCKER_PUSH_IMAGE} --ros_version=${CI_ROS_VERSION} --ros_distro=${CI_ROS_DISTRO} --targets_repo=${CI_TARGETS_REPO} --base_image=${CI_DOCKER_BASE_IMAGE} --docker_file=${CI_DOCKER_FILE}${ADDITIONAL_ARGS_LOCAL_BUILD} +"'${TUE_DIR}'"/ci/build-docker-image.sh --image=${CI_DOCKER_IMAGE_NAME} --branch=${CI_BRANCH} --pull_request=${CI_PULL_REQUEST} --commit=${CI_COMMIT} --push_image=false --registry=${CI_DOCKER_REGISTRY} --ref-name=${CI_REF_NAME} --platforms=${CI_DOCKER_PLATFORMS} --push_image=${CI_DOCKER_PUSH_IMAGE} --ros_version=${CI_ROS_VERSION} --ros_distro=${CI_ROS_DISTRO} --targets_repo=${CI_TARGETS_REPO} --base_image=${CI_DOCKER_BASE_IMAGE} --docker_file=${CI_DOCKER_FILE}${ADDITIONAL_ARGS_LOCAL_BUILD} +\`\`\` + +This command never pushes the docker image to the registry. You will need to alter the '--push_image' argument for that. This also requires you are logged in to the correct docker registry or provide the related arguments(--docker_login, --user and --password), so this script will login. -Optionally fix your compilation errors and re-run only the last command \e[0m" # Declare arrays for storing the constructed docker build arguments