diff --git a/Dockerfile b/Dockerfile index f24358d4..093fd5eb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.14 +FROM alpine:3.15 RUN apk --no-cache add \ bash \ @@ -21,21 +21,28 @@ ARG yamale_version=4.0.0 LABEL yamale_version=$yamale_version RUN pip install "yamale==$yamale_version" +ARG TARGETPLATFORM # Install kubectl -ARG kubectl_version=v1.21.5 +ARG kubectl_version=v1.22.5 LABEL kubectl_version=$kubectl_version -RUN curl -LO "https://storage.googleapis.com/kubernetes-release/release/$kubectl_version/bin/linux/amd64/kubectl" && \ +RUN curl -LO "https://storage.googleapis.com/kubernetes-release/release/$kubectl_version/bin/$TARGETPLATFORM/kubectl" && \ chmod +x kubectl && \ mv kubectl /usr/local/bin/ # Install Helm ARG helm_version=v3.7.2 LABEL helm_version=$helm_version -RUN curl -LO "https://get.helm.sh/helm-$helm_version-linux-amd64.tar.gz" && \ - mkdir -p "/usr/local/helm-$helm_version" && \ - tar -xzf "helm-$helm_version-linux-amd64.tar.gz" -C "/usr/local/helm-$helm_version" && \ - ln -s "/usr/local/helm-$helm_version/linux-amd64/helm" /usr/local/bin/helm && \ - rm -f "helm-$helm_version-linux-amd64.tar.gz" +RUN targetArch=$(echo $TARGETPLATFORM | cut -f2 -d '/') \ + && if [ ${targetArch} = "amd64" ]; then \ + HELM_ARCH="linux-amd64"; \ +elif [ ${targetArch} = "arm64" ]; then \ + HELM_ARCH="linux-arm64"; \ +fi \ + && curl -LO "https://get.helm.sh/helm-$helm_version-$HELM_ARCH.tar.gz" \ + && mkdir -p "/usr/local/helm-$helm_version" \ + && tar -xzf "helm-$helm_version-$HELM_ARCH.tar.gz" -C "/usr/local/helm-$helm_version" \ + && ln -s "/usr/local/helm-$helm_version/$HELM_ARCH/helm" /usr/local/bin/helm \ + && rm -f "helm-$helm_version-$HELM_ARCH.tar.gz" COPY ./etc/chart_schema.yaml /etc/ct/chart_schema.yaml COPY ./etc/lintconf.yaml /etc/ct/lintconf.yaml diff --git a/pkg/chart/integration_test.go b/pkg/chart/integration_test.go index 330a40ba..0132963e 100644 --- a/pkg/chart/integration_test.go +++ b/pkg/chart/integration_test.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build integration // +build integration package chart