mirror of
https://github.com/portainer/portainer.git
synced 2025-08-06 14:25:31 +02:00
refactor: replace the kubectl
binary with the upstream sdk (#524)
This commit is contained in:
parent
4d4360b86b
commit
bc29419c17
17 changed files with 354 additions and 182 deletions
|
@ -7,21 +7,17 @@ ARCH=${2:-"amd64"}
|
|||
BINARY_VERSION_FILE="./binary-version.json"
|
||||
|
||||
dockerVersion=$(jq -r '.docker' < "${BINARY_VERSION_FILE}")
|
||||
helmVersion=$(jq -r '.helm' < "${BINARY_VERSION_FILE}")
|
||||
kubectlVersion=$(jq -r '.kubectl' < "${BINARY_VERSION_FILE}")
|
||||
mingitVersion=$(jq -r '.mingit' < "${BINARY_VERSION_FILE}")
|
||||
|
||||
mkdir -p dist
|
||||
|
||||
echo "Checking and downloading binaries for docker ${dockerVersion}, helm ${helmVersion}, kubectl ${kubectlVersion} and mingit ${mingitVersion} (Windows only)"
|
||||
echo "Checking and downloading binaries for docker ${dockerVersion}, and mingit ${mingitVersion} (Windows only)"
|
||||
|
||||
# Determine the binary file names based on the platform
|
||||
dockerBinary="dist/docker"
|
||||
kubectlBinary="dist/kubectl"
|
||||
|
||||
if [ "$PLATFORM" == "windows" ]; then
|
||||
dockerBinary="dist/docker.exe"
|
||||
kubectlBinary="dist/kubectl.exe"
|
||||
fi
|
||||
|
||||
# Check and download docker binary
|
||||
|
@ -32,14 +28,6 @@ else
|
|||
echo "Docker binary already exists, skipping download."
|
||||
fi
|
||||
|
||||
# Check and download kubectl binary
|
||||
if [ ! -f "$kubectlBinary" ]; then
|
||||
echo "Downloading kubectl binary..."
|
||||
/usr/bin/env bash ./build/download_kubectl_binary.sh "$PLATFORM" "$ARCH" "$kubectlVersion"
|
||||
else
|
||||
echo "Kubectl binary already exists, skipping download."
|
||||
fi
|
||||
|
||||
# Check and download mingit binary only for Windows
|
||||
if [ "$PLATFORM" == "windows" ]; then
|
||||
if [ ! -f "dist/mingit" ]; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue