diff --git a/src/usr/local/buildpack/tools/flux.sh b/src/usr/local/buildpack/tools/flux.sh new file mode 100644 index 000000000..fc8949141 --- /dev/null +++ b/src/usr/local/buildpack/tools/flux.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +tool_path=$(find_tool_path) +if [[ -z "${tool_path}" ]]; then + INSTALL_DIR=$(get_install_dir) + base_path=${INSTALL_DIR}/${TOOL_NAME} + tool_path=${base_path}/${TOOL_VERSION} + mkdir -p ${tool_path} + + ARCH=amd64 + BIN_URL="https://github.com/fluxcd/flux2/releases/download/v${TOOL_VERSION}/flux_${TOOL_VERSION}_linux_${ARCH}.tar.gz" + curl -sL ${BIN_URL} -o /tmp/flux.tar.gz + tar -C ${tool_path} -zxvf /tmp/flux.tar.gz +fi + +link_wrapper ${TOOL_NAME} ${tool_path} + +flux -v diff --git a/test/Dockerfile.bionic b/test/Dockerfile.bionic index 10e0c0a44..581e23801 100644 --- a/test/Dockerfile.bionic +++ b/test/Dockerfile.bionic @@ -36,6 +36,9 @@ RUN install-tool erlang 22.3.2 # renovate: datasource=docker versioning=docker RUN install-tool elixir 1.13.2 +# renovate: datasource=github-releases lookupName=fluxcd/flux2 +RUN install-tool flux v0.25.3 + # renovate: datasource=docker versioning=docker RUN install-tool golang 1.17.6 diff --git a/test/latest/Dockerfile b/test/latest/Dockerfile index e185abf95..ba623355f 100644 --- a/test/latest/Dockerfile +++ b/test/latest/Dockerfile @@ -166,6 +166,9 @@ ARG APT_HTTP_PROXY ARG IGNORED_TOOLS=powershell,node +# renovate: datasource=github-releases lookupName=fluxcd/flux2 +RUN install-tool flux v0.25.3 + # renovate: datasource=github-releases lookupName=git-lfs/git-lfs RUN install-tool git-lfs v3.0.2