Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUILD-3176 Use SonarSource CI infrastructure for tests #648

Merged
merged 1 commit into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,10 @@ env:


vm_instance_template: &VM_TEMPLATE
experimental: true # see https://github.com/cirruslabs/cirrus-ci-docs/issues/1051
image: docker-builder-v*
type: t2.small
region: eu-central-1
subnet_id: ${CIRRUS_AWS_SUBNET}
disk: 10
cpu: 4
memory: 16G


multi_arch_build_task:
Expand Down Expand Up @@ -112,12 +108,16 @@ public_scan_task:
- docker pull "${PUBLIC_IMAGE_NAME}:${tag}"
- java -jar wss-unified-agent.jar -c .cirrus/wss-unified-agent.config -apiKey $MEND_API_KEY -product ${WS_PRODUCTNAME} -project ${PUBLIC_IMAGE_NAME}:${tag} -wss.url ${WS_WSS_URL} -docker.scanImages true

multi_arch_test_docker_builder:
multi_arch_test_task:
matrix:
- env:
CIRRUS_ARCH: arm64
INSTANCE_TYPE: t4g.large
AMI_NAME: docker-builder-arm64-v*
- env:
CIRRUS_ARCH: amd64
INSTANCE_TYPE: t3.large
AMI_NAME: docker-builder-v*
env:
matrix:
- test_name: docker
Expand All @@ -136,10 +136,16 @@ multi_arch_test_docker_builder:
tag: $CURRENT_VERSION-enterprise
- test_name: docker-compose
tag: $CURRENT_VERSION-datacenter
ec2_instance:
<<: *VM_TEMPLATE
image: ${AMI_NAME}
type: ${INSTANCE_TYPE}
architecture: ${CIRRUS_ARCH}
login_script:
- docker login --username $DOCKER_USERNAME --password $DOCKER_PASSWORD
test_script:
- echo "Test the ${STAGING_IMAGE_NAME}:${tag} image supporting linux/${CIRRUS_ARCH}"
- sysctl -w vm.max_map_count=524288 # set the recommended memory for ES
- ulimit -n 131072 # set the recommended number of opened file descriptors for ES
- ./run-tests.sh "${STAGING_IMAGE_NAME}:${tag}" "${test_name}"
depends_on: multi_arch_build
4 changes: 2 additions & 2 deletions run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ sanity_check_image() {
cd $test_compose_path
export PORT=$port
export IMAGE=$1
docker-compose up -d sonarqube
docker compose up -d sonarqube
if wait_for_sonarqube_dce "$image"; then
info "$image-app: OK !"
result=ok
Expand All @@ -126,7 +126,7 @@ sanity_check_image() {
fi

info "$image-app: stopping container stack"
docker-compose stop
docker compose stop

[[ $result == ok ]]
fi
Expand Down