Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove target h #2355

Merged
merged 5 commits into from
Jan 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions tools/hadolint/Dockerfile.template
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
#syntax=docker/dockerfile:1.6.0

ARG ref=main

FROM ghcr.io/uniget-org/tools/base:${ref} AS prepare
FROM nicholasdille/ubuntu:22.04 AS prepare
COPY --from=ghcr.io/uniget-org/tools/uniget-build:latest \
/etc/profile.d/ \
/etc/profile.d/
SHELL [ "bash", "-clo", "errexit" ]
ARG name
ARG version
RUN <<EOF
check-github-release-asset "hadolint/hadolint" "v${version}" "hadolint-Linux-${arch}"
curl --silent --location --fail --output "${prefix}${target}/bin/hadolint" \
curl --silent --location --fail --output "${prefix}/bin/hadolint" \
"https://github.com/hadolint/hadolint/releases/download/v${version}/hadolint-Linux-${arch}"
chmod +x "${prefix}${target}/bin/hadolint"
chmod +x "${prefix}/bin/hadolint"
EOF
12 changes: 7 additions & 5 deletions tools/has/Dockerfile.template
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#syntax=docker/dockerfile:1.6.0

ARG ref=main

FROM ghcr.io/uniget-org/tools/base:${ref} AS prepare
FROM nicholasdille/ubuntu:22.04 AS prepare
COPY --from=ghcr.io/uniget-org/tools/uniget-build:latest \
/etc/profile.d/ \
/etc/profile.d/
SHELL [ "bash", "-clo", "errexit" ]
ARG name
ARG version
RUN <<EOF
curl --silent --location --fail --output "${prefix}${target}/bin/has" \
curl --silent --location --fail --output "${prefix}/bin/has" \
"https://github.com/kdabir/has/raw/v${version}/has"
chmod +x "${prefix}${target}/bin/has"
chmod +x "${prefix}/bin/has"
EOF
16 changes: 9 additions & 7 deletions tools/havener/Dockerfile.template
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
#syntax=docker/dockerfile:1.6.0

ARG ref=main

FROM ghcr.io/uniget-org/tools/base:${ref} AS prepare
FROM nicholasdille/ubuntu:22.04 AS prepare
COPY --from=ghcr.io/uniget-org/tools/uniget-build:latest \
/etc/profile.d/ \
/etc/profile.d/
SHELL [ "bash", "-clo", "errexit" ]
ARG name
ARG version
RUN <<EOF
check-github-release-asset "homeport/havener" "v${version}" "havener_${version}_linux_${alt_arch}.tar.gz"
curl --silent --location --fail "https://github.com/homeport/havener/releases/download/v${version}/havener_${version}_linux_${alt_arch}.tar.gz" \
| tar --extract --gzip --directory="${prefix}${target}/bin" --no-same-owner \
| tar --extract --gzip --directory="${prefix}/bin" --no-same-owner \
havener
"${prefix}${target}/bin/havener" completion bash >"${prefix}${target}/share/bash-completion/completions/havener"
"${prefix}${target}/bin/havener" completion fish >"${prefix}${target}/share/fish/vendor_completions.d/havener.fish"
"${prefix}${target}/bin/havener" completion zsh >"${prefix}${target}/share/zsh/vendor-completions/_havener"
"${prefix}/bin/havener" completion bash >"${prefix}/share/bash-completion/completions/havener"
"${prefix}/bin/havener" completion fish >"${prefix}/share/fish/vendor_completions.d/havener.fish"
"${prefix}/bin/havener" completion zsh >"${prefix}/share/zsh/vendor-completions/_havener"
EOF
16 changes: 9 additions & 7 deletions tools/hcloud/Dockerfile.template
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
#syntax=docker/dockerfile:1.6.0

ARG ref=main

