From b4d7ecfbf1ff9b61369b11ec65270e774ec5282e Mon Sep 17 00:00:00 2001 From: "Denis N. Antonioli" <1205618+denisa@users.noreply.github.com> Date: Wed, 21 Jun 2023 11:43:34 -0700 Subject: [PATCH] 4028: Use a script to install clj-kondo (#4347) Co-authored-by: Zack Koppert Co-authored-by: Philip Mallegol-Hansen --- Dockerfile | 13 +++++++------ scripts/install-clj-kondo.sh | 9 +++++++++ 2 files changed, 16 insertions(+), 6 deletions(-) create mode 100755 scripts/install-clj-kondo.sh diff --git a/Dockerfile b/Dockerfile index 76a932b0..4ca14324 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,6 @@ FROM tenable/terrascan:1.18.1 as terrascan FROM alpine/terragrunt:1.5.0 as terragrunt FROM assignuser/chktex-alpine:v0.1.1 as chktex -FROM cljkondo/clj-kondo:2023.05.18-alpine as clj-kondo FROM dotenvlinter/dotenv-linter:3.3.0 as dotenv-linter FROM ghcr.io/awkbar-devops/clang-format:v1.0.2 as clang-format FROM ghcr.io/terraform-linters/tflint-bundle:v0.46.1.1 as tflint @@ -35,6 +34,7 @@ FROM python:3.11.3-alpine3.17 as base_image # Set ARG values used in Build # ################################ ARG CHECKSTYLE_VERSION='10.3.4' +ARG CLJ_KONDO_VERSION='2023.05.18' # Dart Linter ## stable dart sdk: https://dart.dev/get-dart#release-channels ARG DART_VERSION='2.8.4' @@ -142,11 +142,6 @@ COPY --from=terragrunt /usr/local/bin/terragrunt /usr/bin/ ###################### COPY --from=protolint /usr/local/bin/protolint /usr/bin/ -##################### -# Install clj-kondo # -##################### -COPY --from=clj-kondo /bin/clj-kondo /usr/bin/ - ################################ # Install editorconfig-checker # ################################ @@ -198,6 +193,12 @@ COPY --from=kubeconfrm /kubeconform /usr/bin/ COPY scripts/install-lintr.sh / RUN /install-lintr.sh && rm -rf /install-lintr.sh +##################### +# Install clj-kondo # +##################### +COPY scripts/install-clj-kondo.sh / +RUN /install-clj-kondo.sh && rm -rf /install-clj-kondo.sh + # Source: https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub # Store the key here because the above host is sometimes down, and breaks our builds COPY dependencies/sgerrand.rsa.pub /etc/apk/keys/sgerrand.rsa.pub diff --git a/scripts/install-clj-kondo.sh b/scripts/install-clj-kondo.sh new file mode 100755 index 00000000..b9b50f31 --- /dev/null +++ b/scripts/install-clj-kondo.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +set -euo pipefail + +curl -sLO https://raw.githubusercontent.com/clj-kondo/clj-kondo/master/script/install-clj-kondo + +chmod +x install-clj-kondo + +./install-clj-kondo --dir /usr/bin/ --download-dir /usr/bin/ --version "${CLJ_KONDO_VERSION}"