Skip to content

Commit

Permalink
SONAR-21408 run static test in PR
Browse files Browse the repository at this point in the history
  • Loading branch information
jCOTINEAU committed Jan 16, 2024
1 parent 1f78250 commit fd171ff
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 37 deletions.
21 changes: 21 additions & 0 deletions .cirrus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,25 @@ clone_script_template: &CLONE_SCRIPT_TEMPLATE
git reset --hard $CIRRUS_CHANGE_IN_REPO
fi
chart_static_testing_task:
<<: *ONLY_ON_NON_RELEASE_DRAFT_TEMPLATE
timeout_in: 30m
eks_container:
<<: *CONTAINER_TEMPLATE
cpu: 1
memory: 1Gb
<<: *CLONE_SCRIPT_TEMPLATE
script:
- helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
- helm repo add bitnami https://charts.bitnami.com/bitnami
- helm repo add bitnami-pre2022 https://raw.githubusercontent.com/bitnami/charts/pre-2022/bitnami
- cd ${CIRRUS_WORKING_DIR}/charts/sonarqube
- helm dependency build
- ../../.cirrus/unit_helm_compatibility_test.sh
- cd ${CIRRUS_WORKING_DIR}/charts/sonarqube-dce
- helm dependency build
- ../../.cirrus/unit_helm_compatibility_test.sh

chart_testing_task:
<<: *ONLY_ON_NON_RELEASE_DRAFT_TEMPLATE
timeout_in: 30m
Expand Down Expand Up @@ -74,6 +93,8 @@ chart_testing_task:
- ct install --config test.yaml --all
artifacthub_lint_script:
- ah lint
depends_on:
- chart_static_testing

chart_packaging_task:
<<: *ONLY_ON_NON_RELEASE_DRAFT_TEMPLATE
Expand Down
12 changes: 11 additions & 1 deletion .cirrus/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ ARG AH_VERSION=1.16.0
ARG AH_CHECKSUM="d5955b409361922f609c261bf4b124c4d8ecd294cf85e5fee11c2ba774d45366"
ARG YQ_VERSION=4.35.2
ARG YQ_CHECKSUM="8afd786b3b8ba8053409c5e7d154403e2d4ed4cf3e93c237462dc9ef75f38c8d"
ARG KUBECONFORM_VERSION=0.6.4
ARG KUBECONFORM_CHECKSUM="2b4ebeaa4d5ac4843cf8f7b7e66a8874252b6b71bc7cbfc4ef1cbf85acec7c07"

ENV HELM_BASE_URL="https://get.helm.sh"
ENV HELM_TAR_FILE="helm-v${HELM_VERSION}-linux-amd64.tar.gz"
Expand Down Expand Up @@ -92,6 +94,14 @@ RUN set -eux; \
chmod +x ./yq_linux_amd64 ; \
mv ./yq_linux_amd64 /usr/bin/yq

RUN set -eux; \
curl -LO https://github.com/yannh/kubeconform/releases/download/v${KUBECONFORM_VERSION}/kubeconform-linux-amd64.tar.gz ; \
echo "${KUBECONFORM_CHECKSUM} kubeconform-linux-amd64.tar.gz" | sha256sum -c ; \
tar -xf kubeconform-linux-amd64.tar.gz ; \
chmod +x ./kubeconform ; \
mv ./kubeconform /usr/bin/kubeconform ; \
rm kubeconform-linux-amd64.tar.gz

COPY --from=tools /usr/local/bin/cirrus-env /usr/local/bin/cirrus-env
COPY --from=tools /usr/bin/gh /usr/local/bin/gh
COPY --from=tools /usr/local/bin/gh /usr/local/bin/gh
COPY --from=tools /home/sonarsource/.m2/settings-public.xml /root/.m2/settings-public.xml
36 changes: 0 additions & 36 deletions .github/workflows/static-test.yml

This file was deleted.

0 comments on commit fd171ff

Please sign in to comment.