diff --git a/.automation/build.py b/.automation/build.py index 621b646d45f..5ee9697cbb6 100644 --- a/.automation/build.py +++ b/.automation/build.py @@ -2974,6 +2974,7 @@ def generate_documentation_all_linters(): linters.sort(key=lambda x: x.linter_name) table_header = [ "Linter", + "Supported Platforms", "Version", "License", "Popularity", @@ -3159,9 +3160,17 @@ def generate_documentation_all_linters(): f"[![GitHub stars](https://img.shields.io/github/stars/{repo}?cacheSeconds=3600)]" f"(https://github.com/{repo}){{target=_blank}}" ) + supported_platforms = [] + # supported platforms + if ( + hasattr(linter, "supported_platforms") + and "platform" in linter.supported_platforms + ): + supported_platforms += linter.supported_platforms["platform"] # line table_line = [ linter.linter_name, + ", ".join(supported_platforms), linter_version, license, "N/A", @@ -3178,6 +3187,7 @@ def generate_documentation_all_linters(): linter_doc_links += [link] md_table_line = [ md_linter_name, + "
".join(supported_platforms), linter_version, md_license, md_popularity, @@ -3218,10 +3228,10 @@ def generate_documentation_all_linters(): outfile.write("\n\n") outfile.write("# References\n\n") outfile.write( - "| Linter | Version | License | Popularity | Descriptors | Ref | URL |\n" + "| Linter | Supported Platforms | Version | License | Popularity | Descriptors | Ref | URL |\n" ) outfile.write( - "| :---- | :-----: | :-----: | :-----: | :--------- | :--------------: | :-: |\n" + "| :---- | :-----: | :-----: | :-----: | :-----: | :--------- | :--------------: | :-: |\n" ) for md_table_line in md_table_lines: outfile.write("| %s |\n" % " | ".join(md_table_line)) diff --git a/.cspell.json b/.cspell.json index 7cdf2571e96..97c795a9e5f 100644 --- a/.cspell.json +++ b/.cspell.json @@ -535,6 +535,7 @@ "Symilar", "Symlinks", "Syntastic", + "TARGETPLATFORM", "TEAMPROJECT", "TEKTON", "TERMIOS", @@ -579,6 +580,7 @@ "YOURBRANCH", "YOURORGNAME", "YOURUSERNAME", + "aarch64", "abdeslamads", "abhith", "absolutized", @@ -615,6 +617,7 @@ "aren", "argparse", "aristanetworks", + "armv6", "artefacts", "asdict", "ashokm", @@ -1137,6 +1140,7 @@ "msrest", "mstruebing", "msvs", + "multiarch", "muandane", "multiline", "multimatch", @@ -1381,6 +1385,7 @@ "rexec", "rgba", "risd", + "riscv", "rmfamily", "robotframework", "rockspec", @@ -1653,4 +1658,4 @@ "zavoloklom", "zricethezav" ] -} \ No newline at end of file +} diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index a60ead757ed..984c71c89af 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,3 +1,4 @@ +--- # These are supported funding model platforms github: [nvuillam, echoix, bdovaz] diff --git a/.github/dependabot.yml b/.github/dependabot.yml index d84aab51f74..ef0565b0255 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,3 +1,4 @@ +--- ################################# # GitHub Dependabot Config info # ################################# diff --git a/.github/linters/.cfnlintrc.yml b/.github/linters/.cfnlintrc.yml index 16e8c9761f3..19b154e567e 100644 --- a/.github/linters/.cfnlintrc.yml +++ b/.github/linters/.cfnlintrc.yml @@ -1,2 +1,3 @@ +--- include_checks: - I diff --git a/.github/linters/.checkov.yml b/.github/linters/.checkov.yml index 09a58ad3029..27ca1dbe755 100644 --- a/.github/linters/.checkov.yml +++ b/.github/linters/.checkov.yml @@ -1,3 +1,4 @@ +--- # You can see all available properties here: https://github.com/bridgecrewio/checkov#configuration-using-a-config-file quiet: true skip-check: diff --git a/.github/linters/.hadolint.yml b/.github/linters/.hadolint.yml index c1119776011..e9f938cfa3a 100644 --- a/.github/linters/.hadolint.yml +++ b/.github/linters/.hadolint.yml @@ -1,3 +1,4 @@ +--- ignored: - DL3007 - DL3016 diff --git a/.github/linters/.protolintrc.yml b/.github/linters/.protolintrc.yml index 7bd3e0ced67..57513830da3 100644 --- a/.github/linters/.protolintrc.yml +++ b/.github/linters/.protolintrc.yml @@ -1,3 +1,4 @@ +--- # Lint directives. lint: # Linter rules. diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index 92b902e8c59..09e84804042 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -1,3 +1,4 @@ +--- name-template: "v$RESOLVED_VERSION" tag-template: "v$RESOLVED_VERSION" template: | diff --git a/.github/workflows/auto-update-linters.yml b/.github/workflows/auto-update-linters.yml index d7c6b47bce1..64c22f83b75 100644 --- a/.github/workflows/auto-update-linters.yml +++ b/.github/workflows/auto-update-linters.yml @@ -81,7 +81,7 @@ jobs: with: context: . file: Dockerfile - platforms: linux/amd64 + platforms: linux/amd64,linux/arm64 build-args: | BUILD_DATE=${{ env.BUILD_DATE }} BUILD_REVISION=auto_update_${{ github.sha }} diff --git a/.github/workflows/deploy-ALPHA-flavors.yml b/.github/workflows/deploy-ALPHA-flavors.yml index d7146718e0a..d6e997f3bd3 100644 --- a/.github/workflows/deploy-ALPHA-flavors.yml +++ b/.github/workflows/deploy-ALPHA-flavors.yml @@ -105,7 +105,7 @@ jobs: with: context: . file: flavors/${{ matrix.flavor }}/Dockerfile - platforms: linux/amd64 + platforms: linux/amd64,linux/arm64 build-args: | BUILD_DATE=${{ env.BUILD_DATE }} BUILD_REVISION=${{ github.sha }} diff --git a/.github/workflows/deploy-ALPHA.yml b/.github/workflows/deploy-ALPHA.yml index aa350c96bda..fb5778d26ac 100644 --- a/.github/workflows/deploy-ALPHA.yml +++ b/.github/workflows/deploy-ALPHA.yml @@ -131,7 +131,7 @@ jobs: with: context: . file: Dockerfile - platforms: linux/amd64 + platforms: linux/amd64,linux/arm64 build-args: | BUILD_DATE=${{ env.BUILD_DATE }} BUILD_REVISION=${{ github.sha }} diff --git a/.github/workflows/deploy-BETA-flavors.yml b/.github/workflows/deploy-BETA-flavors.yml index 0dd49ada568..391928f9d60 100644 --- a/.github/workflows/deploy-BETA-flavors.yml +++ b/.github/workflows/deploy-BETA-flavors.yml @@ -76,7 +76,7 @@ jobs: "terraform", ] # flavors-end - platform: ["linux/amd64"] + platform: ["linux/amd64", "linux/arm64"] # Only run this on the main repo if: >- ( diff --git a/.github/workflows/deploy-BETA-linters.yml b/.github/workflows/deploy-BETA-linters.yml index 76c8f35cc62..b6c5f8948ea 100644 --- a/.github/workflows/deploy-BETA-linters.yml +++ b/.github/workflows/deploy-BETA-linters.yml @@ -66,7 +66,7 @@ jobs: max-parallel: 10 matrix: linter: ${{ fromJson(needs.get-linters-matrix.outputs.linters) }} - platform: ["linux/amd64"] + platform: ["linux/amd64", "linux/arm64"] # Only run this on the main repo if: >- ( diff --git a/.github/workflows/deploy-BETA.yml b/.github/workflows/deploy-BETA.yml index 47e1ae66b96..5fb101c68a6 100644 --- a/.github/workflows/deploy-BETA.yml +++ b/.github/workflows/deploy-BETA.yml @@ -199,7 +199,7 @@ jobs: with: context: . file: Dockerfile - platforms: linux/amd64 + platforms: linux/amd64,linux/arm64 build-args: | BUILD_DATE=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }} BUILD_VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }} diff --git a/.github/workflows/deploy-DEV-linters.yml b/.github/workflows/deploy-DEV-linters.yml index 11c832e8b0c..96e7096a812 100644 --- a/.github/workflows/deploy-DEV-linters.yml +++ b/.github/workflows/deploy-DEV-linters.yml @@ -84,7 +84,7 @@ jobs: max-parallel: 18 matrix: linter: ${{ fromJson(needs.get-linters-matrix.outputs.linters) }} - platform: ["linux/amd64"] + platform: ["linux/amd64", "linux/arm64"] # Only run this on the main repo if: | ( diff --git a/.github/workflows/deploy-DEV.yml b/.github/workflows/deploy-DEV.yml index 7d0c13ffbec..1661cbcaf22 100644 --- a/.github/workflows/deploy-DEV.yml +++ b/.github/workflows/deploy-DEV.yml @@ -41,6 +41,14 @@ jobs: # Set the agent to run on runs-on: ubuntu-latest permissions: read-all + services: + registry: + image: registry:2 + ports: + - 5000:5000 + env: + # If using Docker Hub, trivy would need to have docker.io as prefix + REGISTRY_PREFIX: localhost:5000 # Prevent duplicate run from happening when a forked push is committed if: (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository) && !contains(github.event.head_commit.message, 'skip deploy') # Set max build time for the job @@ -66,13 +74,15 @@ jobs: id: meta with: images: | - ${{ github.repository }} + ${{ env.REGISTRY_PREFIX }}/${{ github.repository }} - name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + with: + driver-opts: network=host ################################### # Build image locally for testing # @@ -84,14 +94,13 @@ jobs: with: context: . file: Dockerfile-quick - platforms: linux/amd64 + platforms: linux/amd64,linux/arm64 build-args: | BUILD_DATE=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }} BUILD_VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }} BUILD_REVISION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }} MEGA_LINTER_BASE_IMAGE="oxsecurity/megalinter:beta" - load: true - push: false + push: true secrets: | GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} tags: ${{ steps.meta.outputs.tags }} @@ -113,13 +122,12 @@ jobs: with: context: . file: Dockerfile - platforms: linux/amd64 + platforms: linux/amd64,linux/arm64 build-args: | BUILD_DATE=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }} BUILD_VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }} BUILD_REVISION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }} - load: true - push: false + push: true secrets: | GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} tags: ${{ steps.meta.outputs.tags }} @@ -140,13 +148,12 @@ jobs: with: context: . file: Dockerfile - platforms: linux/amd64 + platforms: linux/amd64,linux/arm64 build-args: | BUILD_DATE=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }} BUILD_VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }} BUILD_REVISION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }} - load: true - push: false + push: true secrets: | GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} tags: ${{ steps.meta.outputs.tags }} diff --git a/.mega-linter.yml b/.mega-linter.yml index 1d0c848d4a2..ed6d9060158 100644 --- a/.mega-linter.yml +++ b/.mega-linter.yml @@ -1,3 +1,4 @@ +--- # Configuration file for MegaLinter # See all available variables at https://megalinter.io/configuration/ and in linters documentation diff --git a/Dockerfile b/Dockerfile index 6353eeca2e9..834ab3e7d2d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -54,9 +54,12 @@ ARG TERRAFORM_TERRAGRUNT_VERSION=1.14.0 FROM rhysd/actionlint:${ACTION_ACTIONLINT_VERSION} AS actionlint # shellcheck is a dependency for actionlint FROM koalaman/shellcheck:${BASH_SHELLCHECK_VERSION} AS shellcheck +FROM multiarch/qemu-user-static:x86_64-aarch64 AS qemu # Next FROM line commented because already managed by another linter # FROM koalaman/shellcheck:${BASH_SHELLCHECK_VERSION} AS shellcheck FROM mvdan/shfmt:${BASH_SHFMT_VERSION} AS shfmt +# Next FROM line commented because already managed by another linter +# FROM multiarch/qemu-user-static:x86_64-aarch64 AS qemu FROM hadolint/hadolint:${DOCKERFILE_HADOLINT_VERSION} AS hadolint FROM mstruebing/editorconfig-checker:${EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION} AS editorconfig-checker FROM golang:1-alpine AS revive @@ -112,6 +115,7 @@ FROM python:3.13-alpine3.22 #ARG__START # renovate: datasource=crate depName=sarif-fmt ARG CARGO_SARIF_FMT_VERSION=0.8.0 +ARG TARGETPLATFORM # renovate: datasource=github-tags depName=PowerShell/PowerShell ARG POWERSHELL_VERSION=7.5.4 # renovate: datasource=github-tags depName=sgerrand/alpine-pkg-glibc @@ -634,14 +638,34 @@ COPY --from=composer/composer:2-bin /composer /usr/bin/composer COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +RUN apk update \ + && apk add libc6-compat + # Next COPY line commented because already managed by another linter # COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --link --from=shfmt /bin/shfmt /usr/bin/ +# Next COPY line commented because already managed by another linter +# COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# RUN apk update \ +# && apk add libc6-compat +# Next COPY line commented because already managed by another linter +# COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# RUN apk update \ +# && apk add libc6-compat COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker COPY --link --from=revive /usr/bin/revive /usr/bin/revive COPY --link --from=kubeconform /kubeconform /usr/bin/ COPY --link --from=chktex /usr/bin/chktex /usr/bin/ +# Next COPY line commented because already managed by another linter +# COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# RUN apk update \ +# && apk add libc6-compat +# Next COPY line commented because already managed by another linter +# COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# RUN apk update \ +# && apk add libc6-compat COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ COPY --link --from=dustilock /usr/bin/dustilock /usr/bin/dustilock COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ @@ -662,7 +686,11 @@ COPY --link --from=terragrunt /bin/terraform /usr/bin/ #OTHER__START RUN rc-update add docker boot && (rc-service docker start || true) \ # ARM installation - && curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-musl-x64.tar.gz -o /tmp/powershell.tar.gz \ + && case ${TARGETPLATFORM} in \ + "linux/amd64") POWERSHELL_ARCH=musl-x64 ;; \ + "linux/arm64") POWERSHELL_ARCH=arm64 ;; \ +esac \ + && curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-${POWERSHELL_ARCH}.tar.gz -o /tmp/powershell.tar.gz \ && mkdir -p /opt/microsoft/powershell/7 \ && tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/7 \ && chmod +x /opt/microsoft/powershell/7/pwsh \ @@ -781,7 +809,11 @@ ENV PATH="/root/.composer/vendor/bin:${PATH}" # # POWERSHELL installation # Next line commented because already managed by another linter -# RUN curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-musl-x64.tar.gz -o /tmp/powershell.tar.gz \ +# RUN case ${TARGETPLATFORM} in \ +# "linux/amd64") POWERSHELL_ARCH=musl-x64 ;; \ +# "linux/arm64") POWERSHELL_ARCH=arm64 ;; \ +# esac \ +# && curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-${POWERSHELL_ARCH}.tar.gz -o /tmp/powershell.tar.gz \ # && mkdir -p /opt/microsoft/powershell/7 \ # && tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/7 \ # && chmod +x /opt/microsoft/powershell/7/pwsh \ @@ -826,6 +858,9 @@ RUN curl --retry-all-errors --retry 10 -fLo coursier https://git.io/coursier-cli # # arm-ttk installation ENV ARM_TTK_PSD1="${ARM_TTK_DIRECTORY}/arm-ttk/arm-ttk/arm-ttk.psd1" +# Managed with COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# RUN apk update \ +# && apk add libc6-compat RUN curl --retry 5 --retry-delay 5 -sLO "https://github.com/Azure/arm-ttk/releases/download/${ARM_TTK_VERSION}/${ARM_TTK_NAME}" \ && unzip "${ARM_TTK_NAME}" -d "${ARM_TTK_DIRECTORY}" \ && rm "${ARM_TTK_NAME}" \ @@ -844,13 +879,25 @@ RUN curl --retry 5 --retry-delay 5 -sLO "https://github.com/Azure/arm-ttk/releas # Managed with COPY --link --from=shfmt /bin/shfmt /usr/bin/ # # bicep_linter installation - && curl --retry 5 --retry-delay 5 -sLo ${BICEP_EXE} "https://github.com/Azure/bicep/releases/download/v${BICEP_VERSION}/bicep-linux-musl-x64" \ - && chmod +x "${BICEP_EXE}" \ - && mv "${BICEP_EXE}" "${BICEP_DIR}" \ +# Managed with # Next COPY line commented because already managed by another linter +# # COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# # RUN apk update \ +# # && apk add libc6-compat + && case ${TARGETPLATFORM} in \ + "linux/amd64") POWERSHELL_ARCH=musl-x64 ;; \ + "linux/arm64") POWERSHELL_ARCH=arm64 ;; \ +esac \ +&& curl --retry 5 --retry-delay 5 -sLo ${BICEP_EXE} "https://github.com/Azure/bicep/releases/download/v${BICEP_VERSION}/bicep-linux-${POWERSHELL_ARCH}" \ +&& chmod +x "${BICEP_EXE}" \ +&& mv "${BICEP_EXE}" "${BICEP_DIR}" \ # # cpplint installation # # clj-kondo installation +# Managed with # Next COPY line commented because already managed by another linter +# # COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# # RUN apk update \ +# # && apk add libc6-compat && curl --retry 5 --retry-delay 5 -sLO https://raw.githubusercontent.com/clj-kondo/clj-kondo/refs/tags/v${CLJ_KONDO_VERSION}/script/install-clj-kondo \ && chmod +x install-clj-kondo \ && ./install-clj-kondo \ @@ -877,13 +924,14 @@ RUN curl --retry 5 --retry-delay 5 -sLO "https://github.com/Azure/arm-ttk/releas # stylelint installation # # dartanalyzer installation - && wget --tries=5 https://storage.googleapis.com/dart-archive/channels/stable/release/${DART_VERSION}/sdk/dartsdk-linux-x64-release.zip -O - -q | unzip -q - \ - && mkdir -p /usr/lib/dart \ - && mv dart-sdk/* /usr/lib/dart/ \ - && chmod +x /usr/lib/dart/bin/dart \ - && rm -r dart-sdk/ - -ENV PATH="/usr/lib/dart/bin:${PATH}" + && case ${TARGETPLATFORM} in \ + "linux/amd64") DART_ARCH=x64 ;; \ + "linux/arm64") DART_ARCH=arm64 ;; \ +esac \ + && wget --tries=5 https://storage.googleapis.com/dart-archive/channels/stable/release/${DART_VERSION}/sdk/dartsdk-linux-${DART_ARCH}-release.zip -O - -q | unzip -q - \ + && chmod +x dart-sdk/bin/dart* \ + && mv dart-sdk/bin/* /usr/bin/ && mv dart-sdk/lib/* /usr/lib/ && mv dart-sdk/include/* /usr/include/ \ + && rm -r dart-sdk/ \ # # hadolint installation # Managed with COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint @@ -892,7 +940,7 @@ ENV PATH="/usr/lib/dart/bin:${PATH}" # Managed with COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker # # dotenv-linter installation -RUN wget -q -O - https://raw.githubusercontent.com/dotenv-linter/dotenv-linter/master/install.sh | sh -s -- -b /usr/local/bin "v${DOTENV_LINTER_VERSION}" \ + && wget -q -O - https://raw.githubusercontent.com/dotenv-linter/dotenv-linter/master/install.sh | sh -s -- -b /usr/local/bin "v${DOTENV_LINTER_VERSION}" \ # # gherkin-lint installation # @@ -1008,9 +1056,17 @@ RUN --mount=type=secret,id=GITHUB_TOKEN GITHUB_AUTH_TOKEN="$(cat /run/secrets/GI # # powershell installation +# Managed with # Next COPY line commented because already managed by another linter +# # COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# # RUN apk update \ +# # && apk add libc6-compat RUN pwsh -c 'Install-Module -Name PSScriptAnalyzer -RequiredVersion ${PSSA_VERSION} -Scope AllUsers -Force' # # powershell_formatter installation +# Managed with # Next COPY line commented because already managed by another linter +# # COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# # RUN apk update \ +# # && apk add libc6-compat # Next line commented because already managed by another linter # RUN pwsh -c 'Install-Module -Name PSScriptAnalyzer -RequiredVersion ${PSSA_VERSION} -Scope AllUsers -Force' # diff --git a/codecov.yml b/codecov.yml index ff807c4ceb2..3907d9e8f20 100644 --- a/codecov.yml +++ b/codecov.yml @@ -1,3 +1,4 @@ +--- # https://docs.codecov.io/docs/commit-status#disabling-a-status # Disable blocking patch status to avoid to block PRs without good reason ! coverage: diff --git a/flavors/cupcake/Dockerfile b/flavors/cupcake/Dockerfile index 17d789364d5..44edd456686 100644 --- a/flavors/cupcake/Dockerfile +++ b/flavors/cupcake/Dockerfile @@ -52,6 +52,7 @@ FROM koalaman/shellcheck:${BASH_SHELLCHECK_VERSION} AS shellcheck # Next FROM line commented because already managed by another linter # FROM koalaman/shellcheck:${BASH_SHELLCHECK_VERSION} AS shellcheck FROM mvdan/shfmt:${BASH_SHFMT_VERSION} AS shfmt +FROM multiarch/qemu-user-static:x86_64-aarch64 AS qemu FROM hadolint/hadolint:${DOCKERFILE_HADOLINT_VERSION} AS hadolint FROM mstruebing/editorconfig-checker:${EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION} AS editorconfig-checker FROM golang:1-alpine AS revive @@ -536,6 +537,10 @@ COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # Next COPY line commented because already managed by another linter # COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --link --from=shfmt /bin/shfmt /usr/bin/ +COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +RUN apk update \ + && apk add libc6-compat + COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker COPY --link --from=revive /usr/bin/revive /usr/bin/revive @@ -636,6 +641,9 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil # cpplint installation # # clj-kondo installation +# Managed with COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# RUN apk update \ +# && apk add libc6-compat && curl --retry 5 --retry-delay 5 -sLO https://raw.githubusercontent.com/clj-kondo/clj-kondo/refs/tags/v${CLJ_KONDO_VERSION}/script/install-clj-kondo \ && chmod +x install-clj-kondo \ && ./install-clj-kondo \ diff --git a/flavors/dotnet/Dockerfile b/flavors/dotnet/Dockerfile index 32ff7effddb..fc9be8154a5 100644 --- a/flavors/dotnet/Dockerfile +++ b/flavors/dotnet/Dockerfile @@ -43,9 +43,12 @@ ARG SPELL_LYCHEE_VERSION=sha-7c4b132-alpine FROM rhysd/actionlint:${ACTION_ACTIONLINT_VERSION} AS actionlint # shellcheck is a dependency for actionlint FROM koalaman/shellcheck:${BASH_SHELLCHECK_VERSION} AS shellcheck +FROM multiarch/qemu-user-static:x86_64-aarch64 AS qemu # Next FROM line commented because already managed by another linter # FROM koalaman/shellcheck:${BASH_SHELLCHECK_VERSION} AS shellcheck FROM mvdan/shfmt:${BASH_SHFMT_VERSION} AS shfmt +# Next FROM line commented because already managed by another linter +# FROM multiarch/qemu-user-static:x86_64-aarch64 AS qemu FROM hadolint/hadolint:${DOCKERFILE_HADOLINT_VERSION} AS hadolint FROM mstruebing/editorconfig-checker:${EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION} AS editorconfig-checker FROM ghcr.io/yannh/kubeconform:${KUBERNETES_KUBECONFORM_VERSION} AS kubeconform @@ -85,6 +88,7 @@ FROM python:3.13-alpine3.22 #ARG__START # renovate: datasource=crate depName=sarif-fmt ARG CARGO_SARIF_FMT_VERSION=0.8.0 +ARG TARGETPLATFORM # renovate: datasource=github-tags depName=PowerShell/PowerShell ARG POWERSHELL_VERSION=7.5.4 # renovate: datasource=github-tags depName=PowerShell/PowerShell @@ -376,12 +380,28 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +RUN apk update \ + && apk add libc6-compat + # Next COPY line commented because already managed by another linter # COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --link --from=shfmt /bin/shfmt /usr/bin/ +# Next COPY line commented because already managed by another linter +# COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# RUN apk update \ +# && apk add libc6-compat COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker COPY --link --from=kubeconform /kubeconform /usr/bin/ +# Next COPY line commented because already managed by another linter +# COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# RUN apk update \ +# && apk add libc6-compat +# Next COPY line commented because already managed by another linter +# COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# RUN apk update \ +# && apk add libc6-compat COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ COPY --link --from=trufflehog /usr/bin/trufflehog /usr/bin/ @@ -394,7 +414,11 @@ COPY --link --from=lychee /usr/local/bin/lychee /usr/bin/ ############################################################################################# #OTHER__START # ARM installation -RUN curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-musl-x64.tar.gz -o /tmp/powershell.tar.gz \ +RUN case ${TARGETPLATFORM} in \ + "linux/amd64") POWERSHELL_ARCH=musl-x64 ;; \ + "linux/arm64") POWERSHELL_ARCH=arm64 ;; \ +esac \ + && curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-${POWERSHELL_ARCH}.tar.gz -o /tmp/powershell.tar.gz \ && mkdir -p /opt/microsoft/powershell/7 \ && tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/7 \ && chmod +x /opt/microsoft/powershell/7/pwsh \ @@ -410,7 +434,11 @@ ENV PATH="$JAVA_HOME/bin:${PATH}" # # POWERSHELL installation # Next line commented because already managed by another linter -# RUN curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-musl-x64.tar.gz -o /tmp/powershell.tar.gz \ +# RUN case ${TARGETPLATFORM} in \ +# "linux/amd64") POWERSHELL_ARCH=musl-x64 ;; \ +# "linux/arm64") POWERSHELL_ARCH=arm64 ;; \ +# esac \ +# && curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-${POWERSHELL_ARCH}.tar.gz -o /tmp/powershell.tar.gz \ # && mkdir -p /opt/microsoft/powershell/7 \ # && tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/7 \ # && chmod +x /opt/microsoft/powershell/7/pwsh \ @@ -433,6 +461,9 @@ ENV PATH="$JAVA_HOME/bin:${PATH}" # # arm-ttk installation ENV ARM_TTK_PSD1="${ARM_TTK_DIRECTORY}/arm-ttk/arm-ttk/arm-ttk.psd1" +# Managed with COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# RUN apk update \ +# && apk add libc6-compat RUN curl --retry 5 --retry-delay 5 -sLO "https://github.com/Azure/arm-ttk/releases/download/${ARM_TTK_VERSION}/${ARM_TTK_NAME}" \ && unzip "${ARM_TTK_NAME}" -d "${ARM_TTK_DIRECTORY}" \ && rm "${ARM_TTK_NAME}" \ @@ -451,9 +482,17 @@ RUN curl --retry 5 --retry-delay 5 -sLO "https://github.com/Azure/arm-ttk/releas # Managed with COPY --link --from=shfmt /bin/shfmt /usr/bin/ # # bicep_linter installation - && curl --retry 5 --retry-delay 5 -sLo ${BICEP_EXE} "https://github.com/Azure/bicep/releases/download/v${BICEP_VERSION}/bicep-linux-musl-x64" \ - && chmod +x "${BICEP_EXE}" \ - && mv "${BICEP_EXE}" "${BICEP_DIR}" \ +# Managed with # Next COPY line commented because already managed by another linter +# # COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# # RUN apk update \ +# # && apk add libc6-compat + && case ${TARGETPLATFORM} in \ + "linux/amd64") POWERSHELL_ARCH=musl-x64 ;; \ + "linux/arm64") POWERSHELL_ARCH=arm64 ;; \ +esac \ +&& curl --retry 5 --retry-delay 5 -sLo ${BICEP_EXE} "https://github.com/Azure/bicep/releases/download/v${BICEP_VERSION}/bicep-linux-${POWERSHELL_ARCH}" \ +&& chmod +x "${BICEP_EXE}" \ +&& mv "${BICEP_EXE}" "${BICEP_DIR}" \ # # cpplint installation # @@ -522,9 +561,17 @@ RUN curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/rel # markdown-table-formatter installation # # powershell installation +# Managed with # Next COPY line commented because already managed by another linter +# # COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# # RUN apk update \ +# # && apk add libc6-compat && pwsh -c 'Install-Module -Name PSScriptAnalyzer -RequiredVersion ${PSSA_VERSION} -Scope AllUsers -Force' \ # # powershell_formatter installation +# Managed with # Next COPY line commented because already managed by another linter +# # COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# # RUN apk update \ +# # && apk add libc6-compat # Next line commented because already managed by another linter # RUN pwsh -c 'Install-Module -Name PSScriptAnalyzer -RequiredVersion ${PSSA_VERSION} -Scope AllUsers -Force' # diff --git a/flavors/dotnetweb/Dockerfile b/flavors/dotnetweb/Dockerfile index e4ac94c756d..93bb2a0b59a 100644 --- a/flavors/dotnetweb/Dockerfile +++ b/flavors/dotnetweb/Dockerfile @@ -43,9 +43,12 @@ ARG SPELL_LYCHEE_VERSION=sha-7c4b132-alpine FROM rhysd/actionlint:${ACTION_ACTIONLINT_VERSION} AS actionlint # shellcheck is a dependency for actionlint FROM koalaman/shellcheck:${BASH_SHELLCHECK_VERSION} AS shellcheck +FROM multiarch/qemu-user-static:x86_64-aarch64 AS qemu # Next FROM line commented because already managed by another linter # FROM koalaman/shellcheck:${BASH_SHELLCHECK_VERSION} AS shellcheck FROM mvdan/shfmt:${BASH_SHFMT_VERSION} AS shfmt +# Next FROM line commented because already managed by another linter +# FROM multiarch/qemu-user-static:x86_64-aarch64 AS qemu FROM hadolint/hadolint:${DOCKERFILE_HADOLINT_VERSION} AS hadolint FROM mstruebing/editorconfig-checker:${EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION} AS editorconfig-checker FROM ghcr.io/yannh/kubeconform:${KUBERNETES_KUBECONFORM_VERSION} AS kubeconform @@ -85,6 +88,7 @@ FROM python:3.13-alpine3.22 #ARG__START # renovate: datasource=crate depName=sarif-fmt ARG CARGO_SARIF_FMT_VERSION=0.8.0 +ARG TARGETPLATFORM # renovate: datasource=github-tags depName=PowerShell/PowerShell ARG POWERSHELL_VERSION=7.5.4 # renovate: datasource=github-tags depName=PowerShell/PowerShell @@ -442,12 +446,28 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck +COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +RUN apk update \ + && apk add libc6-compat + # Next COPY line commented because already managed by another linter # COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --link --from=shfmt /bin/shfmt /usr/bin/ +# Next COPY line commented because already managed by another linter +# COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# RUN apk update \ +# && apk add libc6-compat COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker COPY --link --from=kubeconform /kubeconform /usr/bin/ +# Next COPY line commented because already managed by another linter +# COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# RUN apk update \ +# && apk add libc6-compat +# Next COPY line commented because already managed by another linter +# COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# RUN apk update \ +# && apk add libc6-compat COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ COPY --link --from=trufflehog /usr/bin/trufflehog /usr/bin/ @@ -460,7 +480,11 @@ COPY --link --from=lychee /usr/local/bin/lychee /usr/bin/ ############################################################################################# #OTHER__START # ARM installation -RUN curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-musl-x64.tar.gz -o /tmp/powershell.tar.gz \ +RUN case ${TARGETPLATFORM} in \ + "linux/amd64") POWERSHELL_ARCH=musl-x64 ;; \ + "linux/arm64") POWERSHELL_ARCH=arm64 ;; \ +esac \ + && curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-${POWERSHELL_ARCH}.tar.gz -o /tmp/powershell.tar.gz \ && mkdir -p /opt/microsoft/powershell/7 \ && tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/7 \ && chmod +x /opt/microsoft/powershell/7/pwsh \ @@ -476,7 +500,11 @@ ENV PATH="$JAVA_HOME/bin:${PATH}" # # POWERSHELL installation # Next line commented because already managed by another linter -# RUN curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-musl-x64.tar.gz -o /tmp/powershell.tar.gz \ +# RUN case ${TARGETPLATFORM} in \ +# "linux/amd64") POWERSHELL_ARCH=musl-x64 ;; \ +# "linux/arm64") POWERSHELL_ARCH=arm64 ;; \ +# esac \ +# && curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-${POWERSHELL_ARCH}.tar.gz -o /tmp/powershell.tar.gz \ # && mkdir -p /opt/microsoft/powershell/7 \ # && tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/7 \ # && chmod +x /opt/microsoft/powershell/7/pwsh \ @@ -501,6 +529,9 @@ ENV PATH="$JAVA_HOME/bin:${PATH}" # # arm-ttk installation ENV ARM_TTK_PSD1="${ARM_TTK_DIRECTORY}/arm-ttk/arm-ttk/arm-ttk.psd1" +# Managed with COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# RUN apk update \ +# && apk add libc6-compat RUN curl --retry 5 --retry-delay 5 -sLO "https://github.com/Azure/arm-ttk/releases/download/${ARM_TTK_VERSION}/${ARM_TTK_NAME}" \ && unzip "${ARM_TTK_NAME}" -d "${ARM_TTK_DIRECTORY}" \ && rm "${ARM_TTK_NAME}" \ @@ -519,9 +550,17 @@ RUN curl --retry 5 --retry-delay 5 -sLO "https://github.com/Azure/arm-ttk/releas # Managed with COPY --link --from=shfmt /bin/shfmt /usr/bin/ # # bicep_linter installation - && curl --retry 5 --retry-delay 5 -sLo ${BICEP_EXE} "https://github.com/Azure/bicep/releases/download/v${BICEP_VERSION}/bicep-linux-musl-x64" \ - && chmod +x "${BICEP_EXE}" \ - && mv "${BICEP_EXE}" "${BICEP_DIR}" \ +# Managed with # Next COPY line commented because already managed by another linter +# # COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# # RUN apk update \ +# # && apk add libc6-compat + && case ${TARGETPLATFORM} in \ + "linux/amd64") POWERSHELL_ARCH=musl-x64 ;; \ + "linux/arm64") POWERSHELL_ARCH=arm64 ;; \ +esac \ +&& curl --retry 5 --retry-delay 5 -sLo ${BICEP_EXE} "https://github.com/Azure/bicep/releases/download/v${BICEP_VERSION}/bicep-linux-${POWERSHELL_ARCH}" \ +&& chmod +x "${BICEP_EXE}" \ +&& mv "${BICEP_EXE}" "${BICEP_DIR}" \ # # cpplint installation # @@ -600,9 +639,17 @@ RUN curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/rel # markdown-table-formatter installation # # powershell installation +# Managed with # Next COPY line commented because already managed by another linter +# # COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# # RUN apk update \ +# # && apk add libc6-compat && pwsh -c 'Install-Module -Name PSScriptAnalyzer -RequiredVersion ${PSSA_VERSION} -Scope AllUsers -Force' \ # # powershell_formatter installation +# Managed with # Next COPY line commented because already managed by another linter +# # COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# # RUN apk update \ +# # && apk add libc6-compat # Next line commented because already managed by another linter # RUN pwsh -c 'Install-Module -Name PSScriptAnalyzer -RequiredVersion ${PSSA_VERSION} -Scope AllUsers -Force' # diff --git a/flavors/formatters/Dockerfile b/flavors/formatters/Dockerfile index 9ec6d5be69e..3cd03114642 100644 --- a/flavors/formatters/Dockerfile +++ b/flavors/formatters/Dockerfile @@ -23,6 +23,7 @@ ARG TERRAFORM_TERRAGRUNT_VERSION=1.14.0 ############################################################################################# #FROM__START FROM mvdan/shfmt:${BASH_SHFMT_VERSION} AS shfmt +FROM multiarch/qemu-user-static:x86_64-aarch64 AS qemu FROM alpine/terragrunt:${TERRAFORM_TERRAGRUNT_VERSION} AS terragrunt #FROM__END @@ -55,6 +56,7 @@ FROM python:3.13-alpine3.22 #ARG__START # renovate: datasource=crate depName=sarif-fmt ARG CARGO_SARIF_FMT_VERSION=0.8.0 +ARG TARGETPLATFORM # renovate: datasource=github-tags depName=PowerShell/PowerShell ARG POWERSHELL_VERSION=7.5.4 @@ -214,6 +216,10 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ #COPY__START COPY --link --from=shfmt /bin/shfmt /usr/bin/ +COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +RUN apk update \ + && apk add libc6-compat + COPY --link --from=terragrunt /bin/terraform /usr/bin/ #COPY__END @@ -226,7 +232,11 @@ RUN apk add --no-cache dotnet9-sdk ENV PATH="${PATH}:/root/.dotnet/tools" # # POWERSHELL installation -RUN curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-musl-x64.tar.gz -o /tmp/powershell.tar.gz \ +RUN case ${TARGETPLATFORM} in \ + "linux/amd64") POWERSHELL_ARCH=musl-x64 ;; \ + "linux/arm64") POWERSHELL_ARCH=arm64 ;; \ +esac \ + && curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-${POWERSHELL_ARCH}.tar.gz -o /tmp/powershell.tar.gz \ && mkdir -p /opt/microsoft/powershell/7 \ && tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/7 \ && chmod +x /opt/microsoft/powershell/7/pwsh \ @@ -258,6 +268,9 @@ RUN curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERS # markdown-table-formatter installation # # powershell_formatter installation +# Managed with COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# RUN apk update \ +# && apk add libc6-compat && pwsh -c 'Install-Module -Name PSScriptAnalyzer -RequiredVersion ${PSSA_VERSION} -Scope AllUsers -Force' # # black installation diff --git a/flavors/java/Dockerfile b/flavors/java/Dockerfile index 885e58051c0..77e0c391a06 100644 --- a/flavors/java/Dockerfile +++ b/flavors/java/Dockerfile @@ -46,6 +46,7 @@ FROM koalaman/shellcheck:${BASH_SHELLCHECK_VERSION} AS shellcheck # Next FROM line commented because already managed by another linter # FROM koalaman/shellcheck:${BASH_SHELLCHECK_VERSION} AS shellcheck FROM mvdan/shfmt:${BASH_SHFMT_VERSION} AS shfmt +FROM multiarch/qemu-user-static:x86_64-aarch64 AS qemu FROM hadolint/hadolint:${DOCKERFILE_HADOLINT_VERSION} AS hadolint FROM mstruebing/editorconfig-checker:${EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION} AS editorconfig-checker FROM ghcr.io/yannh/kubeconform:${KUBERNETES_KUBECONFORM_VERSION} AS kubeconform @@ -360,6 +361,10 @@ COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck # Next COPY line commented because already managed by another linter # COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck COPY --link --from=shfmt /bin/shfmt /usr/bin/ +COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +RUN apk update \ + && apk add libc6-compat + COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker COPY --link --from=kubeconform /kubeconform /usr/bin/ @@ -447,6 +452,9 @@ RUN printf '#!/bin/bash \n\nif [[ -x "$1" ]]; then exit 0; else echo "Error: Fil # Managed with COPY --link --from=shfmt /bin/shfmt /usr/bin/ # # clj-kondo installation +# Managed with COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# RUN apk update \ +# && apk add libc6-compat && curl --retry 5 --retry-delay 5 -sLO https://raw.githubusercontent.com/clj-kondo/clj-kondo/refs/tags/v${CLJ_KONDO_VERSION}/script/install-clj-kondo \ && chmod +x install-clj-kondo \ && ./install-clj-kondo \ diff --git a/linters/arm_arm_ttk/Dockerfile b/linters/arm_arm_ttk/Dockerfile index daf25f4aa1c..d39197d007a 100644 --- a/linters/arm_arm_ttk/Dockerfile +++ b/linters/arm_arm_ttk/Dockerfile @@ -18,7 +18,7 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START - +FROM multiarch/qemu-user-static:x86_64-aarch64 AS qemu #FROM__END ################## @@ -48,6 +48,7 @@ FROM python:3.13-alpine3.22 ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #ARG__START +ARG TARGETPLATFORM # renovate: datasource=github-tags depName=PowerShell/PowerShell ARG POWERSHELL_VERSION=7.5.4 # renovate: datasource=github-tags depName=Azure/arm-ttk @@ -146,6 +147,9 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #COPY__START +COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +RUN apk update \ + && apk add libc6-compat #COPY__END @@ -154,7 +158,11 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #OTHER__START # ARM installation -RUN curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-musl-x64.tar.gz -o /tmp/powershell.tar.gz \ +RUN case ${TARGETPLATFORM} in \ + "linux/amd64") POWERSHELL_ARCH=musl-x64 ;; \ + "linux/arm64") POWERSHELL_ARCH=arm64 ;; \ +esac \ + && curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-${POWERSHELL_ARCH}.tar.gz -o /tmp/powershell.tar.gz \ && mkdir -p /opt/microsoft/powershell/7 \ && tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/7 \ && chmod +x /opt/microsoft/powershell/7/pwsh \ @@ -163,6 +171,9 @@ RUN curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERS # # arm-ttk installation ENV ARM_TTK_PSD1="${ARM_TTK_DIRECTORY}/arm-ttk/arm-ttk/arm-ttk.psd1" +# Managed with COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# RUN apk update \ +# && apk add libc6-compat RUN curl --retry 5 --retry-delay 5 -sLO "https://github.com/Azure/arm-ttk/releases/download/${ARM_TTK_VERSION}/${ARM_TTK_NAME}" \ && unzip "${ARM_TTK_NAME}" -d "${ARM_TTK_DIRECTORY}" \ && rm "${ARM_TTK_NAME}" \ diff --git a/linters/bicep_bicep_linter/Dockerfile b/linters/bicep_bicep_linter/Dockerfile index a83745bf6e4..a2c1b926579 100644 --- a/linters/bicep_bicep_linter/Dockerfile +++ b/linters/bicep_bicep_linter/Dockerfile @@ -18,7 +18,7 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START - +FROM multiarch/qemu-user-static:x86_64-aarch64 AS qemu #FROM__END ################## @@ -48,6 +48,7 @@ FROM python:3.13-alpine3.22 ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #ARG__START +ARG TARGETPLATFORM # renovate: datasource=github-tags depName=Azure/bicep ARG BICEP_VERSION=0.39.26 ARG BICEP_EXE='bicep' @@ -144,6 +145,9 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #COPY__START +COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +RUN apk update \ + && apk add libc6-compat #COPY__END @@ -152,9 +156,16 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #OTHER__START # bicep_linter installation -RUN curl --retry 5 --retry-delay 5 -sLo ${BICEP_EXE} "https://github.com/Azure/bicep/releases/download/v${BICEP_VERSION}/bicep-linux-musl-x64" \ - && chmod +x "${BICEP_EXE}" \ - && mv "${BICEP_EXE}" "${BICEP_DIR}" +# Managed with COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# RUN apk update \ +# && apk add libc6-compat +RUN case ${TARGETPLATFORM} in \ + "linux/amd64") POWERSHELL_ARCH=musl-x64 ;; \ + "linux/arm64") POWERSHELL_ARCH=arm64 ;; \ +esac \ +&& curl --retry 5 --retry-delay 5 -sLo ${BICEP_EXE} "https://github.com/Azure/bicep/releases/download/v${BICEP_VERSION}/bicep-linux-${POWERSHELL_ARCH}" \ +&& chmod +x "${BICEP_EXE}" \ +&& mv "${BICEP_EXE}" "${BICEP_DIR}" # #OTHER__END diff --git a/linters/clojure_clj_kondo/Dockerfile b/linters/clojure_clj_kondo/Dockerfile index 653710eeddd..dffb37ab144 100644 --- a/linters/clojure_clj_kondo/Dockerfile +++ b/linters/clojure_clj_kondo/Dockerfile @@ -18,7 +18,7 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START - +FROM multiarch/qemu-user-static:x86_64-aarch64 AS qemu #FROM__END ################## @@ -144,6 +144,9 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #COPY__START +COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +RUN apk update \ + && apk add libc6-compat #COPY__END @@ -193,6 +196,9 @@ RUN ALPINE_GLIBC_BASE_URL="https://github.com/sgerrand/alpine-pkg-glibc/releases "$ALPINE_GLIBC_I18N_PACKAGE_FILENAME" \ # # clj-kondo installation +# Managed with COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# RUN apk update \ +# && apk add libc6-compat && curl --retry 5 --retry-delay 5 -sLO https://raw.githubusercontent.com/clj-kondo/clj-kondo/refs/tags/v${CLJ_KONDO_VERSION}/script/install-clj-kondo \ && chmod +x install-clj-kondo \ && ./install-clj-kondo diff --git a/linters/dart_dartanalyzer/Dockerfile b/linters/dart_dartanalyzer/Dockerfile index 71c23ad47a2..6bea8e89b19 100644 --- a/linters/dart_dartanalyzer/Dockerfile +++ b/linters/dart_dartanalyzer/Dockerfile @@ -50,6 +50,7 @@ FROM python:3.13-alpine3.22 #ARG__START # renovate: datasource=github-tags depName=sgerrand/alpine-pkg-glibc ARG ALPINE_GLIBC_PACKAGE_VERSION=2.34-r0 +ARG TARGETPLATFORM # renovate: datasource=dart-version depName=dart ARG DART_VERSION='3.8.3' #ARG__END @@ -192,13 +193,15 @@ RUN ALPINE_GLIBC_BASE_URL="https://github.com/sgerrand/alpine-pkg-glibc/releases "$ALPINE_GLIBC_I18N_PACKAGE_FILENAME" \ # # dartanalyzer installation - && wget --tries=5 https://storage.googleapis.com/dart-archive/channels/stable/release/${DART_VERSION}/sdk/dartsdk-linux-x64-release.zip -O - -q | unzip -q - \ - && mkdir -p /usr/lib/dart \ - && mv dart-sdk/* /usr/lib/dart/ \ - && chmod +x /usr/lib/dart/bin/dart \ - && rm -r dart-sdk/ + && case ${TARGETPLATFORM} in \ + "linux/amd64") DART_ARCH=x64 ;; \ + "linux/arm64") DART_ARCH=arm64 ;; \ +esac \ + && wget --tries=5 https://storage.googleapis.com/dart-archive/channels/stable/release/${DART_VERSION}/sdk/dartsdk-linux-${DART_ARCH}-release.zip -O - -q | unzip -q - \ + && chmod +x dart-sdk/bin/dart* \ + && mv dart-sdk/bin/* /usr/bin/ && mv dart-sdk/lib/* /usr/lib/ && mv dart-sdk/include/* /usr/include/ \ + && rm -r dart-sdk/ -ENV PATH="/usr/lib/dart/bin:${PATH}" # #OTHER__END diff --git a/linters/powershell_powershell/Dockerfile b/linters/powershell_powershell/Dockerfile index c0480ec0686..3d346931ffb 100644 --- a/linters/powershell_powershell/Dockerfile +++ b/linters/powershell_powershell/Dockerfile @@ -18,7 +18,7 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START - +FROM multiarch/qemu-user-static:x86_64-aarch64 AS qemu #FROM__END ################## @@ -48,6 +48,7 @@ FROM python:3.13-alpine3.22 ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #ARG__START +ARG TARGETPLATFORM # renovate: datasource=github-tags depName=PowerShell/PowerShell ARG POWERSHELL_VERSION=7.5.4 @@ -146,6 +147,9 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #COPY__START +COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +RUN apk update \ + && apk add libc6-compat #COPY__END @@ -154,13 +158,20 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #OTHER__START # POWERSHELL installation -RUN curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-musl-x64.tar.gz -o /tmp/powershell.tar.gz \ +RUN case ${TARGETPLATFORM} in \ + "linux/amd64") POWERSHELL_ARCH=musl-x64 ;; \ + "linux/arm64") POWERSHELL_ARCH=arm64 ;; \ +esac \ + && curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-${POWERSHELL_ARCH}.tar.gz -o /tmp/powershell.tar.gz \ && mkdir -p /opt/microsoft/powershell/7 \ && tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/7 \ && chmod +x /opt/microsoft/powershell/7/pwsh \ && ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh \ # # powershell installation +# Managed with COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# RUN apk update \ +# && apk add libc6-compat && pwsh -c 'Install-Module -Name PSScriptAnalyzer -RequiredVersion ${PSSA_VERSION} -Scope AllUsers -Force' # #OTHER__END diff --git a/linters/powershell_powershell_formatter/Dockerfile b/linters/powershell_powershell_formatter/Dockerfile index 0dc6b06fa8d..a379970eb26 100644 --- a/linters/powershell_powershell_formatter/Dockerfile +++ b/linters/powershell_powershell_formatter/Dockerfile @@ -18,7 +18,7 @@ ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #FROM__START - +FROM multiarch/qemu-user-static:x86_64-aarch64 AS qemu #FROM__END ################## @@ -48,6 +48,7 @@ FROM python:3.13-alpine3.22 ## @generated by .automation/build.py using descriptor files, please do not update manually ## ############################################################################################# #ARG__START +ARG TARGETPLATFORM # renovate: datasource=github-tags depName=PowerShell/PowerShell ARG POWERSHELL_VERSION=7.5.4 @@ -146,6 +147,9 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #COPY__START +COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +RUN apk update \ + && apk add libc6-compat #COPY__END @@ -154,13 +158,20 @@ ENV PATH="/node-deps/node_modules/.bin:${PATH}" \ ############################################################################################# #OTHER__START # POWERSHELL installation -RUN curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-musl-x64.tar.gz -o /tmp/powershell.tar.gz \ +RUN case ${TARGETPLATFORM} in \ + "linux/amd64") POWERSHELL_ARCH=musl-x64 ;; \ + "linux/arm64") POWERSHELL_ARCH=arm64 ;; \ +esac \ + && curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-${POWERSHELL_ARCH}.tar.gz -o /tmp/powershell.tar.gz \ && mkdir -p /opt/microsoft/powershell/7 \ && tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/7 \ && chmod +x /opt/microsoft/powershell/7/pwsh \ && ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh \ # # powershell_formatter installation +# Managed with COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ +# RUN apk update \ +# && apk add libc6-compat && pwsh -c 'Install-Module -Name PSScriptAnalyzer -RequiredVersion ${PSSA_VERSION} -Scope AllUsers -Force' # #OTHER__END diff --git a/megalinter/descriptors/action.megalinter-descriptor.yml b/megalinter/descriptors/action.megalinter-descriptor.yml index 927f648305b..99afa0df38f 100644 --- a/megalinter/descriptors/action.megalinter-descriptor.yml +++ b/megalinter/descriptors/action.megalinter-descriptor.yml @@ -54,3 +54,7 @@ linters: COPY --link --from=actionlint /usr/local/bin/actionlint /usr/bin/actionlint # shellcheck is a dependency for actionlint - COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 diff --git a/megalinter/descriptors/ansible.megalinter-descriptor.yml b/megalinter/descriptors/ansible.megalinter-descriptor.yml index 20c3a2b0036..079ca39bf53 100644 --- a/megalinter/descriptors/ansible.megalinter-descriptor.yml +++ b/megalinter/descriptors/ansible.megalinter-descriptor.yml @@ -70,3 +70,7 @@ linters: ARG PIP_ANSIBLE_LINT_VERSION=25.12.0 pip: - ansible-lint==${PIP_ANSIBLE_LINT_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 diff --git a/megalinter/descriptors/arm.megalinter-descriptor.yml b/megalinter/descriptors/arm.megalinter-descriptor.yml index f860f994a0c..64136cd82e0 100644 --- a/megalinter/descriptors/arm.megalinter-descriptor.yml +++ b/megalinter/descriptors/arm.megalinter-descriptor.yml @@ -11,11 +11,16 @@ install: apk: - icu-libs dockerfile: + - ARG TARGETPLATFORM - |- # renovate: datasource=github-tags depName=PowerShell/PowerShell ARG POWERSHELL_VERSION=7.5.4 - | - RUN curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-musl-x64.tar.gz -o /tmp/powershell.tar.gz \ + RUN case ${TARGETPLATFORM} in \ + "linux/amd64") POWERSHELL_ARCH=musl-x64 ;; \ + "linux/arm64") POWERSHELL_ARCH=arm64 ;; \ + esac \ + && curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-${POWERSHELL_ARCH}.tar.gz -o /tmp/powershell.tar.gz \ && mkdir -p /opt/microsoft/powershell/7 \ && tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/7 \ && chmod +x /opt/microsoft/powershell/7/pwsh \ @@ -67,12 +72,22 @@ linters: - ARG ARM_TTK_NAME='arm-ttk.zip' - ARG ARM_TTK_DIRECTORY='/opt/microsoft' - ENV ARM_TTK_PSD1="${ARM_TTK_DIRECTORY}/arm-ttk/arm-ttk/arm-ttk.psd1" + # https://stackoverflow.com/a/73711302 + - FROM multiarch/qemu-user-static:x86_64-aarch64 AS qemu + - | + COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ + RUN apk update \ + && apk add libc6-compat - | RUN curl --retry 5 --retry-delay 5 -sLO "https://github.com/Azure/arm-ttk/releases/download/${ARM_TTK_VERSION}/${ARM_TTK_NAME}" \ && unzip "${ARM_TTK_NAME}" -d "${ARM_TTK_DIRECTORY}" \ && rm "${ARM_TTK_NAME}" \ && ln -sTf "${ARM_TTK_PSD1}" /usr/bin/arm-ttk \ && chmod a+x /usr/bin/arm-ttk + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: vscode: - name: ARMTTKExtension diff --git a/megalinter/descriptors/bash.megalinter-descriptor.yml b/megalinter/descriptors/bash.megalinter-descriptor.yml index ca6e67526e0..2cde42364ee 100644 --- a/megalinter/descriptors/bash.megalinter-descriptor.yml +++ b/megalinter/descriptors/bash.megalinter-descriptor.yml @@ -57,6 +57,10 @@ linters: - | RUN printf '#!/bin/bash \\n\\nif [[ -x "$1" ]]; then exit 0; else echo "Error: File:[$1] is not executable"; exit 1; fi' > /usr/bin/bash-exec \ && chmod +x /usr/bin/bash-exec + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 variables: - name: ERROR_ON_MISSING_EXEC_BIT description: If set to `false`, the `bash-exec` linter will report a warning if a shell script is not executable. If set to `true`, the `bash-exec` linter will report an error instead @@ -117,6 +121,10 @@ linters: ARG BASH_SHELLCHECK_VERSION=v0.11.0 - FROM koalaman/shellcheck:${BASH_SHELLCHECK_VERSION} AS shellcheck - COPY --link --from=shellcheck /bin/shellcheck /usr/bin/shellcheck + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: emacs: - name: flycheck @@ -178,6 +186,10 @@ linters: ARG BASH_SHFMT_VERSION=v3.12.0-alpine - FROM mvdan/shfmt:${BASH_SHFMT_VERSION} AS shfmt - COPY --link --from=shfmt /bin/shfmt /usr/bin/ + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: emacs: - name: emacs-shfmt diff --git a/megalinter/descriptors/bicep.megalinter-descriptor.yml b/megalinter/descriptors/bicep.megalinter-descriptor.yml index f391a5dc066..46e0d15c9c6 100644 --- a/megalinter/descriptors/bicep.megalinter-descriptor.yml +++ b/megalinter/descriptors/bicep.megalinter-descriptor.yml @@ -48,15 +48,30 @@ linters: apk: - icu-libs dockerfile: + - ARG TARGETPLATFORM - |- # renovate: datasource=github-tags depName=Azure/bicep ARG BICEP_VERSION=0.39.26 - ARG BICEP_EXE='bicep' - ARG BICEP_DIR='/usr/local/bin' + # https://stackoverflow.com/a/73711302 + - FROM multiarch/qemu-user-static:x86_64-aarch64 AS qemu - | - RUN curl --retry 5 --retry-delay 5 -sLo ${BICEP_EXE} "https://github.com/Azure/bicep/releases/download/v${BICEP_VERSION}/bicep-linux-musl-x64" \ - && chmod +x "${BICEP_EXE}" \ - && mv "${BICEP_EXE}" "${BICEP_DIR}" + COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ + RUN apk update \ + && apk add libc6-compat + - | + RUN case ${TARGETPLATFORM} in \ + "linux/amd64") POWERSHELL_ARCH=musl-x64 ;; \ + "linux/arm64") POWERSHELL_ARCH=arm64 ;; \ + esac \ + && curl --retry 5 --retry-delay 5 -sLo ${BICEP_EXE} "https://github.com/Azure/bicep/releases/download/v${BICEP_VERSION}/bicep-linux-${POWERSHELL_ARCH}" \ + && chmod +x "${BICEP_EXE}" \ + && mv "${BICEP_EXE}" "${BICEP_DIR}" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: vscode: - name: VSCode Bicep diff --git a/megalinter/descriptors/c.megalinter-descriptor.yml b/megalinter/descriptors/c.megalinter-descriptor.yml index e63052960d3..b569979cba3 100644 --- a/megalinter/descriptors/c.megalinter-descriptor.yml +++ b/megalinter/descriptors/c.megalinter-descriptor.yml @@ -90,6 +90,10 @@ linters: ARG PIP_CPPLINT_VERSION=2.0.2 pip: - cpplint==${PIP_CPPLINT_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 # clang-format - linter_name: clang-format linter_text: | @@ -132,6 +136,10 @@ linters: install: apk: - clang20-extra-tools + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: vscode: - name: Clang-Format diff --git a/megalinter/descriptors/clojure.megalinter-descriptor.yml b/megalinter/descriptors/clojure.megalinter-descriptor.yml index e07dddde013..91169984325 100644 --- a/megalinter/descriptors/clojure.megalinter-descriptor.yml +++ b/megalinter/descriptors/clojure.megalinter-descriptor.yml @@ -87,10 +87,20 @@ linters: - | # renovate: datasource=github-tags depName=clj-kondo/clj-kondo ARG CLJ_KONDO_VERSION=2025.01.16 + # https://stackoverflow.com/a/73711302 + - FROM multiarch/qemu-user-static:x86_64-aarch64 AS qemu + - | + COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ + RUN apk update \ + && apk add libc6-compat - | RUN curl --retry 5 --retry-delay 5 -sLO https://raw.githubusercontent.com/clj-kondo/clj-kondo/refs/tags/v${CLJ_KONDO_VERSION}/script/install-clj-kondo \ && chmod +x install-clj-kondo \ && ./install-clj-kondo + supported_platforms: + platform: + - linux/amd64 + - windows/amd64 ide: emacs: - name: flycheck-clj-kondo @@ -144,6 +154,11 @@ linters: RUN curl --retry 5 --retry-delay 5 -sLO https://raw.githubusercontent.com/greglook/cljstyle/main/util/install-cljstyle \ && chmod +x install-cljstyle \ && ./install-cljstyle --static --version "$CLJ_STYLE_VERSION" + supported_platforms: + platform: + - linux/amd64 + # https://github.com/greglook/cljstyle/issues/115 + #- linux/arm64 ide: emacs: - name: cljstyle-mode diff --git a/megalinter/descriptors/cloudformation.megalinter-descriptor.yml b/megalinter/descriptors/cloudformation.megalinter-descriptor.yml index 9a0fbe05114..5686077e31e 100644 --- a/megalinter/descriptors/cloudformation.megalinter-descriptor.yml +++ b/megalinter/descriptors/cloudformation.megalinter-descriptor.yml @@ -71,6 +71,10 @@ linters: ARG PIP_CFN_LINT_VERSION=1.41.0 pip: - cfn-lint[sarif]==${PIP_CFN_LINT_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: idea: - name: cfn-lint diff --git a/megalinter/descriptors/coffee.megalinter-descriptor.yml b/megalinter/descriptors/coffee.megalinter-descriptor.yml index 213e0398e05..18c51233ec7 100644 --- a/megalinter/descriptors/coffee.megalinter-descriptor.yml +++ b/megalinter/descriptors/coffee.megalinter-descriptor.yml @@ -38,6 +38,10 @@ linters: ARG NPM_COFFEELINT_CLI_VERSION=5.2.11 npm: - "@coffeelint/cli@${NPM_COFFEELINT_CLI_VERSION}" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: idea: - name: coffeelint diff --git a/megalinter/descriptors/copypaste.megalinter-descriptor.yml b/megalinter/descriptors/copypaste.megalinter-descriptor.yml index 18e3bc3e99a..bacc57b3314 100644 --- a/megalinter/descriptors/copypaste.megalinter-descriptor.yml +++ b/megalinter/descriptors/copypaste.megalinter-descriptor.yml @@ -67,3 +67,7 @@ linters: ARG NPM_JSCPD_VERSION=4.0.5 npm: - jscpd@${NPM_JSCPD_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 diff --git a/megalinter/descriptors/cpp.megalinter-descriptor.yml b/megalinter/descriptors/cpp.megalinter-descriptor.yml index 05df4b1c399..98535b839cc 100644 --- a/megalinter/descriptors/cpp.megalinter-descriptor.yml +++ b/megalinter/descriptors/cpp.megalinter-descriptor.yml @@ -81,6 +81,10 @@ linters: ARG PIP_CPPLINT_VERSION=2.0.2 pip: - cpplint==${PIP_CPPLINT_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 # clang-format - linter_name: clang-format linter_text: | @@ -121,6 +125,10 @@ linters: install: apk: - clang20-extra-tools + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: vscode: - name: Clang-Format diff --git a/megalinter/descriptors/csharp.megalinter-descriptor.yml b/megalinter/descriptors/csharp.megalinter-descriptor.yml index 9c4c326904e..6f1cc1aabd5 100644 --- a/megalinter/descriptors/csharp.megalinter-descriptor.yml +++ b/megalinter/descriptors/csharp.megalinter-descriptor.yml @@ -56,7 +56,10 @@ linters: - "dotnet format Folder/Solution.sln --verify-no-changes" - "dotnet format Project.csproj --verify-no-changes" - "dotnet format" # Fix - + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 # CSharpier - linter_name: csharpier linter_text: | @@ -105,6 +108,10 @@ linters: # renovate: datasource=nuget depName=csharpier ARG CSHARP_CSHARPIER_VERSION=1.2.1 - RUN dotnet tool install --allow-roll-forward --global csharpier --version "${CSHARP_CSHARPIER_VERSION}" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: rider: - name: csharpier @@ -159,6 +166,10 @@ linters: # renovate: datasource=nuget depName=roslynator.dotnet.cli ARG CSHARP_ROSLYNATOR_VERSION=0.11.0 - RUN dotnet tool install --allow-roll-forward --global roslynator.dotnet.cli --version "${CSHARP_ROSLYNATOR_VERSION}" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: visual_studio: - name: Roslynator 2022 diff --git a/megalinter/descriptors/css.megalinter-descriptor.yml b/megalinter/descriptors/css.megalinter-descriptor.yml index b3939149a33..5815ba79550 100644 --- a/megalinter/descriptors/css.megalinter-descriptor.yml +++ b/megalinter/descriptors/css.megalinter-descriptor.yml @@ -69,6 +69,10 @@ linters: - stylelint-scss@${NPM_STYLELINT_SCSS_VERSION} pip: - cpplint==${PIP_CPPLINT_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: emacs: - name: flycheck diff --git a/megalinter/descriptors/dart.megalinter-descriptor.yml b/megalinter/descriptors/dart.megalinter-descriptor.yml index 166f81f1669..72e7e78772b 100644 --- a/megalinter/descriptors/dart.megalinter-descriptor.yml +++ b/megalinter/descriptors/dart.megalinter-descriptor.yml @@ -84,16 +84,19 @@ linters: ## stable dart sdk: https://dart.dev/get-dart#release-channels ## install alpine-pkg-glibc (glibc compatibility layer package for Alpine Linux) dockerfile: + - ARG TARGETPLATFORM - |- # renovate: datasource=dart-version depName=dart ARG DART_VERSION='3.8.3' - | - RUN wget --tries=5 https://storage.googleapis.com/dart-archive/channels/stable/release/${DART_VERSION}/sdk/dartsdk-linux-x64-release.zip -O - -q | unzip -q - \ - && mkdir -p /usr/lib/dart \ - && mv dart-sdk/* /usr/lib/dart/ \ - && chmod +x /usr/lib/dart/bin/dart \ - && rm -r dart-sdk/ - - ENV PATH="/usr/lib/dart/bin:${PATH}" + RUN case ${TARGETPLATFORM} in \ + "linux/amd64") DART_ARCH=x64 ;; \ + "linux/arm64") DART_ARCH=arm64 ;; \ + esac \ + && wget --tries=5 https://storage.googleapis.com/dart-archive/channels/stable/release/${DART_VERSION}/sdk/dartsdk-linux-${DART_ARCH}-release.zip -O - -q | unzip -q - \ + && chmod +x dart-sdk/bin/dart* \ + && mv dart-sdk/bin/* /usr/bin/ && mv dart-sdk/lib/* /usr/lib/ && mv dart-sdk/include/* /usr/include/ \ + && rm -r dart-sdk/ ide: idea: - name: dart-jetbrains-plugin diff --git a/megalinter/descriptors/dockerfile.megalinter-descriptor.yml b/megalinter/descriptors/dockerfile.megalinter-descriptor.yml index 4e766775863..831ee718c03 100644 --- a/megalinter/descriptors/dockerfile.megalinter-descriptor.yml +++ b/megalinter/descriptors/dockerfile.megalinter-descriptor.yml @@ -73,6 +73,10 @@ linters: ARG DOCKERFILE_HADOLINT_VERSION=v2.14.0-alpine - FROM hadolint/hadolint:${DOCKERFILE_HADOLINT_VERSION} AS hadolint - COPY --link --from=hadolint /bin/hadolint /usr/bin/hadolint + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: vscode: - name: hadolint diff --git a/megalinter/descriptors/editorconfig.megalinter-descriptor.yml b/megalinter/descriptors/editorconfig.megalinter-descriptor.yml index fa18d47e01b..166055fe3cd 100644 --- a/megalinter/descriptors/editorconfig.megalinter-descriptor.yml +++ b/megalinter/descriptors/editorconfig.megalinter-descriptor.yml @@ -42,3 +42,7 @@ linters: ARG EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION=v3.6.0 - FROM mstruebing/editorconfig-checker:${EDITORCONFIG_EDITORCONFIG_CHECKER_VERSION} AS editorconfig-checker - COPY --link --from=editorconfig-checker /usr/bin/ec /usr/bin/editorconfig-checker + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 diff --git a/megalinter/descriptors/env.megalinter-descriptor.yml b/megalinter/descriptors/env.megalinter-descriptor.yml index 0506cbc10ae..a2e6ada689c 100644 --- a/megalinter/descriptors/env.megalinter-descriptor.yml +++ b/megalinter/descriptors/env.megalinter-descriptor.yml @@ -45,3 +45,7 @@ linters: # renovate: datasource=github-tags depName=dotenv-linter/dotenv-linter ARG DOTENV_LINTER_VERSION=4.0.0 - RUN wget -q -O - https://raw.githubusercontent.com/dotenv-linter/dotenv-linter/master/install.sh | sh -s -- -b /usr/local/bin "v${DOTENV_LINTER_VERSION}" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 diff --git a/megalinter/descriptors/gherkin.megalinter-descriptor.yml b/megalinter/descriptors/gherkin.megalinter-descriptor.yml index cf4adabbae7..26dcfde989c 100644 --- a/megalinter/descriptors/gherkin.megalinter-descriptor.yml +++ b/megalinter/descriptors/gherkin.megalinter-descriptor.yml @@ -45,3 +45,7 @@ linters: ARG NPM_GHERKIN_LINT_VERSION=4.2.4 npm: - gherkin-lint@${NPM_GHERKIN_LINT_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 diff --git a/megalinter/descriptors/go.megalinter-descriptor.yml b/megalinter/descriptors/go.megalinter-descriptor.yml index be21a45d34d..0dd581c6ab2 100644 --- a/megalinter/descriptors/go.megalinter-descriptor.yml +++ b/megalinter/descriptors/go.megalinter-descriptor.yml @@ -81,6 +81,10 @@ linters: - | RUN wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s "v${GO_GOLANGCI_LINT_VERSION}" \ && golangci-lint --version + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: emacs: - name: flycheck-golandci-lint @@ -154,6 +158,10 @@ linters: ARG GO_REVIVE_VERSION RUN GOBIN=/usr/bin go install github.com/mgechev/revive@$GO_REVIVE_VERSION - COPY --link --from=revive /usr/bin/revive /usr/bin/revive + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: vim: - name: ale diff --git a/megalinter/descriptors/graphql.megalinter-descriptor.yml b/megalinter/descriptors/graphql.megalinter-descriptor.yml index aa371e7b4d6..4122cd35d2b 100644 --- a/megalinter/descriptors/graphql.megalinter-descriptor.yml +++ b/megalinter/descriptors/graphql.megalinter-descriptor.yml @@ -45,3 +45,7 @@ linters: npm: - graphql@${NPM_GRAPHQL_VERSION} - graphql-schema-linter@${NPM_GRAPHQL_SCHEMA_LINTER_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 diff --git a/megalinter/descriptors/groovy.megalinter-descriptor.yml b/megalinter/descriptors/groovy.megalinter-descriptor.yml index 7ecdc6d80e2..da90ea164bd 100644 --- a/megalinter/descriptors/groovy.megalinter-descriptor.yml +++ b/megalinter/descriptors/groovy.megalinter-descriptor.yml @@ -64,6 +64,10 @@ linters: ARG NPM_GROOVY_LINT_VERSION=15.2.2 npm: - npm-groovy-lint@${NPM_GROOVY_LINT_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: vscode: - name: VSCode Groovy Lint diff --git a/megalinter/descriptors/html.megalinter-descriptor.yml b/megalinter/descriptors/html.megalinter-descriptor.yml index e17c183877c..247f4b67b4b 100644 --- a/megalinter/descriptors/html.megalinter-descriptor.yml +++ b/megalinter/descriptors/html.megalinter-descriptor.yml @@ -43,6 +43,10 @@ linters: ARG PIP_DJLINT_VERSION=1.36.4 pip: - djlint==${PIP_DJLINT_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: sublime: - name: SublimeLinter-contrib-djlint @@ -90,6 +94,10 @@ linters: ARG NPM_HTMLHINT_VERSION=1.7.1 npm: - htmlhint@${NPM_HTMLHINT_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: brackets: - name: brackets-htmlhint diff --git a/megalinter/descriptors/java.megalinter-descriptor.yml b/megalinter/descriptors/java.megalinter-descriptor.yml index 95a8d81d703..14e3eb556f9 100644 --- a/megalinter/descriptors/java.megalinter-descriptor.yml +++ b/megalinter/descriptors/java.megalinter-descriptor.yml @@ -5,6 +5,10 @@ descriptor_flavors: - java file_extensions: - ".java" +supported_platforms: + platform: + - linux/amd64 + - linux/arm64 install: apk: - openjdk21 @@ -62,6 +66,10 @@ linters: RUN curl --retry 5 --retry-delay 5 -sSL \ "https://github.com/checkstyle/checkstyle/releases/download/checkstyle-${JAVA_CHECKSTYLE_VERSION}/checkstyle-${JAVA_CHECKSTYLE_VERSION}-all.jar" \ --output /usr/bin/checkstyle + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: eclipse: - name: eclipse-cs @@ -121,3 +129,7 @@ linters: rm pmd-dist-${PMD_VERSION}-bin.zip || echo "Error rm" && \ mv pmd-bin-${PMD_VERSION} /usr/bin/pmd || echo "Error mv" && \ chmod +x /usr/bin/pmd/bin/pmd || echo "Error chmod" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 diff --git a/megalinter/descriptors/javascript.megalinter-descriptor.yml b/megalinter/descriptors/javascript.megalinter-descriptor.yml index 246200646ad..290ea46208c 100644 --- a/megalinter/descriptors/javascript.megalinter-descriptor.yml +++ b/megalinter/descriptors/javascript.megalinter-descriptor.yml @@ -137,6 +137,10 @@ linters: - "@babel/core@${NPM_BABEL_CORE_VERSION}" - "@babel/eslint-parser@${NPM_BABEL_ESLINT_PARSER_VERSION}" - "@microsoft/eslint-formatter-sarif@${NPM_MICROSOFT_ESLINT_FORMATTER_SARIF_VERSION}" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: brackets: - name: brackets-eslint @@ -204,6 +208,10 @@ linters: ARG NPM_STANDARD_VERSION=17.1.2 npm: - standard@${NPM_STANDARD_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: brackets: - name: brackets-standard @@ -269,6 +277,10 @@ linters: ARG NPM_PRETTIER_VERSION=3.6.2 npm: - "prettier@${NPM_PRETTIER_VERSION}" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: emacs: - name: prettier-emacs diff --git a/megalinter/descriptors/json.megalinter-descriptor.yml b/megalinter/descriptors/json.megalinter-descriptor.yml index f9a73a2a248..c75f82129d0 100644 --- a/megalinter/descriptors/json.megalinter-descriptor.yml +++ b/megalinter/descriptors/json.megalinter-descriptor.yml @@ -42,6 +42,10 @@ linters: ARG NPM_PRANTLF_JSONLINT_VERSION=16.0.0 npm: - "@prantlf/jsonlint@${NPM_PRANTLF_JSONLINT_VERSION}" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 # ESLINT-PLUGIN-JSONC - class: EslintLinter disabled: true @@ -159,6 +163,10 @@ linters: - eslint@${NPM_ESLINT_VERSION} - eslint-plugin-jsonc@${NPM_ESLINT_PLUGIN_JSONC_VERSION} - "@microsoft/eslint-formatter-sarif@${NPM_MICROSOFT_ESLINT_FORMATTER_SARIF_VERSION}" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: vscode: - name: vscode-eslint @@ -195,6 +203,10 @@ linters: ARG NPM_V8R_VERSION=5.1.0 npm: - v8r@${NPM_V8R_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: eclipse: - name: native support @@ -251,6 +263,10 @@ linters: ARG NPM_PRETTIER_VERSION=3.6.2 npm: - "prettier@${NPM_PRETTIER_VERSION}" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: emacs: - name: prettier-emacs @@ -333,3 +349,7 @@ linters: npm: - "npm-package-json-lint@${NPM_PACKAGE_JSON_LINT_VERSION}" - "npm-package-json-lint-config-default@${NPM_PACKAGE_JSON_LINT_CONFIG_DEFAULT_VERSION}" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 diff --git a/megalinter/descriptors/jsx.megalinter-descriptor.yml b/megalinter/descriptors/jsx.megalinter-descriptor.yml index 42bc2a6d2cb..8c15e9b2381 100644 --- a/megalinter/descriptors/jsx.megalinter-descriptor.yml +++ b/megalinter/descriptors/jsx.megalinter-descriptor.yml @@ -80,6 +80,10 @@ linters: - eslint-plugin-react@${NPM_ESLINT_PLUGIN_REACT_VERSION} - eslint-plugin-jsx-a11y@${NPM_ESLINT_PLUGIN_JSX_ALLY_VERSION} - "@microsoft/eslint-formatter-sarif@${NPM_MICROSOFT_ESLINT_FORMATTER_SARIF_VERSION}" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: brackets: - name: brackets-eslint diff --git a/megalinter/descriptors/kotlin.megalinter-descriptor.yml b/megalinter/descriptors/kotlin.megalinter-descriptor.yml index 7bd1962c1be..ffce775d19c 100644 --- a/megalinter/descriptors/kotlin.megalinter-descriptor.yml +++ b/megalinter/descriptors/kotlin.megalinter-descriptor.yml @@ -55,6 +55,10 @@ linters: RUN curl --retry 5 --retry-delay 5 -sSLO https://github.com/pinterest/ktlint/releases/download/${KTLINT_VERSION}/ktlint && \ chmod a+x ktlint && \ mv "ktlint" /usr/bin/ + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: emacs: - name: flycheck-kotlin diff --git a/megalinter/descriptors/kubernetes.megalinter-descriptor.yml b/megalinter/descriptors/kubernetes.megalinter-descriptor.yml index 38b56c602b1..1690908f1d8 100644 --- a/megalinter/descriptors/kubernetes.megalinter-descriptor.yml +++ b/megalinter/descriptors/kubernetes.megalinter-descriptor.yml @@ -57,7 +57,10 @@ linters: ARG KUBERNETES_KUBECONFORM_VERSION=v0.7.0-alpine - FROM ghcr.io/yannh/kubeconform:${KUBERNETES_KUBECONFORM_VERSION} AS kubeconform - COPY --link --from=kubeconform /kubeconform /usr/bin/ - + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 # HELM LINT - linter_name: helm name: KUBERNETES_HELM @@ -96,6 +99,10 @@ linters: install: apk: - helm + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 # KUBESCAPE - class: KubescapeLinter linter_name: kubescape @@ -154,3 +161,7 @@ linters: - |- RUN ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2 && \ curl --retry 5 --retry-delay 5 -sLv https://raw.githubusercontent.com/kubescape/kubescape/master/install.sh | /bin/bash -s -- -v "v${KUBERNETES_KUBESCAPE_VERSION}" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 diff --git a/megalinter/descriptors/latex.megalinter-descriptor.yml b/megalinter/descriptors/latex.megalinter-descriptor.yml index d662a80a30d..a0ef42c1647 100644 --- a/megalinter/descriptors/latex.megalinter-descriptor.yml +++ b/megalinter/descriptors/latex.megalinter-descriptor.yml @@ -43,6 +43,9 @@ linters: - FROM ghcr.io/assignuser/chktex-alpine:latest AS chktex - COPY --link --from=chktex /usr/bin/chktex /usr/bin/ - RUN cd ~ && touch .chktexrc && cd / + supported_platforms: + platform: + - linux/amd64 ide: vscode: - name: latex-workshop diff --git a/megalinter/descriptors/lua.megalinter-descriptor.yml b/megalinter/descriptors/lua.megalinter-descriptor.yml index c02d95fcfe5..cfcbbed5ece 100644 --- a/megalinter/descriptors/lua.megalinter-descriptor.yml +++ b/megalinter/descriptors/lua.megalinter-descriptor.yml @@ -59,6 +59,10 @@ linters: && cd .. && rm -r luarocks-${LUA_LUACHECK_VERSION}-super-linter/ \ && luarocks install luacheck \ && cd / + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: brackets: - name: brackets-luacheck diff --git a/megalinter/descriptors/makefile.megalinter-descriptor.yml b/megalinter/descriptors/makefile.megalinter-descriptor.yml index 8af56f1b428..f0b4125cd58 100644 --- a/megalinter/descriptors/makefile.megalinter-descriptor.yml +++ b/megalinter/descriptors/makefile.megalinter-descriptor.yml @@ -56,3 +56,6 @@ linters: dockerfile: - FROM mrtazz/checkmake:latest AS checkmake - COPY --link --from=checkmake /checkmake /usr/bin/checkmake + supported_platforms: + platform: + - linux/amd64 diff --git a/megalinter/descriptors/markdown.megalinter-descriptor.yml b/megalinter/descriptors/markdown.megalinter-descriptor.yml index 172a927beed..043708cd019 100644 --- a/megalinter/descriptors/markdown.megalinter-descriptor.yml +++ b/megalinter/descriptors/markdown.megalinter-descriptor.yml @@ -52,6 +52,10 @@ linters: ARG NPM_MARKDOWNLINT_CLI_VERSION=0.45.0 npm: - markdownlint-cli@${NPM_MARKDOWNLINT_CLI_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: sublime: - name: SublimeLinter-contrib-markdownlint @@ -117,6 +121,10 @@ linters: npm: - remark-cli@${NPM_REMARK_CLI_VERSION} - remark-preset-lint-recommended@${NPM_REMARK_PRESET_LINT_RECOMMENDED_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: sublime: - name: SublimeLinter-contrib-remark-lint @@ -164,6 +172,10 @@ linters: ARG NPM_MARKDOWN_TABLE_FORMATTER_VERSION=1.6.1 npm: - markdown-table-formatter@${NPM_MARKDOWN_TABLE_FORMATTER_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: vscode: - name: Markdown Table Prettify Extension diff --git a/megalinter/descriptors/perl.megalinter-descriptor.yml b/megalinter/descriptors/perl.megalinter-descriptor.yml index bfee6397772..e24949cf962 100644 --- a/megalinter/descriptors/perl.megalinter-descriptor.yml +++ b/megalinter/descriptors/perl.megalinter-descriptor.yml @@ -14,6 +14,10 @@ install: apk: - perl - perl-dev +supported_platforms: + platform: + - linux/amd64 + - linux/arm64 linters: # PERL CRITIC - linter_name: perlcritic @@ -51,3 +55,7 @@ linters: - | RUN curl -fsSL https://raw.githubusercontent.com/skaji/cpm/refs/tags/${PERL_PERLCRITIC_VERSION}/cpm | perl - install -g --show-build-log-on-failure --without-build --without-test --without-runtime Perl::Critic \ && rm -rf /root/.perl-cpm + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 diff --git a/megalinter/descriptors/php.megalinter-descriptor.yml b/megalinter/descriptors/php.megalinter-descriptor.yml index ebca68922e6..f5798567374 100644 --- a/megalinter/descriptors/php.megalinter-descriptor.yml +++ b/megalinter/descriptors/php.megalinter-descriptor.yml @@ -26,6 +26,10 @@ install: - RUN update-alternatives --install /usr/bin/php php /usr/bin/php84 110 - COPY --from=composer/composer:2-bin /composer /usr/bin/composer - ENV PATH="/root/.composer/vendor/bin:${PATH}" +supported_platforms: + platform: + - linux/amd64 + - linux/arm64 linters: # PHPCS - linter_name: phpcs @@ -74,6 +78,10 @@ linters: ARG PHP_BARTLETT_SARIF_PHP_CONVERTERS_VERSION=1.3.1 - | RUN GITHUB_AUTH_TOKEN="$(cat /run/secrets/GITHUB_TOKEN)" && export GITHUB_AUTH_TOKEN && composer global require squizlabs/php_codesniffer:${PHP_SQUIZLABS_PHP_CODESNIFFER_VERSION} bartlett/sarif-php-converters:${PHP_BARTLETT_SARIF_PHP_CONVERTERS_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: idea: - name: phpcs @@ -144,6 +152,10 @@ linters: vscode: - name: vscode-phpstan url: https://marketplace.visualstudio.com/items?itemName=calsmurf2904.vscode-phpstan + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 # PSALM - linter_name: psalm linter_text: | @@ -191,6 +203,10 @@ linters: ARG PHP_VIMEO_PSALM_VERSION=6.13.1 - | RUN GITHUB_AUTH_TOKEN="$(cat /run/secrets/GITHUB_TOKEN)" && export GITHUB_AUTH_TOKEN && composer global require vimeo/psalm:${PHP_VIMEO_PSALM_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: idea: - name: PHPStan / Psalm / Generics @@ -239,6 +255,10 @@ linters: ARG PHP_BARTLETT_SARIF_PHP_CONVERTERS_VERSION=1.3.1 - | RUN GITHUB_AUTH_TOKEN="$(cat /run/secrets/GITHUB_TOKEN)" && export GITHUB_AUTH_TOKEN && composer global require overtrue/phplint:${PHP_OVERTRUE_PHPLINT_VERSION} bartlett/sarif-php-converters:${PHP_BARTLETT_SARIF_PHP_CONVERTERS_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 # PHP-CS-Fixer - linter_name: php-cs-fixer name: PHP_PHPCSFIXER diff --git a/megalinter/descriptors/powershell.megalinter-descriptor.yml b/megalinter/descriptors/powershell.megalinter-descriptor.yml index bfe2dbb2e45..5cb267530d7 100644 --- a/megalinter/descriptors/powershell.megalinter-descriptor.yml +++ b/megalinter/descriptors/powershell.megalinter-descriptor.yml @@ -19,11 +19,16 @@ install: apk: - icu-libs dockerfile: + - ARG TARGETPLATFORM - | # renovate: datasource=github-tags depName=PowerShell/PowerShell ARG POWERSHELL_VERSION=7.5.4 - | - RUN curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-musl-x64.tar.gz -o /tmp/powershell.tar.gz \ + RUN case ${TARGETPLATFORM} in \ + "linux/amd64") POWERSHELL_ARCH=musl-x64 ;; \ + "linux/arm64") POWERSHELL_ARCH=arm64 ;; \ + esac \ + && curl -L https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION}/powershell-${POWERSHELL_VERSION}-linux-${POWERSHELL_ARCH}.tar.gz -o /tmp/powershell.tar.gz \ && mkdir -p /opt/microsoft/powershell/7 \ && tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/7 \ && chmod +x /opt/microsoft/powershell/7/pwsh \ @@ -66,7 +71,17 @@ linters: - | # renovate: datasource=nuget depName=PSScriptAnalyzer registryUrl=https://www.powershellgallery.com/api/v2/ ARG PSSA_VERSION='1.24.0' + # https://stackoverflow.com/a/73711302 + - FROM multiarch/qemu-user-static:x86_64-aarch64 AS qemu + - | + COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ + RUN apk update \ + && apk add libc6-compat - RUN pwsh -c 'Install-Module -Name PSScriptAnalyzer -RequiredVersion ${PSSA_VERSION} -Scope AllUsers -Force' + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: vscode: - name: VSCode PowerShell extension @@ -110,7 +125,17 @@ linters: - | # renovate: datasource=nuget depName=PSScriptAnalyzer registryUrl=https://www.powershellgallery.com/api/v2/ ARG PSSA_VERSION='1.24.0' + # https://stackoverflow.com/a/73711302 + - FROM multiarch/qemu-user-static:x86_64-aarch64 AS qemu + - | + COPY --from=qemu /usr/bin/qemu-aarch64-static /usr/bin/ + RUN apk update \ + && apk add libc6-compat - RUN pwsh -c 'Install-Module -Name PSScriptAnalyzer -RequiredVersion ${PSSA_VERSION} -Scope AllUsers -Force' + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: vscode: - name: VSCode PowerShell extension diff --git a/megalinter/descriptors/protobuf.megalinter-descriptor.yml b/megalinter/descriptors/protobuf.megalinter-descriptor.yml index fc3c0eaed63..9bed37eda40 100644 --- a/megalinter/descriptors/protobuf.megalinter-descriptor.yml +++ b/megalinter/descriptors/protobuf.megalinter-descriptor.yml @@ -45,6 +45,10 @@ linters: ARG PROTOBUF_PROTOLINT_VERSION=0.56.4 - FROM yoheimuta/protolint:${PROTOBUF_PROTOLINT_VERSION} AS protolint - COPY --link --from=protolint /usr/local/bin/protolint /usr/bin/ + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: idea: - name: Protocol Buffer Linter diff --git a/megalinter/descriptors/puppet.megalinter-descriptor.yml b/megalinter/descriptors/puppet.megalinter-descriptor.yml index d2566b209c5..4a17059497a 100644 --- a/megalinter/descriptors/puppet.megalinter-descriptor.yml +++ b/megalinter/descriptors/puppet.megalinter-descriptor.yml @@ -43,6 +43,10 @@ linters: ARG GEM_PUPPET_LINT_VERSION=5.1.1 gem: - puppet-lint:${GEM_PUPPET_LINT_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: vscode: - name: Puppet VSCode Extension diff --git a/megalinter/descriptors/python.megalinter-descriptor.yml b/megalinter/descriptors/python.megalinter-descriptor.yml index bc3f62b3604..499207043cd 100644 --- a/megalinter/descriptors/python.megalinter-descriptor.yml +++ b/megalinter/descriptors/python.megalinter-descriptor.yml @@ -73,6 +73,10 @@ linters: pip: - pylint==${PIP_PYLINT_VERSION} - typing-extensions==${PIP_TYPING_EXTENSIONS_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: eclipse: - name: PyLint @@ -161,6 +165,10 @@ linters: ARG PIP_BLACK_VERSION=25.11.0 pip: - black[jupyter]==${PIP_BLACK_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: emacs: - name: blacken @@ -215,6 +223,10 @@ linters: ARG PIP_FLAKE8_VERSION=7.3.0 pip: - flake8==${PIP_FLAKE8_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: idea: - name: flake8-support @@ -282,6 +294,10 @@ linters: pip: - black==${PIP_BLACK_VERSION} - isort==${PIP_ISORT_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: emacs: - name: py-isort.el @@ -372,6 +388,10 @@ linters: - bandit==${PIP_BANDIT_VERSION} - bandit_sarif_formatter==${PIP_BANDIT_SARIF_FORMATTER_VERSION} - bandit[toml]==${PIP_BANDIT_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: sublime: - name: SublimeLinter-bandit @@ -431,6 +451,10 @@ linters: - ENV MYPY_CACHE_DIR=/tmp # Avoid mypy cache to mess with other linters pip: - mypy==${PIP_MYPY_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: emacs: - name: Flycheck mypy @@ -521,6 +545,10 @@ linters: ARG NPM_PYRIGHT_VERSION=1.1.407 npm: - pyright@${NPM_PYRIGHT_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: emacs: - name: LSP-pyright @@ -588,6 +616,10 @@ linters: ARG PIP_RUFF_VERSION=0.14.7 pip: - ruff==${PIP_RUFF_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: idea: - name: Ruff @@ -649,6 +681,10 @@ linters: ARG PIP_RUFF_VERSION=0.14.7 pip: - ruff==${PIP_RUFF_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: idea: - name: Ruff diff --git a/megalinter/descriptors/r.megalinter-descriptor.yml b/megalinter/descriptors/r.megalinter-descriptor.yml index 74442d24afa..d202782fa24 100644 --- a/megalinter/descriptors/r.megalinter-descriptor.yml +++ b/megalinter/descriptors/r.megalinter-descriptor.yml @@ -50,6 +50,10 @@ linters: && cp -r /usr/lib/R/library/ /home/r-library/ \ && Rscript -e "install.packages(c('lintr','purrr'), repos = 'https://cloud.r-project.org/')" \ && R -e "install.packages(list.dirs('/home/r-library',recursive = FALSE), repos = NULL, type = 'source')" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: emacs: - name: flycheck diff --git a/megalinter/descriptors/raku.megalinter-descriptor.yml b/megalinter/descriptors/raku.megalinter-descriptor.yml index 91ebd1d21ed..2de03b8d59f 100644 --- a/megalinter/descriptors/raku.megalinter-descriptor.yml +++ b/megalinter/descriptors/raku.megalinter-descriptor.yml @@ -48,6 +48,11 @@ linters: && apk add --no-cache --allow-untrusted "rakudo-pkg-Alpine${RAKU_RAKU_ALPINE_VERSION}_${RAKU_RAKU_VERSION}-01_x86_64.apk" \ && rm "rakudo-pkg-Alpine${RAKU_RAKU_ALPINE_VERSION}_${RAKU_RAKU_VERSION}-01_x86_64.apk" - ENV PATH="~/.raku/bin:/opt/rakudo-pkg/bin:/opt/rakudo-pkg/share/perl6/site/bin:$PATH" + supported_platforms: + platform: + - linux/amd64 + # https://github.com/nxadm/rakudo-pkg/issues/96 + #- linux/arm64 ide: vscode: - name: Perl6 Language Support diff --git a/megalinter/descriptors/repository.megalinter-descriptor.yml b/megalinter/descriptors/repository.megalinter-descriptor.yml index 8ca72aded21..7d44dcc0c21 100644 --- a/megalinter/descriptors/repository.megalinter-descriptor.yml +++ b/megalinter/descriptors/repository.megalinter-descriptor.yml @@ -64,6 +64,10 @@ linters: ARG PIP_CHECKOV_VERSION=3.2.495 pip: - checkov==${PIP_CHECKOV_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 test_folder: repository_checkov # DEVSKIM @@ -135,11 +139,14 @@ linters: - RUN apk add --no-cache dotnet9-sdk - ENV PATH="${PATH}:/root/.dotnet/tools" - RUN dotnet tool install --allow-roll-forward --global Microsoft.CST.DevSkim.CLI --version ${REPOSITORY_DEVSKIM_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: vscode: - name: VSCode DevSkim url: https://marketplace.visualstudio.com/items?itemName=MS-CST-E.vscode-devskim - # DUSTILOCK - class: DustilockLinter linter_name: dustilock @@ -188,7 +195,10 @@ linters: ARG REPOSITORY_DUSTILOCK_VERSION RUN apk add --no-cache git && GOBIN=/usr/bin go install github.com/checkmarx/dustilock@v${REPOSITORY_DUSTILOCK_VERSION} - COPY --link --from=dustilock /usr/bin/dustilock /usr/bin/dustilock - + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 # GIT_DIFF - linter_name: git_diff lint_all_files: true @@ -216,7 +226,10 @@ linters: cli_help_arg_name: "--help" examples: - "git diff --check" - + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 # GITLEAKS - class: GitleaksLinter linter_name: gitleaks @@ -358,6 +371,10 @@ linters: ARG REPOSITORY_GITLEAKS_VERSION=v8.30.0 - FROM zricethezav/gitleaks:${REPOSITORY_GITLEAKS_VERSION} AS gitleaks - COPY --link --from=gitleaks /usr/bin/gitleaks /usr/bin/ + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 variables: - name: REPOSITORY_GITLEAKS_PR_COMMITS_SCAN description: Scan only commits in the current Pull Request/Merge Request @@ -420,6 +437,10 @@ linters: # renovate: datasource=github-tags depName=anchore/grype ARG REPOSITORY_GRYPE_VERSION=0.104.1 - RUN curl -sSfL https://raw.githubusercontent.com/anchore/grype/refs/tags/v${REPOSITORY_GRYPE_VERSION}/install.sh | sh -s -- -b /usr/local/bin + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 test_folder: repository_grype # KICS @@ -484,6 +505,10 @@ linters: - COPY --link --from=kics /app/bin/kics /usr/bin/kics - ENV KICS_QUERIES_PATH=/usr/bin/assets/queries KICS_LIBRARIES_PATH=/usr/bin/assets/libraries - COPY --from=kics /app/bin/assets /usr/bin/assets + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 test_folder: repository_kics # LS-LINT @@ -585,7 +610,10 @@ linters: - secretlint@${NPM_SECRETLINT_VERSION} - "@secretlint/secretlint-rule-preset-recommend@${NPM_SECRETLINT_SECRETLINT_RULE_PRESET_RECOMMEND_VERSION}" - "@secretlint/secretlint-formatter-sarif@${NPM_SECRETLINT_SECRETLINT_FORMATTER_SARIF_VERSION}" - + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 # SEMGREP - class: SemgrepLinter linter_name: semgrep @@ -652,11 +680,14 @@ linters: - name: REPOSITORY_SEMGREP_RULESETS_TYPE description: "MegaLinter semgrep ruleset list preset id . Available values: security" default_value: "" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: vscode: - name: VSCode SemGrep url: https://marketplace.visualstudio.com/items?itemName=semgrep.semgrep - # SYFT - class: SyftLinter linter_name: syft @@ -705,7 +736,10 @@ linters: # renovate: datasource=github-tags depName=anchore/syft ARG REPOSITORY_SYFT_VERSION=1.38.0 - RUN curl -sSfL https://raw.githubusercontent.com/anchore/syft/refs/tags/v${REPOSITORY_SYFT_VERSION}/install.sh | sh -s -- -b /usr/local/bin - + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 # TRIVY - linter_name: trivy class: TrivyLinter @@ -765,6 +799,10 @@ linters: - | RUN wget --tries=5 -q -O - https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin "v${REPOSITORY_TRIVY_VERSION}" \ && (trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress) + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: vscode: - name: VSCode Trivy @@ -826,6 +864,10 @@ linters: - | RUN wget --tries=5 -q -O - https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin "v${REPOSITORY_TRIVY_SBOM_VERSION}" \ && (trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress || trivy image --download-db-only --no-progress) + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: vscode: - name: VSCode Trivy @@ -879,4 +921,8 @@ linters: ARG REPOSITORY_TRUFFLEHOG_VERSION=3.91.2 - FROM trufflesecurity/trufflehog:${REPOSITORY_TRUFFLEHOG_VERSION} AS trufflehog - COPY --link --from=trufflehog /usr/bin/trufflehog /usr/bin/ + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 test_folder: gitleaks diff --git a/megalinter/descriptors/robotframework.megalinter-descriptor.yml b/megalinter/descriptors/robotframework.megalinter-descriptor.yml index 3fc199f3cb0..dcfe8145750 100644 --- a/megalinter/descriptors/robotframework.megalinter-descriptor.yml +++ b/megalinter/descriptors/robotframework.megalinter-descriptor.yml @@ -51,6 +51,10 @@ linters: ARG PIP_ROBOT_FRAMEWORK_ROBOCOP_VERSION=6.11.0 pip: - robotframework-robocop==${PIP_ROBOT_FRAMEWORK_ROBOCOP_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: vscode: - name: RobotCode diff --git a/megalinter/descriptors/rst.megalinter-descriptor.yml b/megalinter/descriptors/rst.megalinter-descriptor.yml index 13b7ec8ea04..08ce73c3e0a 100644 --- a/megalinter/descriptors/rst.megalinter-descriptor.yml +++ b/megalinter/descriptors/rst.megalinter-descriptor.yml @@ -45,6 +45,10 @@ linters: pip: - Pygments==${PIP_PYGMENTS_VERSION} - restructuredtext_lint==${PIP_RESTRUCTUREDTEXT_LINT_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 # rstcheck - linter_name: rstcheck linter_text: | @@ -85,6 +89,10 @@ linters: pip: - click==${PIP_RSTCHECK_CLICK_VERSION} # Downgrade click as 8.2.0 triggers and error - rstcheck[toml,sphinx]==${PIP_RSTCHECK_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: vscode: - name: vscode-restructuredtext @@ -127,3 +135,7 @@ linters: pip: - rstfmt==${PIP_RSTFMT_VERSION} version_extract_regex: "(?<=rstfmt )\\d+(\\.\\d+)+" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 diff --git a/megalinter/descriptors/ruby.megalinter-descriptor.yml b/megalinter/descriptors/ruby.megalinter-descriptor.yml index fde8b2a2ba9..774d4da4579 100644 --- a/megalinter/descriptors/ruby.megalinter-descriptor.yml +++ b/megalinter/descriptors/ruby.megalinter-descriptor.yml @@ -61,6 +61,10 @@ linters: - rubocop-rails:${GEM_RUBOCOP_RAILS_VERSION} - rubocop-rake:${GEM_RUBOCOP_RAKE_VERSION} - rubocop-rspec:${GEM_RUBOCOP_RSPEC_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: brackets: - name: brackets-rubocop diff --git a/megalinter/descriptors/rust.megalinter-descriptor.yml b/megalinter/descriptors/rust.megalinter-descriptor.yml index 6d68fe491d5..95ebf93dc1d 100644 --- a/megalinter/descriptors/rust.megalinter-descriptor.yml +++ b/megalinter/descriptors/rust.megalinter-descriptor.yml @@ -37,6 +37,10 @@ linters: install: cargo: - clippy + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: vscode: - name: rust-analyzer diff --git a/megalinter/descriptors/salesforce.megalinter-descriptor.yml b/megalinter/descriptors/salesforce.megalinter-descriptor.yml index 5fc99cee9c2..3685ea21fd4 100644 --- a/megalinter/descriptors/salesforce.megalinter-descriptor.yml +++ b/megalinter/descriptors/salesforce.megalinter-descriptor.yml @@ -29,6 +29,18 @@ install: # Salesforce DX npm: - "@salesforce/cli@${NPM_SALESFORCE_CLI_VERSION}" +supported_platforms: + platform: + - linux/amd64 + - linux/arm64 + install_override: + - platform: linux/arm64 + install: + dockerfile: + - ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk + - ENV PATH="$JAVA_HOME/bin:${PATH}" + - ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true + - RUN echo y|sfdx plugins:install sfdx-hardis linters: # Code Analyzer Apex - linter_name: code-analyzer-apex @@ -342,6 +354,10 @@ linters: RUN sf plugins install @salesforce/sfdx-scanner@${SALESFORCE_SFDX_SCANNER_VERSION} \ && (npm cache clean --force || true) \ && rm -rf /root/.npm/_cacache + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: eclipse: - name: pmd-eclipse-plugin @@ -428,6 +444,10 @@ linters: RUN sf plugins install @salesforce/sfdx-scanner@${SALESFORCE_SFDX_SCANNER_VERSION} \ && (npm cache clean --force || true) \ && rm -rf /root/.npm/_cacache + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: vscode: - name: Salesforce Extension Pack @@ -505,6 +525,10 @@ linters: RUN sf plugins install @salesforce/sfdx-scanner@${SALESFORCE_SFDX_SCANNER_VERSION} \ && (npm cache clean --force || true) \ && rm -rf /root/.npm/_cacache + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: vscode: - name: Salesforce Extension Pack diff --git a/megalinter/descriptors/scala.megalinter-descriptor.yml b/megalinter/descriptors/scala.megalinter-descriptor.yml index cbfa5d47ba6..dc86250922e 100644 --- a/megalinter/descriptors/scala.megalinter-descriptor.yml +++ b/megalinter/descriptors/scala.megalinter-descriptor.yml @@ -11,6 +11,10 @@ install: - | RUN curl --retry-all-errors --retry 10 -fLo coursier https://git.io/coursier-cli && \ chmod +x coursier +supported_platforms: + platform: + - linux/amd64 + - linux/arm64 linters: # SCALAFIX - linter_name: scalafix @@ -49,3 +53,7 @@ linters: install: dockerfile: - RUN ./coursier install scalafix --quiet --install-dir /usr/bin && rm -rf /root/.cache + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 diff --git a/megalinter/descriptors/schemas/megalinter-descriptor.jsonschema.json b/megalinter/descriptors/schemas/megalinter-descriptor.jsonschema.json index a20edffba19..83e7de28b1c 100644 --- a/megalinter/descriptors/schemas/megalinter-descriptor.jsonschema.json +++ b/megalinter/descriptors/schemas/megalinter-descriptor.jsonschema.json @@ -1320,6 +1320,114 @@ "title": "SARIF default output file", "type": "string" }, + "supported_platforms": { + "$id": "#/properties/linters/items/properties/supported_platforms", + "default": { + "platform": [ + "linux/amd64" + ] + }, + "description": "Specifies the supported target platforms (OS, CPU architecture, CPU variant) for the linters, and optionally overrides install instructions for a specific platform. Uses the same [architecture naming conventions as Docker](https://docs.docker.com/desktop/multi-arch/).", + "examples": [ + { + "platform": [ + "linux/amd64", + "linux/arm64" + ] + }, + { + "platform": [ + "linux/amd64" + ] + }, + { + "install_override": [ + { + "install": { + "dockerfile": [ + "RUN ML_THIRD_PARTY_DIR=\"/third-party/shellcheck\" \\\n && mkdir -p ${ML_THIRD_PARTY_DIR} \\\n && wget -qO- \"https://github.com/koalaman/shellcheck/releases/download/stable/shellcheck-stable.linux.aarch64.tar.xz\" | tar -xJv --directory ${ML_THIRD_PARTY_DIR} \\\n && mv \"${ML_THIRD_PARTY_DIR}/shellcheck-stable/shellcheck\" /usr/bin/ \\\n && find ${ML_THIRD_PARTY_DIR} -type f -not -name 'LICENSE*' -delete -o -type d -empty -delete \\\n && shellcheck --version\n" + ] + }, + "platform": "linux/arm64" + } + ], + "platform": [ + "linux/amd64", + "linux/arm64" + ] + } + ], + "properties": { + "install_override": { + "$id": "#/properties/linters/items/properties/supported_platforms/properties/install_override", + "description": "Defines special installation steps for a specific platform (OS/CPU architecture/CPU variant), replacing the linter's install instructions given in the `install` node for this target platform only.", + "items": { + "properties": { + "install": { + "$id": "#/properties/linters/items/properties/supported_platforms/properties/install_override/items/properties/install", + "$ref": "#/properties/linters/items/properties/install", + "description": "List of apk, dockerfile instructions, npm/pip/gem packages required to install the linter.\nThese special installation steps replace the instructions in the [`linters` > `install`](#linters_items_install) node when using this target platform pair only." + }, + "platform": { + "$id": "#/properties/linters/items/properties/supported_platforms/properties/install_override/items/properties/platform", + "$ref": "#/properties/linters/items/properties/supported_platforms/properties/platform/items", + "default": "linux/arm64", + "description": "Target platform (OS/CPU architecture/CPU variant) to define special installation steps for.", + "examples": [], + "type": "string" + } + }, + "required": [ + "platform", + "install" + ], + "type": "object" + }, + "title": "Installation requirements override", + "type": "array" + }, + "platform": { + "$id": "#/properties/linters/items/properties/supported_platforms/properties/platform", + "default": [ + "linux/amd64" + ], + "description": "The list of target platforms (OS/CPU architecture/CPU Variant) that this linter supports.", + "examples": [ + [ + "linux/amd64", + "linux/arm64" + ], + [ + "linux/amd64" + ] + ], + "items": { + "default": "linux/amd64", + "description": "Target platforms [available to use on Docker](https://github.com/docker-library/bashbrew/blob/master/architecture/oci-platform.go#L16-L29).\n***Please note that Megalinter does not support all Docker's platforms.***", + "enum": [ + "linux/amd64", + "linux/arm64", + "linux/arm/v7", + "linux/arm/v6", + "linux/arm/v5", + "linux/386", + "linux/mips64le", + "linux/ppc64le", + "linux/riscv64", + "linux/s390x", + "windows/amd64" + ], + "title": "Target platform", + "type": "string" + }, + "title": "List of target platforms", + "type": "array", + "uniqueItems": true + } + }, + "title": "Supported platforms", + "type": "object" + }, "test_folder": { "$id": "#/properties/linters/items/test_folder", "description": "Test folder containing _good_ and _bad_ files, if different from parent descriptor test_folder", @@ -1423,6 +1531,116 @@ "title": "Descriptor processing order", "type": "number" }, + "supported_platforms": { + "$id": "#/properties/supported_platforms", + "default": { + "platform": [ + "linux/amd64" + ] + }, + "description": "Specifies the supported target platforms (OS, CPU architecture, CPU variant) for the install of this descriptor, and optionally overrides install instructions for a specific platform. Uses the same [architecture naming conventions as Docker](https://docs.docker.com/desktop/multi-arch/).", + "examples": [ + { + "platform": [ + "linux/amd64", + "linux/arm64" + ] + }, + { + "platform": [ + "linux/amd64" + ] + }, + { + "install_override": [ + { + "install": { + "dockerfile": [ + "ARG PWSH_VERSION='latest'", + "ARG PWSH_DIRECTORY='/opt/microsoft/powershell'", + "RUN mkdir -p ${PWSH_DIRECTORY} \\\n && curl --retry 5 --retry-delay 5 -s https://api.github.com/repos/powershell/powershell/releases/${PWSH_VERSION} \\\n | grep browser_download_url \\\n | grep linux-arm64 \\\n | cut -d '\"' -f 4 \\\n | xargs -n 1 wget -O - \\\n | tar -xzC ${PWSH_DIRECTORY} \\\n && ln -sf ${PWSH_DIRECTORY}/pwsh /usr/bin/pwsh\n" + ] + }, + "platform": "linux/arm64" + } + ], + "platform": [ + "linux/amd64", + "linux/arm64" + ] + } + ], + "properties": { + "install_override": { + "$id": "#/properties/supported_platforms/properties/install_override", + "description": "Defines special installation steps for a specific platform (OS/CPU architecture/CPU variant), replacing the descriptor's install instructions given in the `install` node for this target platform only.", + "items": { + "properties": { + "install": { + "$id": "#/properties/supported_platforms/properties/install_override/items/properties/install", + "$ref": "#/properties/install", + "description": "List of apk, dockerfile instructions, npm/pip/gem packages required to use the descriptor's linters.\nThese special installation steps replace the instructions in the descriptor's [`install`](#install) node when using this target platform pair only." + }, + "platform": { + "$id": "#/properties/supported_platforms/properties/install_override/items/properties/platform", + "$ref": "#/properties/supported_platforms/properties/platform/items", + "default": "linux/arm64", + "description": "Target platform (OS/CPU architecture/CPU variant) to define special installation steps for.", + "examples": [], + "type": "string" + } + }, + "required": [ + "platform", + "install" + ], + "type": "object" + }, + "title": "Installation requirements override", + "type": "array" + }, + "platform": { + "$id": "#/properties/supported_platforms/properties/platform", + "default": [ + "linux/amd64" + ], + "description": "The list of target platforms (OS/CPU architecture/CPU Variant) that this descriptor supports.", + "examples": [ + [ + "linux/amd64", + "linux/arm64" + ], + [ + "linux/amd64" + ] + ], + "items": { + "default": "linux/amd64", + "description": "Target platforms [available to use on Docker](https://github.com/docker-library/bashbrew/blob/master/architecture/oci-platform.go#L16-L29).\n***Please note that Megalinter does not support all Docker's platforms.***", + "enum": [ + "linux/amd64", + "linux/arm64", + "linux/arm/v7", + "linux/arm/v6", + "linux/arm/v5", + "linux/386", + "linux/mips64le", + "linux/ppc64le", + "linux/riscv64", + "linux/s390x", + "windows/amd64" + ], + "title": "Target platform", + "type": "string" + }, + "title": "List of target platforms", + "type": "array", + "uniqueItems": true + } + }, + "title": "Supported platforms", + "type": "object" + }, "test_folder": { "$id": "#/properties/test_folder", "description": "Test folder containing _good_ and _bad_ files. Default: lowercase(descriptor_id)", diff --git a/megalinter/descriptors/snakemake.megalinter-descriptor.yml b/megalinter/descriptors/snakemake.megalinter-descriptor.yml index 5ff4ff6594e..3da35d07690 100644 --- a/megalinter/descriptors/snakemake.megalinter-descriptor.yml +++ b/megalinter/descriptors/snakemake.megalinter-descriptor.yml @@ -42,6 +42,10 @@ linters: ARG PIP_SNAKEMAKE_VERSION=9.13.7 pip: - snakemake==${PIP_SNAKEMAKE_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: idea: - name: SnakeCharm @@ -94,3 +98,7 @@ linters: ARG PIP_SNAKEFMT_VERSION=0.11.2 pip: - snakefmt==${PIP_SNAKEFMT_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 diff --git a/megalinter/descriptors/spell.megalinter-descriptor.yml b/megalinter/descriptors/spell.megalinter-descriptor.yml index 8747a7c7a6b..f1f50adab69 100644 --- a/megalinter/descriptors/spell.megalinter-descriptor.yml +++ b/megalinter/descriptors/spell.megalinter-descriptor.yml @@ -50,6 +50,10 @@ linters: ARG NPM_CSPELL_VERSION=9.3.2 npm: - "cspell@${NPM_CSPELL_VERSION}" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: vscode: - name: Code Spell Checker @@ -98,6 +102,10 @@ linters: ARG PIP_PROSELINT_VERSION=0.14.0 pip: - proselint==${PIP_PROSELINT_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: idea: - name: Proselint @@ -162,6 +170,10 @@ linters: ARG SPELL_VALE_VERSION=v3.13.0 - FROM jdkato/vale:${SPELL_VALE_VERSION} AS vale - COPY --link --from=vale /bin/vale /bin/vale + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: emacs: - name: flymake-vale @@ -258,6 +270,10 @@ linters: ARG SPELL_LYCHEE_VERSION=sha-7c4b132-alpine - FROM lycheeverse/lychee:${SPELL_LYCHEE_VERSION} AS lychee - COPY --link --from=lychee /usr/local/bin/lychee /usr/bin/ + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 # codespell - linter_name: codespell @@ -310,3 +326,7 @@ linters: ARG PIP_CODESPELL_VERSION=2.4.1 pip: - codespell==${PIP_CODESPELL_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 diff --git a/megalinter/descriptors/sql.megalinter-descriptor.yml b/megalinter/descriptors/sql.megalinter-descriptor.yml index b0ef52333c9..3ce5664a42c 100644 --- a/megalinter/descriptors/sql.megalinter-descriptor.yml +++ b/megalinter/descriptors/sql.megalinter-descriptor.yml @@ -53,6 +53,10 @@ linters: ARG PIP_SQLFLUFF_VERSION=3.5.0 pip: - sqlfluff==${PIP_SQLFLUFF_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 # TSQL - linter_name: tsqllint linter_text: | @@ -99,6 +103,10 @@ linters: - RUN apk add --no-cache dotnet9-sdk - ENV PATH="${PATH}:/root/.dotnet/tools" - RUN dotnet tool install --allow-roll-forward --global TSQLLint --version ${SQL_TSQLLINT_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: vscode: - name: TSQL Lint diff --git a/megalinter/descriptors/swift.megalinter-descriptor.yml b/megalinter/descriptors/swift.megalinter-descriptor.yml index 366cf819856..bef988c9577 100644 --- a/megalinter/descriptors/swift.megalinter-descriptor.yml +++ b/megalinter/descriptors/swift.megalinter-descriptor.yml @@ -58,6 +58,10 @@ linters: - |- # renovate: datasource=docker depName=ghcr.io/realm/swiftlint ENV SWIFT_SWIFTLINT_VERSION=0.62.2 + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: idea: - name: swiftlint diff --git a/megalinter/descriptors/tekton.megalinter-descriptor.yml b/megalinter/descriptors/tekton.megalinter-descriptor.yml index fc246643e77..48762fc0a00 100644 --- a/megalinter/descriptors/tekton.megalinter-descriptor.yml +++ b/megalinter/descriptors/tekton.megalinter-descriptor.yml @@ -39,3 +39,7 @@ linters: ARG NPM_IBM_TEKTON_LINT_VERSION=1.1.0 npm: - "@ibm/tekton-lint@${NPM_IBM_TEKTON_LINT_VERSION}" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 diff --git a/megalinter/descriptors/terraform.megalinter-descriptor.yml b/megalinter/descriptors/terraform.megalinter-descriptor.yml index 217f483c4a0..b9e36d1588f 100644 --- a/megalinter/descriptors/terraform.megalinter-descriptor.yml +++ b/megalinter/descriptors/terraform.megalinter-descriptor.yml @@ -72,7 +72,10 @@ linters: ARG TERRAFORM_TFLINT_VERSION=0.60.0 - FROM ghcr.io/terraform-linters/tflint:v${TERRAFORM_TFLINT_VERSION} AS tflint - COPY --link --from=tflint /usr/local/bin/tflint /usr/bin/ - + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 # TERRASCAN - class: TerrascanLinter linter_name: terrascan @@ -128,7 +131,10 @@ linters: ARG TERRAFORM_TERRASCAN_VERSION=1.19.9 - FROM tenable/terrascan:${TERRAFORM_TERRASCAN_VERSION} AS terrascan - COPY --link --from=terrascan /go/bin/terrascan /usr/bin/ - + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 # TERRAGRUNT - linter_name: terragrunt linter_text: | @@ -182,7 +188,10 @@ linters: ARG TERRAFORM_TERRAGRUNT_VERSION=1.14.0 - FROM alpine/terragrunt:${TERRAFORM_TERRAGRUNT_VERSION} AS terragrunt - COPY --link --from=terragrunt /usr/local/bin/terragrunt /usr/bin/ - + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 # TERRAFORM_FMT - linter_name: terraform-fmt linter_text: | @@ -224,6 +233,10 @@ linters: ARG TERRAFORM_TERRAGRUNT_VERSION=1.14.0 - FROM alpine/terragrunt:${TERRAFORM_TERRAGRUNT_VERSION} AS terragrunt - COPY --link --from=terragrunt /bin/terraform /usr/bin/ + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: idea: - name: HashiCorp Terraform / HCL language support diff --git a/megalinter/descriptors/tsx.megalinter-descriptor.yml b/megalinter/descriptors/tsx.megalinter-descriptor.yml index ef0a8b9a70d..e0c95c8eb55 100644 --- a/megalinter/descriptors/tsx.megalinter-descriptor.yml +++ b/megalinter/descriptors/tsx.megalinter-descriptor.yml @@ -115,6 +115,10 @@ linters: - "@typescript-eslint/eslint-plugin@${NPM_TYPESCRIPT_ESLINT_ESLINT_PLUGIN_VERSION}" - "@typescript-eslint/parser@${NPM_TYPESCRIPT_ESLINT_PARSER_VERSION}" - "@microsoft/eslint-formatter-sarif@${NPM_MICROSOFT_ESLINT_FORMATTER_SARIF_VERSION}" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: brackets: - name: brackets-eslint diff --git a/megalinter/descriptors/typescript.megalinter-descriptor.yml b/megalinter/descriptors/typescript.megalinter-descriptor.yml index 0fd6ee2a342..239fb0de3e1 100644 --- a/megalinter/descriptors/typescript.megalinter-descriptor.yml +++ b/megalinter/descriptors/typescript.megalinter-descriptor.yml @@ -132,6 +132,10 @@ linters: - "@typescript-eslint/eslint-plugin@${NPM_TYPESCRIPT_ESLINT_ESLINT_PLUGIN_VERSION}" - "@typescript-eslint/parser@${NPM_TYPESCRIPT_ESLINT_PARSER_VERSION}" - "@microsoft/eslint-formatter-sarif@${NPM_MICROSOFT_ESLINT_FORMATTER_SARIF_VERSION}" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: brackets: - name: brackets-eslint @@ -198,6 +202,10 @@ linters: ARG NPM_TS_STANDARD_VERSION=12.0.2 npm: - ts-standard@${NPM_TS_STANDARD_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: idea: - name: native support @@ -260,6 +268,10 @@ linters: ARG NPM_PRETTIER_VERSION=3.6.2 npm: - "prettier@${NPM_PRETTIER_VERSION}" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: emacs: - name: prettier-emacs diff --git a/megalinter/descriptors/vbdotnet.megalinter-descriptor.yml b/megalinter/descriptors/vbdotnet.megalinter-descriptor.yml index 1e2ad922e28..eeafc274ceb 100644 --- a/megalinter/descriptors/vbdotnet.megalinter-descriptor.yml +++ b/megalinter/descriptors/vbdotnet.megalinter-descriptor.yml @@ -55,3 +55,7 @@ linters: - "dotnet format Folder/Solution.sln --verify-no-changes" - "dotnet format Project.vbproj --verify-no-changes" - "dotnet format" # Fix + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 diff --git a/megalinter/descriptors/xml.megalinter-descriptor.yml b/megalinter/descriptors/xml.megalinter-descriptor.yml index fe169799f02..011a305da46 100644 --- a/megalinter/descriptors/xml.megalinter-descriptor.yml +++ b/megalinter/descriptors/xml.megalinter-descriptor.yml @@ -50,3 +50,7 @@ linters: - libxml2-dev - libxml2-utils - libgcc + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 diff --git a/megalinter/descriptors/yaml.megalinter-descriptor.yml b/megalinter/descriptors/yaml.megalinter-descriptor.yml index 86ec98faca4..2759ec10622 100644 --- a/megalinter/descriptors/yaml.megalinter-descriptor.yml +++ b/megalinter/descriptors/yaml.megalinter-descriptor.yml @@ -54,6 +54,10 @@ linters: ARG NPM_PRETTIER_VERSION=3.6.2 npm: - "prettier@${NPM_PRETTIER_VERSION}" + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: emacs: - name: prettier-emacs @@ -123,6 +127,10 @@ linters: ARG PIP_YAMLLINT_VERSION=1.37.1 pip: - yamllint==${PIP_YAMLLINT_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: emacs: - name: flycheck @@ -165,6 +173,10 @@ linters: ARG NPM_V8R_VERSION=5.1.0 npm: - v8r@${NPM_V8R_VERSION} + supported_platforms: + platform: + - linux/amd64 + - linux/arm64 ide: eclipse: - name: native support diff --git a/trivy-secret.yaml b/trivy-secret.yaml index 9301d6aff32..c292d0462a3 100644 --- a/trivy-secret.yaml +++ b/trivy-secret.yaml @@ -1,2 +1,3 @@ +--- disable-rules: - alibaba-access-key-id