1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-19 05:19:39 +02:00

refactor(helm): helm binary to sdk refactor [r8s-229] (#463)

Co-authored-by: stevensbkang <skan070@gmail.com>
This commit is contained in:
Ali 2025-03-13 12:20:16 +13:00 committed by GitHub
parent 0d25f3f430
commit b5961d79f8
56 changed files with 2222 additions and 819 deletions

View file

@ -23,7 +23,6 @@ GIT_COMMIT_HASH=${GIT_COMMIT_HASH:-$(git rev-parse --short HEAD)}
# populate dependencies versions
DOCKER_VERSION=$(jq -r '.docker' < "${BINARY_VERSION_FILE}")
HELM_VERSION=$(jq -r '.helm' < "${BINARY_VERSION_FILE}")
KUBECTL_VERSION=$(jq -r '.kubectl' < "${BINARY_VERSION_FILE}")
COMPOSE_VERSION=$(go list -m -f '{{.Version}}' github.com/docker/compose/v2)
@ -52,7 +51,6 @@ ldflags="-s -X 'github.com/portainer/liblicense.LicenseServerBaseURL=https://api
-X 'github.com/portainer/portainer/pkg/build.GoVersion=${GO_VERSION}' \
-X 'github.com/portainer/portainer/pkg/build.DepComposeVersion=${COMPOSE_VERSION}' \
-X 'github.com/portainer/portainer/pkg/build.DepDockerVersion=${DOCKER_VERSION}' \
-X 'github.com/portainer/portainer/pkg/build.DepHelmVersion=${HELM_VERSION}' \
-X 'github.com/portainer/portainer/pkg/build.DepKubectlVersion=${KUBECTL_VERSION}'"
echo "$ldflags"

View file

@ -17,12 +17,10 @@ echo "Checking and downloading binaries for docker ${dockerVersion}, helm ${helm
# Determine the binary file names based on the platform
dockerBinary="dist/docker"
helmBinary="dist/helm"
kubectlBinary="dist/kubectl"
if [ "$PLATFORM" == "windows" ]; then
dockerBinary="dist/docker.exe"
helmBinary="dist/helm.exe"
kubectlBinary="dist/kubectl.exe"
fi
@ -34,14 +32,6 @@ else
echo "Docker binary already exists, skipping download."
fi
# Check and download helm binary
if [ ! -f "$helmBinary" ]; then
echo "Downloading helm binary..."
/usr/bin/env bash ./build/download_helm_binary.sh "$PLATFORM" "$ARCH" "$helmVersion"
else
echo "Helm binary already exists, skipping download."
fi
# Check and download kubectl binary
if [ ! -f "$kubectlBinary" ]; then
echo "Downloading kubectl binary..."

View file

@ -1,21 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
if [[ $# -ne 3 ]]; then
echo "Illegal number of parameters" >&2
exit 1
fi
PLATFORM=$1
ARCH=$2
HELM_VERSION=$3
HELM_DIST="helm-$HELM_VERSION-$PLATFORM-$ARCH"
if [[ ${PLATFORM} == "windows" ]]; then
wget --tries=3 --waitretry=30 --quiet -O tmp.zip "https://get.helm.sh/${HELM_DIST}.zip" && unzip -o -j tmp.zip "${PLATFORM}-${ARCH}/helm.exe" -d dist && rm -f tmp.zip
else
wget -qO- "https://get.helm.sh/${HELM_DIST}.tar.gz" | tar -x -z --strip-components 1 "${PLATFORM}-${ARCH}/helm"
mv "helm" "dist/helm"
chmod +x "dist/helm"
fi

View file

@ -11,7 +11,6 @@ LABEL org.opencontainers.image.title="Portainer" \
com.docker.extension.additional-urls="[{\"title\":\"Website\",\"url\":\"https://www.portainer.io?utm_campaign=DockerCon&utm_source=DockerDesktop\"},{\"title\":\"Documentation\",\"url\":\"https://docs.portainer.io\"},{\"title\":\"Support\",\"url\":\"https://join.slack.com/t/portainer/shared_invite/zt-txh3ljab-52QHTyjCqbe5RibC2lcjKA\"}]"
COPY dist/docker /
COPY dist/helm /
COPY dist/kubectl /
COPY dist/mustache-templates /mustache-templates/
COPY dist/portainer /

View file

@ -11,7 +11,6 @@ LABEL org.opencontainers.image.title="Portainer" \
com.docker.extension.additional-urls="[{\"title\":\"Website\",\"url\":\"https://www.portainer.io?utm_campaign=DockerCon&utm_source=DockerDesktop\"},{\"title\":\"Documentation\",\"url\":\"https://docs.portainer.io\"},{\"title\":\"Support\",\"url\":\"https://join.slack.com/t/portainer/shared_invite/zt-txh3ljab-52QHTyjCqbe5RibC2lcjKA\"}]"
COPY dist/docker /
COPY dist/helm /
COPY dist/kubectl /
COPY dist/mustache-templates /mustache-templates/
COPY dist/portainer /

View file

@ -10,7 +10,6 @@ USER ContainerAdministrator
COPY dist/mingit/ mingit/
COPY dist/docker.exe /
COPY dist/helm.exe /
COPY dist/kubectl.exe /
COPY dist/mustache-templates /mustache-templates/
COPY dist/portainer.exe /