From 6d2105ae476f61a7dcac8f2b481b5d69f084e677 Mon Sep 17 00:00:00 2001 From: Willy Njomen Date: Mon, 8 May 2023 14:36:35 -0400 Subject: [PATCH] Override builder images registry path Stx-tool always uses "stx-init-env --rebuild" from the docker hub master branch. This causes random problems with people trying to set up an environment I used "stx-init-env --rebuild" to make sure the images are built locally, it does not make sense to always use the latest tag for a release. TESTS ======================================== * Start stx-tools containers * Pull an image inside "stx shell" * Stop stx-tools container * Run "stx-init-env" without the "--rebuild" * to make sure the images are built locally Story: 2010055 Task: 47970 Signed-off-by: Willy Njomen Change-Id: Id466fbd243df1d77330473850fa4ba7d649941b7 --- import-stx | 5 +++++ stx-init-env | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/import-stx b/import-stx index 61854e29..ce37a3d1 100644 --- a/import-stx +++ b/import-stx @@ -69,6 +69,11 @@ # without the "--rebuild" flag. # Default: master-debian-latest +# STX_PREBUILT_BUILDER_IMAGE_PREFIX +# Download pre-built images from this registry/prefix. This is used by "stx-init-env" +# without the "--rebuild" flag. If not empty, this must end with "/". +# Default:starlingx/ + notice_warn () { local tty_on tty_off if [[ -t 2 ]] ; then diff --git a/stx-init-env b/stx-init-env index d4d17d09..0c6e62a5 100755 --- a/stx-init-env +++ b/stx-init-env @@ -54,7 +54,7 @@ HELM=helm DOCKER=docker PYTHON3=python3 KUBECTL=kubectl -DOCKER_PREFIX="starlingx/" +DOCKER_PREFIX=${STX_PREBUILT_BUILDER_IMAGE_PREFIX:-'starlingx/'} DOCKER_IMAGES="stx-builder stx-pkgbuilder stx-lat-tool stx-aptly" DOCKER_TAG="$STX_PREBUILT_BUILDER_IMAGE_TAG"