Skip to content

Commit

Permalink
SONAR-21409 Fix flakiness by using public runners
Browse files Browse the repository at this point in the history
  • Loading branch information
carminevassallo committed Jan 25, 2024
1 parent 8aa0207 commit 7a383de
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 32 deletions.
61 changes: 34 additions & 27 deletions .cirrus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ only_on_non_release_draft_template: &ONLY_ON_NON_RELEASE_DRAFT_TEMPLATE
only_if: $CIRRUS_PRERELEASE != "true"

docker_build_container_template: &CONTAINER_TEMPLATE
dockerfile: .cirrus/Dockerfile
docker_arguments:
CIRRUS_AWS_ACCOUNT: ${CIRRUS_AWS_ACCOUNT}


docker_build_container_template: &PVT_CONTAINER_TEMPLATE
dockerfile: .cirrus/Dockerfile
docker_arguments:
CIRRUS_AWS_ACCOUNT: ${CIRRUS_AWS_ACCOUNT}
Expand Down Expand Up @@ -44,38 +50,39 @@ clone_script_template: &CLONE_SCRIPT_TEMPLATE
git reset --hard $CIRRUS_CHANGE_IN_REPO
fi
chart_static_compatibility_test_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_static_compatibility_test_task:
# <<: *ONLY_ON_NON_RELEASE_DRAFT_TEMPLATE
# timeout_in: 30m
# 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
eks_container:
container:
<<: *CONTAINER_TEMPLATE
cpu: 2
# privileged: true
cpu: 1
memory: 4Gb
additional_containers:
- name: dockerdaemon
privileged: true
cpu: 4
memory: 16Gb
image: public.ecr.aws/docker/library/docker:dind
# privileged: true
cpu: 1
memory: 4Gb
image: docker:20.10-dind
port: 2375
env:
DOCKER_DRIVER: overlay2
Expand All @@ -91,13 +98,13 @@ chart_testing_task:
- ct install --namespace test --config test.yaml --all
artifacthub_lint_script:
- ah lint
depends_on:
- chart_static_compatibility_test
# depends_on:
# - chart_static_compatibility_test

chart_packaging_task:
<<: *ONLY_ON_NON_RELEASE_DRAFT_TEMPLATE
timeout_in: 15m
eks_container:
container:
<<: *CONTAINER_TEMPLATE
cpu: 2
memory: 1Gb
Expand Down
10 changes: 5 additions & 5 deletions .cirrus/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG CIRRUS_AWS_ACCOUNT
FROM ${CIRRUS_AWS_ACCOUNT}.dkr.ecr.eu-central-1.amazonaws.com/base:j11-latest as tools
# ARG CIRRUS_AWS_ACCOUNT
# FROM ${CIRRUS_AWS_ACCOUNT}.dkr.ecr.eu-central-1.amazonaws.com/base:j11-latest as tools

FROM docker:20.10

Expand Down Expand Up @@ -102,6 +102,6 @@ RUN set -eux; \
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/local/bin/gh /usr/local/bin/gh
COPY --from=tools /home/sonarsource/.m2/settings-public.xml /root/.m2/settings-public.xml
# COPY --from=tools /usr/local/bin/cirrus-env /usr/local/bin/cirrus-env
# 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

0 comments on commit 7a383de

Please sign in to comment.