FROM ghcr.io/uniget-org/tools/base:${ref} AS prepare
FROM nicholasdille/ubuntu:22.04 AS prepare
COPY --from=ghcr.io/uniget-org/tools/uniget-build:latest \
/etc/profile.d/ \
/etc/profile.d/
SHELL [ "bash", "-clo", "errexit" ]
ARG name
ARG version
RUN <<EOF
check-github-release-asset "hetznercloud/cli" "v${version}" "hcloud-linux-${alt_arch}.tar.gz"
curl --silent --location --fail "https://github.com/hetznercloud/cli/releases/download/v${version}/hcloud-linux-${alt_arch}.tar.gz" \
| tar --extract --gzip --directory="${prefix}${target}/bin" --no-same-owner \
| tar --extract --gzip --directory="${prefix}/bin" --no-same-owner \
hcloud
"${prefix}${target}/bin/hcloud" completion bash >"${prefix}${target}/share/bash-completion/completions/hcloud"
"${prefix}${target}/bin/hcloud" completion fish >"${prefix}${target}/share/fish/vendor_completions.d/hcloud.fish"
"${prefix}${target}/bin/hcloud" completion zsh >"${prefix}${target}/share/zsh/vendor-completions/_hcloud"
"${prefix}/bin/hcloud" completion bash >"${prefix}/share/bash-completion/completions/hcloud"
"${prefix}/bin/hcloud" completion fish >"${prefix}/share/fish/vendor_completions.d/hcloud.fish"
"${prefix}/bin/hcloud" completion zsh >"${prefix}/share/zsh/vendor-completions/_hcloud"
EOF
26 changes: 14 additions & 12 deletions tools/helm-plugins/Dockerfile.template
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
#syntax=docker/dockerfile:1.6.0

ARG ref=main
FROM ghcr.io/uniget-org/tools/helm:latest AS helm

FROM ghcr.io/uniget-org/tools/helm:${ref} AS helm

FROM ghcr.io/uniget-org/tools/base:${ref} AS prepare
FROM nicholasdille/ubuntu:22.04 AS prepare
COPY --from=ghcr.io/uniget-org/tools/uniget-build:latest \
/etc/profile.d/ \
/etc/profile.d/
SHELL [ "bash", "-clo", "errexit" ]
ARG name
ARG version
COPY --link --from=helm / /
RUN <<EOF
echo "export HELM_PLUGINS=${target}/share/helm/plugins" >"${prefix}${target}/etc/profile.d/helm-plugins.sh"
echo "export HELM_PLUGINS=/share/helm/plugins" >"${prefix}/etc/profile.d/helm-plugins.sh"

export HELM_PLUGINS=${prefix}${target}/share/helm/plugins
export HELM_PLUGINS=${prefix}/share/helm/plugins

