Merge "Fix helm collator image build"

This commit is contained in:
Zuul 2021-06-10 22:07:25 +00:00 committed by Gerrit Code Review
commit 795e17f2d9
3 changed files with 9 additions and 9 deletions

View File

@ -23,7 +23,7 @@ DOCKER_REGISTRY ?= quay.io
IMAGE_PREFIX ?= airshipit
IMAGE_TAG ?= latest
DISTRO ?= debian_stable
CHARTS ?= \"$(cat "config/charts.yaml")\"
CHARTS ?= config/charts.yaml
IMAGE := ${DOCKER_REGISTRY}/${IMAGE_PREFIX}/${IMAGE_NAME}:${IMAGE_TAG}
SH_TO_CHECK := $(wildcard files/*.sh )
PROXY ?= http://proxy.foo.com:8000
@ -76,7 +76,7 @@ build_collator:
ifeq ($(IMAGE_ID), none)
ifeq ($(USE_PROXY), true)
./build-image-make.sh \
config/charts.yaml \
$(CHARTS) \
$(IMAGE_NAME) \
$(IMAGE) \
$(LABEL) \
@ -86,7 +86,7 @@ ifeq ($(USE_PROXY), true)
$(NO_PROXY)
else
./build-image-make.sh \
config/charts.yaml \
$(CHARTS) \
$(IMAGE_NAME) \
$(IMAGE) \
$(LABEL) \

View File

@ -5,7 +5,7 @@
if [[ $# < 5 ]]; then
echo "usage:"
echo " $0 \\\n"
echo " <charts filename> \\\n"
echo " <charts file> \\\n"
echo " <image name> \\\n"
echo " <image uri> \\\n"
echo " <label> \\\n"
@ -46,7 +46,7 @@ docker build . \
$(date --rfc-3339=seconds --utc)" \
--label "org.opencontainers.image.title=${IMAGE_NAME}" \
--force-rm=true \
--build-arg "CHARTS=\"$(cat "${CHARTS}")\"" \
--build-arg "CHARTS=$(cat "${CHARTS}")" \
--build-arg http_proxy=${PROXY} \
--build-arg https_proxy=${PROXY} \
--build-arg HTTP_PROXY=${PROXY} \
@ -65,6 +65,6 @@ docker build . \
$(date --rfc-3339=seconds --utc)" \
--label "org.opencontainers.image.title=${IMAGE_NAME}" \
--force-rm=true \
--build-arg "CHARTS=\"$(cat "${CHARTS}")\"" \
--build-arg "CHARTS=$(cat "${CHARTS}")" \
--build-arg GIT_COMMIT=${COMMIT}
fi
fi

View File

@ -3,7 +3,7 @@
set -xe
if [[ $# != 1 ]]; then
printf "usage: $0 <filename>\n"
printf "usage: $0 <charts file>\n"
exit 1
fi
@ -14,4 +14,4 @@ IMAGE_TAG="${IMAGE_TAG:-latest}"
image=${DOCKER_REGISTRY}/${IMAGE_PREFIX}/${IMAGE_NAME}:${IMAGE_TAG}
echo "Building the ${image}"
docker build . -t $image --build-arg "CHARTS=\"$(cat "$1")\""
docker build . -t $image --build-arg "CHARTS=$(cat "$1")"