Skip to content

Commit

Permalink
improves helm chart building output
Browse files Browse the repository at this point in the history
  • Loading branch information
jaxesn committed Oct 25, 2023
1 parent 45e5b61 commit 17f6c16
Show file tree
Hide file tree
Showing 10 changed files with 151 additions and 67 deletions.
32 changes: 21 additions & 11 deletions Common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,8 @@ HELM_DESTINATION_REPOSITORY?=$(IMAGE_COMPONENT)
HELM_IMAGE_LIST?=
HELM_GIT_CHECKOUT_TARGET?=$(HELM_SOURCE_REPOSITORY)/eks-anywhere-checkout-$(HELM_GIT_TAG)
HELM_GIT_PATCH_TARGET?=$(HELM_SOURCE_REPOSITORY)/eks-anywhere-helm-patched
PACKAGE_DEPENDENCIES?=
FORCE_JSON_SCHEMA_FILE?=
####################################################

#### HELPERS ########
Expand Down Expand Up @@ -799,17 +801,25 @@ binary-builder/cgo/%: USE_DOCKER_FOR_CGO_BUILD=$(shell command -v docker &> /dev
helm/pull: | $$(ENABLE_LOGGING)
@$(BUILD_LIB)/helm_pull.sh $(HELM_PULL_LOCATION) $(HELM_REPO_URL) $(HELM_PULL_NAME) $(REPO) $(HELM_DIRECTORY) $(CHART_VERSION) $(COPY_CRDS)

# Build helm chart
.PHONY: helm/build
helm/build: $(LICENSES_TARGETS_FOR_PREREQ)
helm/build: $(if $(filter true,$(REPO_NO_CLONE)),,$(HELM_GIT_CHECKOUT_TARGET))
helm/build: $(if $(wildcard $(PROJECT_ROOT)/helm/patches),$(HELM_GIT_PATCH_TARGET),) | ensure-helm ensure-skopeo
@echo -e $(call TARGET_START_LOG)
$(BUILD_LIB)/helm_copy.sh $(HELM_SOURCE_REPOSITORY) $(HELM_DESTINATION_REPOSITORY) $(HELM_DIRECTORY) $(OUTPUT_DIR)
$(BUILD_LIB)/helm_require.sh $(HELM_SOURCE_IMAGE_REPO) $(HELM_DESTINATION_REPOSITORY) $(OUTPUT_DIR) $(IMAGE_TAG) $(HELM_TAG) $(PROJECT_ROOT) $(LATEST) $(HELM_USE_UPSTREAM_IMAGE) $(HELM_IMAGE_LIST)
$(BUILD_LIB)/helm_replace.sh $(HELM_DESTINATION_REPOSITORY) $(OUTPUT_DIR)
$(BUILD_LIB)/helm_build.sh $(OUTPUT_DIR) $(HELM_DESTINATION_REPOSITORY)
@echo -e $(call TARGET_END_LOG)

.PHONY: helm/copy helm/require helm/replace helm/build helm/push

helm/copy: $(LICENSES_TARGETS_FOR_PREREQ)
helm/copy: $(if $(filter true,$(REPO_NO_CLONE)),,$(HELM_GIT_CHECKOUT_TARGET))
helm/copy: $(if $(wildcard $(PROJECT_ROOT)/helm/patches),$(HELM_GIT_PATCH_TARGET),) | ensure-helm ensure-skopeo $$(ENABLE_LOGGING)
@$(BUILD_LIB)/helm_copy.sh $(HELM_SOURCE_REPOSITORY) $(HELM_DESTINATION_REPOSITORY) $(HELM_DIRECTORY) $(OUTPUT_DIR)

helm/require: helm/copy | $$(ENABLE_LOGGING)
@$(BUILD_LIB)/helm_require.sh $(HELM_SOURCE_IMAGE_REPO) $(HELM_DESTINATION_REPOSITORY) $(OUTPUT_DIR) $(IMAGE_TAG) $(HELM_TAG) $(PROJECT_ROOT) $(LATEST) $(HELM_USE_UPSTREAM_IMAGE) "$(PACKAGE_DEPENDENCIES)" "$(FORCE_JSON_SCHEMA_FILE)" $(HELM_IMAGE_LIST)

helm/replace: helm/require | $$(ENABLE_LOGGING)
@$(BUILD_LIB)/helm_replace.sh $(HELM_DESTINATION_REPOSITORY) $(OUTPUT_DIR)

helm/build: helm/replace | $$(ENABLE_LOGGING)
@$(BUILD_LIB)/helm_build.sh $(OUTPUT_DIR) $(HELM_DESTINATION_REPOSITORY)

helm/push: helm/build | $$(ENABLE_LOGGING)
@$(BUILD_LIB)/helm_push.sh $(IMAGE_REPO) $(HELM_DESTINATION_REPOSITORY) $(HELM_TAG) $(GIT_TAG) $(OUTPUT_DIR) $(LATEST)

# Build helm chart and push to registry defined in IMAGE_REPO.
.PHONY: helm/push
Expand Down
6 changes: 4 additions & 2 deletions build/lib/helm_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.

set -x
set -o errexit
set -o nounset
set -o pipefail

SCRIPT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"
source "${SCRIPT_ROOT}/common.sh"

OUTPUT_DIR="${1?First arguement is output directory}"
HELM_DESTINATION_REPOSITORY="${2?Second argument is helm destination repository}"
CHART_NAME=$(basename ${HELM_DESTINATION_REPOSITORY})
Expand All @@ -26,4 +28,4 @@ CHART_NAME=$(basename ${HELM_DESTINATION_REPOSITORY})
# Build
#
cd ${OUTPUT_DIR}/helm
helm package "${CHART_NAME}"
build::common::echo_and_run helm package "${CHART_NAME}"
8 changes: 4 additions & 4 deletions build/lib/helm_copy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

set -x

set -o errexit
set -o nounset
set -o pipefail
Expand All @@ -33,6 +33,6 @@ source "${SCRIPT_ROOT}/common.sh"
#
# Copy
#
mkdir -p ${DEST_DIR}
rsync -a --exclude .git "${SOURCE_DIR}" "${DEST_DIR}"
build::non-golang::copy_licenses ${HELM_SOURCE_REPOSITORY} $DEST_DIR/LICENSES/github.com/${HELM_SOURCE_REPOSITORY}
build::common::echo_and_run mkdir -p ${DEST_DIR}
build::common::echo_and_run rsync -a --exclude .git "${SOURCE_DIR}" "${DEST_DIR}"
build::common::echo_and_run build::non-golang::copy_licenses ${HELM_SOURCE_REPOSITORY} $DEST_DIR/LICENSES/github.com/${HELM_SOURCE_REPOSITORY}
24 changes: 16 additions & 8 deletions build/lib/helm_push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

set -x
set -o errexit
set -o nounset
set -o pipefail
Expand Down Expand Up @@ -47,26 +46,35 @@ export HELM_REGISTRY_CONFIG="${DOCKER_CONFIG}/config.json"
export HELM_EXPERIMENTAL_OCI=1
TMPFILE=$(mktemp /tmp/helm-output.XXXXXX)
function cleanup() {
if [[ "${IMAGE_REGISTRY}" == *"public.ecr.aws"* ]]; then
echo "If authentication failed: aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws"
if grep -q "blobs/uploads/\": EOF" $TMPFILE ; then
echo "******************************************************"
echo "Ensure container registry and repository exists!!"
echo "Try running make create-ecr-repos to create ecr repositories in your aws account."
echo "******************************************************"
else
echo "If authentication failed: aws ecr get-login-password --region \${AWS_REGION} | docker login --username AWS --password-stdin ${IMAGE_REGISTRY}"
cat $TMPFILE
if [[ "${IMAGE_REGISTRY}" == *"public.ecr.aws"* ]]; then
echo "If authentication failed: aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws"
else
echo "If authentication failed: aws ecr get-login-password --region \${AWS_REGION} | docker login --username AWS --password-stdin ${IMAGE_REGISTRY}"
fi
fi
rm -f "${TMPFILE}"
}

trap cleanup err
trap "rm -f $TMPFILE" exit
helm push ${CHART_FILE} oci://${IMAGE_REGISTRY}/${HELM_DESTINATION_OWNER} | tee ${TMPFILE}
echo "($(pwd)) \$ helm push ${CHART_FILE} oci://${IMAGE_REGISTRY}/${HELM_DESTINATION_OWNER}"
helm push ${CHART_FILE} oci://${IMAGE_REGISTRY}/${HELM_DESTINATION_OWNER} 2> ${TMPFILE}
DIGEST=$(grep Digest $TMPFILE | $SED -e 's/Digest: //')

# Adds a 2nd tag to the helm chart for the bundle-release jobs.
if [[ "${IMAGE_REGISTRY}" != *"public.ecr.aws"* ]]; then
MANIFEST=$(aws ecr batch-get-image --repository-name "$HELM_DESTINATION_REPOSITORY" --image-ids imageTag=${SEMVER} --query "images[].imageManifest" --output text)
MANIFEST=$(aws ecr batch-get-image --repository-name "$HELM_DESTINATION_REPOSITORY" --image-ids imageDigest=${DIGEST} --query "images[].imageManifest" --output text)
export AWS_PAGER=""
aws ecr put-image --repository-name ${HELM_DESTINATION_REPOSITORY} --image-tag ${SEMVER_GIT_TAG}-${LATEST_TAG}-helm --image-manifest "$MANIFEST" --image-manifest-media-type "application/vnd.oci.image.manifest.v1+json"
build::common::echo_and_run aws ecr put-image --repository-name ${HELM_DESTINATION_REPOSITORY} --image-tag ${SEMVER_GIT_TAG}-${LATEST_TAG}-helm --image-manifest "$MANIFEST" --image-manifest-media-type "application/vnd.oci.image.manifest.v1+json"
fi

DIGEST=$(grep Digest $TMPFILE | $SED -e 's/Digest: //')
{
set +x
echo
Expand Down
5 changes: 2 additions & 3 deletions build/lib/helm_replace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

set -x
set -o errexit
set -o nounset
set -o pipefail
Expand All @@ -36,12 +35,12 @@ TEMPLATE_DIR=helm/templates
SEDFILE=${OUTPUT_DIR}/helm/sedfile
for file in Chart.yaml values.yaml
do
$SED -f ${SEDFILE} -i ${DEST_DIR}/${file}
build::common::echo_and_run $SED -f ${SEDFILE} -i ${DEST_DIR}/${file}
done

if [ -d ${OUTPUT_DIR}/helm/${CHART_NAME}/crds ]; then
for file in crds/*.yaml
do
$SED -f ${SEDFILE} -i ${DEST_DIR}/${file}
build::common::echo_and_run $SED -f ${SEDFILE} -i ${DEST_DIR}/${file}
done
fi
107 changes: 84 additions & 23 deletions build/lib/helm_require.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

set -x
set -e
set -o errexit
set -o nounset
Expand All @@ -27,13 +26,19 @@ HELM_TAG="${5?Fifth argument is helm tag}"
PROJECT_ROOT="${6?Sixth argument is project root}"
LATEST="${7?Seventh argument is latest tag}"
HELM_USE_UPSTREAM_IMAGE="${8?Eigth argument is bool determining whether to use cached upstream images}"
HELM_IMAGE_LIST="${@:9}"
PACKAGE_DEPENDENCIES="${9?Ninth argument is optional project dependencies}"
FORCE_JSON_SCHEMA_FILE="${10?Tenth argument is optional schema file}"
HELM_IMAGE_LIST="${@:11}"

CHART_NAME=$(basename ${HELM_DESTINATION_REPOSITORY})
DEST_DIR=${OUTPUT_DIR}/helm/${CHART_NAME}
SCRIPT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"
PACKAGE_DEPENDENCIES=${PACKAGE_DEPENDENCIES:=""}
FORCE_JSON_SCHEMA_FILE=${FORCE_JSON_SCHEMA_FILE:=""}
source "${SCRIPT_ROOT}/common.sh"

if ! aws sts get-caller-identity &> /dev/null; then
echo "The AWS cli is used to find the ECR registries and repos for the current AWS account please login!"
exit 1;
fi

#
# Image tags
Expand All @@ -52,55 +57,108 @@ JSON_SCHEMA_FILE=$PROJECT_ROOT/helm/schema.json
SEDFILE=${OUTPUT_DIR}/helm/sedfile
export IMAGE_TAG
export HELM_TAG
export HELM_REGISTRY=$(aws ecr-public describe-registries --region us-east-1 --output text --query 'registries[*].registryUri')
export HELM_REGISTRY=$(aws ecr-public describe-registries --region us-east-1 --output text --query 'registries[*].registryUri' 2> /dev/null)
envsubst <$PROJECT_ROOT/helm/sedfile.template >${SEDFILE}
# Semver requires that our version begin with a digit, so strip the v.
echo "s,version: v,version: ,g" >>${SEDFILE}
for IMAGE in ${HELM_IMAGE_LIST:-}
do
if [ "${IMAGE}" == "${HELM_DESTINATION_REPOSITORY}" ] || [ "${IMAGE_TAG}" != "${HELM_TAG}" ]
then

# query ecr for the shasum of the image tagged with ${TAG}
function get_image_shasum() {
local -r image=$1
local -r tag=$2

local image_shasum=
if [ "${HELM_USE_UPSTREAM_IMAGE}" = true ]; then
image_shasum=$(${SCRIPT_ROOT}/image_shasum.sh ${IMAGE_REGISTRY} ${image} ${tag})
elif [ "${JOB_TYPE:-}" = "presubmit" ]; then
image_shasum=${LATEST}
fi

if [[ -z ${image_shasum} ]] && aws --region us-east-1 ecr-public describe-repositories --repository-names ${image} &> /dev/null; then
image_shasum=$(build::common::echo_and_run ${SCRIPT_ROOT}/image_shasum.sh ${HELM_REGISTRY} ${image} ${tag})
fi

if [[ -z ${image_shasum} ]] && aws ecr describe-repositories --repository-names ${image} &> /dev/null; then
image_shasum=$(build::common::echo_and_run ${SCRIPT_ROOT}/image_shasum.sh ${IMAGE_REGISTRY} ${image} ${tag})
fi

if [[ -n ${image_shasum} ]]; then
echo ${image_shasum}
else
echo "${image} does not exist in ECR Public or Private"
exit 1
fi
}

# query ecr for the image by latest tag and find the first non-latest tag the image is also tagged with
function get_image_tag_not_latest() {
local -r image=$1
local -r tag=$2

local use_tag=
if [ "${JOB_TYPE:-}" = "presubmit" ]; then
use_tag=${tag}
fi

if [[ -z ${use_tag} ]] && aws --region us-east-1 ecr-public describe-repositories --repository-names ${image} &> /dev/null; then
use_tag=$(build::common::echo_and_run aws --region us-east-1 ecr-public describe-images --repository-name ${image} --image-ids imageTag=${tag} --query 'imageDetails[0].imageTags' --output yaml 2> /dev/null | grep -v ${tag} | head -1| sed -e 's/- //')
fi

if [[ -z ${use_tag} ]] && aws ecr describe-repositories --repository-names ${image} &> /dev/null; then
use_tag=$(build::common::echo_and_run aws ecr describe-images --repository-name ${image} --image-id imageTag=${tag} --query 'imageDetails[0].imageTags' --output yaml 2> /dev/null | grep -v ${tag} | head -1| sed -e 's/- //')
fi

if [[ -n ${use_tag} ]]; then
echo ${use_tag}
else
echo "${image}@${tag} does not exist in ECR Public or Private"
exit 1
fi
}

for IMAGE in ${HELM_IMAGE_LIST:-}; do
# if its the image(s) built from this project, use the image_tag
# otherwise its an image from a different project so use latest to trigger finding the latest image
if [ "${IMAGE}" = "${HELM_DESTINATION_REPOSITORY}" ] || [ "${IMAGE_TAG}" != "${HELM_TAG}" ]; then
TAG="${IMAGE_TAG}"
else
TAG="${LATEST}"
fi
IMAGE_SHASUM=$(${SCRIPT_ROOT}/image_shasum.sh ${HELM_REGISTRY} ${IMAGE} ${TAG}) ||
IMAGE_SHASUM=$(${SCRIPT_ROOT}/image_shasum.sh ${IMAGE_REGISTRY} ${IMAGE} ${TAG})

IMAGE_SHASUM=$(get_image_shasum ${IMAGE} ${TAG})

echo "s,{{${IMAGE}}},${IMAGE_SHASUM},g" >>${SEDFILE}
if [ "${TAG}" == "latest" ]
then
USE_TAG=$(aws --region us-east-1 ecr-public describe-images --repository-name ${IMAGE} --image-ids imageTag=latest --query 'imageDetails[0].imageTags' --output yaml | grep -v latest | head -1| sed -e 's/- //') ||
USE_TAG=$(aws ecr describe-images --repository-name ${IMAGE} --image-id imageTag=latest --query 'imageDetails[0].imageTags' --output yaml | grep -v latest | head -1| sed -e 's/- //') ||
USE_TAG="latest"
if [ "${TAG}" = "${LATEST}" ]; then
USE_TAG=$(get_image_tag_not_latest ${IMAGE} ${LATEST})
else
USE_TAG=$TAG
fi

# If HELM_USE_UPSTREAM_IMAGE is true, we are using images from upstream.
# Though we pull images directly from upstream for build tooling checks (i.e.
# get images shasums), we will use cached images in the helm charts. Cached
# images follow the convention of ${PROJECT_NAME}/${UPSTREAM_IMAGE_NAME}.
if [ "${HELM_USE_UPSTREAM_IMAGE}" == true ]
then
if [ "${HELM_USE_UPSTREAM_IMAGE}" == true ]; then
PROJECT_NAME=$(echo "$HELM_DESTINATION_REPOSITORY" | awk -F "/" '{print $1}')
IMAGE_REPO="${PROJECT_NAME}/${IMAGE}"
else
IMAGE_REPO="${IMAGE}"
fi

cat >>${REQUIRES_FILE} <<!
- repository: ${IMAGE_REPO}
tag: ${USE_TAG}
digest: ${IMAGE_SHASUM}
!
done

if [ -n "${FORCE_JSON_SCHEMA_FILE}" ]
then
if [ -n "${FORCE_JSON_SCHEMA_FILE}" ]; then
JSON_SCHEMA_FILE=${FORCE_JSON_SCHEMA_FILE}
fi

if [ -f ${JSON_SCHEMA_FILE} ]
then
JSON_SCHEMA=$(cat ${JSON_SCHEMA_FILE} | gzip | base64 | tr -d '\n')
if [ -f ${JSON_SCHEMA_FILE} ]; then
echo "Using schema file: ${JSON_SCHEMA_FILE}"
JSON_SCHEMA=$(cat ${JSON_SCHEMA_FILE} | gzip -n | base64 | tr -d '\n')
cat >>${REQUIRES_FILE} <<!
schema: ${JSON_SCHEMA}
!
Expand All @@ -112,3 +170,6 @@ if [ -n "${PACKAGE_DEPENDENCIES}" ]; then
echo " - ${dep}"
done >> ${REQUIRES_FILE}
fi

build::common::echo_and_run cat ${SEDFILE}
build::common::echo_and_run cat ${REQUIRES_FILE}
20 changes: 12 additions & 8 deletions build/lib/image_shasum.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,26 @@
# See the License for the specific language governing permissions and
# limitations under the License.

set -x
set -o errexit
set -o nounset
set -o pipefail

SCRIPT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"
source "${SCRIPT_ROOT}/common.sh"

REGISTRY="${1?First argument is registry}"
REPOSITORY="${2?Second argument is repository}"
IMAGE_TAG="${3?Third argument is image tag}"

if [ "${JOB_TYPE:-}" == "presubmit" ]
then
echo latest
exit 0
fi
TMPFILE=$(mktemp)
trap "rm -f $TMPFILE" exit
TARGET=${REGISTRY}/${REPOSITORY}:${IMAGE_TAG}
skopeo inspect -n --raw docker://${TARGET} >${TMPFILE}
skopeo manifest-digest ${TMPFILE}

>&2 echo -n "Checking for the existence of ${TARGET}..."
if skopeo inspect -n --raw docker://${TARGET} >${TMPFILE} 2>/dev/null; then
>&2 echo "Found!"
skopeo manifest-digest ${TMPFILE}
else
>&2 echo "Not Found!"
fi

8 changes: 4 additions & 4 deletions projects/aws/eks-anywhere-packages/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,23 +58,23 @@ helm/build: $(if $(filter true,$(REPO_NO_CLONE)),,$(HELM_GIT_CHECKOUT_TARGET))
helm/build: $(if $(wildcard $(PROJECT_ROOT)/helm/patches),$(HELM_GIT_PATCH_TARGET),)
# Pkg controller requires multiple charts. Consider this a temporary work-around (turned too permanent).
$(BUILD_LIB)/helm_copy.sh $(HELM_SOURCE_REPOSITORY) eks-anywhere-packages-migrations charts/eks-anywhere-packages-migrations $(OUTPUT_DIR)
$(BUILD_LIB)/helm_require.sh $(HELM_SOURCE_IMAGE_REPO) eks-anywhere-packages-migrations $(OUTPUT_DIR) $(IMAGE_TAG) $(HELM_TAG) $(PROJECT_ROOT) $(LATEST) $(HELM_USE_UPSTREAM_IMAGE) $(HELM_IMAGE_LIST)
$(BUILD_LIB)/helm_require.sh $(HELM_SOURCE_IMAGE_REPO) eks-anywhere-packages-migrations $(OUTPUT_DIR) $(IMAGE_TAG) $(HELM_TAG) $(PROJECT_ROOT) $(LATEST) $(HELM_USE_UPSTREAM_IMAGE) "$(PACKAGE_DEPENDENCIES)" "$(FORCE_JSON_SCHEMA_FILE)" $(HELM_IMAGE_LIST)
$(BUILD_LIB)/helm_replace.sh eks-anywhere-packages-migrations $(OUTPUT_DIR)
$(BUILD_LIB)/helm_build.sh $(OUTPUT_DIR) eks-anywhere-packages-migrations

$(BUILD_LIB)/helm_copy.sh $(HELM_SOURCE_REPOSITORY) eks-anywhere-packages-crds charts/eks-anywhere-packages-crds $(OUTPUT_DIR)
PACKAGE_DEPENDENCIES=eks-anywhere-packages-migrations $(BUILD_LIB)/helm_require.sh $(HELM_SOURCE_IMAGE_REPO) eks-anywhere-packages-crds $(OUTPUT_DIR) $(IMAGE_TAG) $(HELM_TAG) $(PROJECT_ROOT) $(LATEST) $(HELM_USE_UPSTREAM_IMAGE) $(HELM_IMAGE_LIST)
$(BUILD_LIB)/helm_require.sh $(HELM_SOURCE_IMAGE_REPO) eks-anywhere-packages-crds $(OUTPUT_DIR) $(IMAGE_TAG) $(HELM_TAG) $(PROJECT_ROOT) $(LATEST) $(HELM_USE_UPSTREAM_IMAGE) eks-anywhere-packages-migrations "$(FORCE_JSON_SCHEMA_FILE)" $(HELM_IMAGE_LIST)
$(BUILD_LIB)/helm_replace.sh eks-anywhere-packages-crds $(OUTPUT_DIR)
$(BUILD_LIB)/helm_build.sh $(OUTPUT_DIR) eks-anywhere-packages-crds

$(BUILD_LIB)/helm_copy.sh $(HELM_SOURCE_REPOSITORY) $(HELM_DESTINATION_REPOSITORY) $(HELM_DIRECTORY) $(OUTPUT_DIR)
PACKAGE_DEPENDENCIES=eks-anywhere-packages-crds $(BUILD_LIB)/helm_require.sh $(HELM_SOURCE_IMAGE_REPO) $(HELM_DESTINATION_REPOSITORY) $(OUTPUT_DIR) $(IMAGE_TAG) $(HELM_TAG) $(PROJECT_ROOT) $(LATEST) $(HELM_USE_UPSTREAM_IMAGE) $(HELM_IMAGE_LIST)
$(BUILD_LIB)/helm_require.sh $(HELM_SOURCE_IMAGE_REPO) $(HELM_DESTINATION_REPOSITORY) $(OUTPUT_DIR) $(IMAGE_TAG) $(HELM_TAG) $(PROJECT_ROOT) $(LATEST) $(HELM_USE_UPSTREAM_IMAGE) "eks-anywhere-packages-crds" "$(FORCE_JSON_SCHEMA_FILE)" $(HELM_IMAGE_LIST)
$(BUILD_LIB)/helm_replace.sh $(HELM_DESTINATION_REPOSITORY) $(OUTPUT_DIR)
$(BUILD_LIB)/helm_build.sh $(OUTPUT_DIR) $(HELM_DESTINATION_REPOSITORY)

# Credential Provider Package lives in pkg controller repo. Workaround for its sepearate chart
$(BUILD_LIB)/helm_copy.sh $(HELM_SOURCE_REPOSITORY) credential-provider-package credentialproviderpackage/charts/credential-provider-package $(OUTPUT_DIR)
FORCE_JSON_SCHEMA_FILE=$(PROJECT_ROOT)/helm/credential-provider-package.schema.json $(BUILD_LIB)/helm_require.sh $(HELM_SOURCE_IMAGE_REPO) credential-provider-package $(OUTPUT_DIR) $(IMAGE_TAG) $(HELM_TAG) $(PROJECT_ROOT) $(LATEST) $(HELM_USE_UPSTREAM_IMAGE) $(CRED_HELM_IMAGE_LIST)
$(BUILD_LIB)/helm_require.sh $(HELM_SOURCE_IMAGE_REPO) credential-provider-package $(OUTPUT_DIR) $(IMAGE_TAG) $(HELM_TAG) $(PROJECT_ROOT) $(LATEST) $(HELM_USE_UPSTREAM_IMAGE) "$(PACKAGE_DEPENDENCIES)" "$(PROJECT_ROOT)/helm/credential-provider-package.schema.json" $(CRED_HELM_IMAGE_LIST)
$(BUILD_LIB)/helm_replace.sh credential-provider-package $(OUTPUT_DIR)
$(BUILD_LIB)/helm_build.sh $(OUTPUT_DIR) credential-provider-package

Expand Down
Loading

0 comments on commit 17f6c16

Please sign in to comment.