plugins=(
https://github.com/mstrzele/helm-edit
Expand Down Expand Up @@ -50,11 +52,11 @@ for url in "${plugins[@]}"; do
"${HELM_PLUGINS}/${name}/*.md"
done

helm diff completion bash >"${prefix}${target}/share/bash-completion/completions/helm-diff"
helm diff completion fish >"${prefix}${target}/share/fish/vendor_completions.d/helm-diff.fish"
helm diff completion zsh >"${prefix}${target}/share/zsh/vendor-completions/_helm-diff"
helm diff completion bash >"${prefix}/share/bash-completion/completions/helm-diff"
helm diff completion fish >"${prefix}/share/fish/vendor_completions.d/helm-diff.fish"
helm diff completion zsh >"${prefix}/share/zsh/vendor-completions/_helm-diff"

helm sigstore completion bash >"${prefix}${target}/share/bash-completion/completions/helm-sigstore"
helm sigstore completion fish >"${prefix}${target}/share/fish/vendor_completions.d/helm-sigstore.fish"
helm sigstore completion zsh >"${prefix}${target}/share/zsh/vendor-completions/_helm-sigstore"
helm sigstore completion bash >"${prefix}/share/bash-completion/completions/helm-sigstore"
helm sigstore completion fish >"${prefix}/share/fish/vendor_completions.d/helm-sigstore.fish"
helm sigstore completion zsh >"${prefix}/share/zsh/vendor-completions/_helm-sigstore"
EOF
16 changes: 9 additions & 7 deletions tools/helm/Dockerfile.template
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
#syntax=docker/dockerfile:1.6.0

ARG ref=main

FROM ghcr.io/uniget-org/tools/base:${ref} AS prepare
FROM nicholasdille/ubuntu:22.04 AS prepare
COPY --from=ghcr.io/uniget-org/tools/uniget-build:latest \
/etc/profile.d/ \
/etc/profile.d/
SHELL [ "bash", "-clo", "errexit" ]
ARG name
ARG version
RUN <<EOF
curl --silent --location --fail "https://get.helm.sh/helm-v${version}-linux-${alt_arch}.tar.gz" \
| tar --extract --gzip --directory="${prefix}${target}/bin" --strip-components=1 --no-same-owner \
| tar --extract --gzip --directory="${prefix}/bin" --strip-components=1 --no-same-owner \
linux-${alt_arch}/helm
"${prefix}${target}/bin/helm" completion bash >"${prefix}${target}/share/bash-completion/completions/helm"
"${prefix}${target}/bin/helm" completion fish >"${prefix}${target}/share/fish/vendor_completions.d/helm.fish"
"${prefix}${target}/bin/helm" completion zsh >"${prefix}${target}/share/zsh/vendor-completions/_helm"
"${prefix}/bin/helm" completion bash >"${prefix}/share/bash-completion/completions/helm"
"${prefix}/bin/helm" completion fish >"${prefix}/share/fish/vendor_completions.d/helm.fish"
"${prefix}/bin/helm" completion zsh >"${prefix}/share/zsh/vendor-completions/_helm"
EOF
15 changes: 9 additions & 6 deletions tools/helmfile/Dockerfile.template
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
#syntax=docker/dockerfile:1.6.0

ARG ref=main
FROM ghcr.io/uniget-org/tools/base:${ref} AS prepare
FROM nicholasdille/ubuntu:22.04 AS prepare
COPY --from=ghcr.io/uniget-org/tools/uniget-build:latest \
/etc/profile.d/ \
/etc/profile.d/
SHELL [ "bash", "-clo", "errexit" ]

ARG name
ARG version

RUN <<EOF
check-github-release-asset "roboll/helmfile" "v${version}" "helmfile_linux_${alt_arch}"
curl --silent --location --fail --output "${prefix}${target}/bin/helmfile" \
curl --silent --location --fail --output "${prefix}/bin/helmfile" \
"https://github.com/roboll/helmfile/releases/download/v${version}/helmfile_linux_${alt_arch}"
chmod +x "${prefix}${target}/bin/helmfile"
curl --silent --location --fail --output "${prefix}${target}/share/bash-completion/completions/helmfile" \
chmod +x "${prefix}/bin/helmfile"
curl --silent --location --fail --output "${prefix}/share/bash-completion/completions/helmfile" \
"https://github.com/roboll/helmfile/raw/v${version}/autocomplete/helmfile_bash_autocomplete"
curl --silent --location --fail --output "${prefix}${target}/share/zsh/vendor-completions/_helmfile" \
curl --silent --location --fail --output "${prefix}/share/zsh/vendor-completions/_helmfile" \
"https://github.com/roboll/helmfile/raw/v${version}/autocomplete/helmfile_zsh_autocomplete"
EOF
10 changes: 6 additions & 4 deletions tools/helmify/Dockerfile.template
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#syntax=docker/dockerfile:1.6.0

ARG ref=main

FROM ghcr.io/uniget-org/tools/base:${ref} AS prepare
FROM nicholasdille/ubuntu:22.04 AS prepare
COPY --from=ghcr.io/uniget-org/tools/uniget-build:latest \
/etc/profile.d/ \
/etc/profile.d/
SHELL [ "bash", "-clo", "errexit" ]
ARG name
ARG version
RUN <<EOF
Expand All @@ -25,5 +27,5 @@ check-github-release-asset "arttor/helmify" "v${version}" "helmify_Linux_${arch_

echo "### Downloading helmify ${version}"
curl --silent --location --fail "https://github.com/arttor/helmify/releases/download/v${version}/helmify_Linux_${arch_suffix}.tar.gz" \
| tar --extract --gzip --directory="${prefix}${target}/bin" --no-same-owner
| tar --extract --gzip --directory="${prefix}/bin" --no-same-owner
EOF
18 changes: 10 additions & 8 deletions tools/hetzner-k3s/Dockerfile.template
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
#syntax=docker/dockerfile:1.6.0

ARG ref=main

FROM ghcr.io/uniget-org/tools/base:${ref} AS prepare
FROM nicholasdille/ubuntu:22.04 AS prepare
COPY --from=ghcr.io/uniget-org/tools/uniget-build:latest \
/etc/profile.d/ \
/etc/profile.d/
SHELL [ "bash", "-clo", "errexit" ]
ARG name
ARG version
RUN <<EOF
check-github-release-asset "vitobotta/hetzner-k3s" "v${version}" "hetzner-k3s-linux-${alt_arch}"
curl --silent --location --fail --output "${prefix}${target}/bin/hetzner-k3s" \
curl --silent --location --fail --output "${prefix}/bin/hetzner-k3s" \
"https://github.com/vitobotta/hetzner-k3s/releases/download/v${version}/hetzner-k3s-linux-${alt_arch}"
chmod +x "${prefix}${target}/bin/hetzner-k3s"
chmod +x "${prefix}/bin/hetzner-k3s"
EOF

# completion
#RUN <<EOF
#"${prefix}${target}/bin/foo" completion bash >"${prefix}${target}/share/bash-completion/completions/foo"
#"${prefix}${target}/bin/foo" completion fish >"${prefix}${target}/share/fish/vendor_completions.d/foo.fish"
#"${prefix}${target}/bin/foo" completion zsh >"${prefix}${target}/share/zsh/vendor-completions/_foo"
#"${prefix}/bin/foo" completion bash >"${prefix}/share/bash-completion/completions/foo"
#"${prefix}/bin/foo" completion fish >"${prefix}/share/fish/vendor_completions.d/foo.fish"
#"${prefix}/bin/foo" completion zsh >"${prefix}/share/zsh/vendor-completions/_foo"
#EOF
12 changes: 7 additions & 5 deletions tools/hexyl/Dockerfile.template
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#syntax=docker/dockerfile:1.6.0

ARG ref=main

FROM ghcr.io/uniget-org/tools/base:${ref} AS prepare
FROM nicholasdille/ubuntu:22.04 AS prepare
COPY --from=ghcr.io/uniget-org/tools/uniget-build:latest \
/etc/profile.d/ \
/etc/profile.d/
SHELL [ "bash", "-clo", "errexit" ]
ARG name
ARG version
RUN <<EOF
Expand All @@ -23,9 +25,9 @@ check-github-release-asset "sharkdp/hexyl" "v${version}" "hexyl-v${version}-${ar

echo "### Downloading hexyl ${version}"
curl --silent --location --fail "https://github.com/sharkdp/hexyl/releases/download/v${version}/hexyl-v${version}-${arch}-unknown-linux-${suffix}.tar.gz" \
| tar --extract --gzip --directory="${prefix}${target}/bin/" --strip-components=1 --no-same-owner \
| tar --extract --gzip --directory="${prefix}/bin/" --strip-components=1 --no-same-owner \
"hexyl-v${version}-${arch}-unknown-linux-${suffix}/hexyl" \
"hexyl-v${version}-${arch}-unknown-linux-${suffix}/hexyl.1"

mv "${prefix}${target}/bin/hexyl.1" "${prefix}${target}/share/man/man1/"
mv "${prefix}/bin/hexyl.1" "${prefix}/share/man/man1/"
EOF
12 changes: 7 additions & 5 deletions tools/htmx/Dockerfile.template
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
#syntax=docker/dockerfile:1.6.0

ARG ref=main

FROM ghcr.io/uniget-org/tools/base:${ref} AS prepare
FROM nicholasdille/ubuntu:22.04 AS prepare
COPY --from=ghcr.io/uniget-org/tools/uniget-build:latest \
/etc/profile.d/ \
/etc/profile.d/
SHELL [ "bash", "-clo", "errexit" ]
ARG name
ARG version
RUN <<EOF
check-download "https://github.com/bigskysoftware/htmx/blob/v${version}/dist/htmx.min.js"
mkdir -p "${prefix}${target}/share/htmx"
curl --silent --location --fail --output "${prefix}${target}/share/htmx/htmx.min.js" \
mkdir -p "${prefix}/share/htmx"
curl --silent --location --fail --output "${prefix}/share/htmx/htmx.min.js" \
"https://github.com/bigskysoftware/htmx/blob/v${version}/dist/htmx.min.js"
EOF
20 changes: 11 additions & 9 deletions tools/httpie/Dockerfile.template
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
#syntax=docker/dockerfile:1.6.0

ARG ref=main
#FROM ghcr.io/uniget-org/tools/python:latest AS python
FROM ghcr.io/uniget-org/tools/shiv:latest AS shiv

#FROM ghcr.io/uniget-org/tools/python:${ref} AS python
FROM ghcr.io/uniget-org/tools/shiv:${ref} AS shiv

FROM ghcr.io/uniget-org/tools/base:${ref} AS prepare
FROM nicholasdille/ubuntu:22.04 AS prepare
COPY --from=ghcr.io/uniget-org/tools/uniget-build:latest \
/etc/profile.d/ \
/etc/profile.d/
SHELL [ "bash", "-clo", "errexit" ]
#COPY --link --from=python / /usr/local/
COPY --link --from=shiv / /
COPY --link --from=shiv / /usr/local/
RUN <<EOF
apt-get update
apt-get -y install --no-install-recommends \
Expand All @@ -18,10 +20,10 @@ EOF
ARG name
ARG version
RUN <<EOF
shiv --output-file "${prefix}${target}/bin/http" --console-script http "httpie==${version}"
shiv --output-file "${prefix}/bin/http" --console-script http "httpie==${version}"

curl --silent --location --fail --output "${prefix}${target}/share/bash-completion/completions/http" \
curl --silent --location --fail --output "${prefix}/share/bash-completion/completions/http" \
"https://github.com/httpie/cli/raw/${version}/extras/httpie-completion.bash"
curl --silent --location --fail --output "${prefix}${target}/share/fish/vendor_completions.d/http.fish" \
curl --silent --location --fail --output "${prefix}/share/fish/vendor_completions.d/http.fish" \
"https://github.com/httpie/cli/raw/${version}/extras/httpie-completion.fish"
EOF
10 changes: 6 additions & 4 deletions tools/httpx/Dockerfile.template
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
#syntax=docker/dockerfile:1.6.0

ARG ref=main

FROM ghcr.io/uniget-org/tools/base:${ref} AS prepare
FROM nicholasdille/ubuntu:22.04 AS prepare
COPY --from=ghcr.io/uniget-org/tools/uniget-build:latest \
/etc/profile.d/ \
/etc/profile.d/
SHELL [ "bash", "-clo", "errexit" ]
ARG name
ARG version
RUN <<EOF
check-github-release-asset "projectdiscovery/httpx" "v${version}" "httpx_${version}_linux_${alt_arch}.zip"
url="https://github.com/projectdiscovery/httpx/releases/download/v${version}/httpx_${version}_linux_${alt_arch}.zip"
filename="$(basename "${url}")"
curl --silent --location --fail --remote-name "${url}"
unzip -q -o -d "${prefix}${target}/bin" "${filename}" \
unzip -q -o -d "${prefix}/bin" "${filename}" \
httpx
EOF
10 changes: 6 additions & 4 deletions tools/hub-tool/Dockerfile.template
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
#syntax=docker/dockerfile:1.6.0

ARG ref=main

FROM ghcr.io/uniget-org/tools/base:${ref} AS prepare
FROM nicholasdille/ubuntu:22.04 AS prepare
COPY --from=ghcr.io/uniget-org/tools/uniget-build:latest \
/etc/profile.d/ \
/etc/profile.d/
SHELL [ "bash", "-clo", "errexit" ]
ARG name
ARG version
RUN <<EOF
check-github-release-asset "docker/hub-tool" "v${version}" "hub-tool-linux-${alt_arch}.tar.gz"
curl --silent --location --fail "https://github.com/docker/hub-tool/releases/download/v${version}/hub-tool-linux-${alt_arch}.tar.gz" \
| tar --extract --gzip --directory="${prefix}${target}/bin" --strip-components=1 --no-same-owner \
| tar --extract --gzip --directory="${prefix}/bin" --strip-components=1 --no-same-owner \
hub-tool/hub-tool
EOF
Loading
Loading