From 3ef8c2c32ea7747f8ceb06596f31f49568f933fa Mon Sep 17 00:00:00 2001 From: Pierre Date: Wed, 29 Jul 2020 16:53:53 +0200 Subject: [PATCH] SONAR-13740 Run GitLab ITs on on-premise gitlab container --- .cirrus.yml | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/.cirrus.yml b/.cirrus.yml index 2f580b07252..cd9b67f4b51 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -194,6 +194,51 @@ qa_ha_task: path: "**/test-results/**/*.xml" format: junit +# GitLab QA is executed in a dedicated task in order to not slow down the pipeline, as a GitLab on-prem server docker image is required. +qa_gitlab_task: + depends_on: build + # Comment the following line and commit with message "DO NOT MERGE" in order to run + # this task on your branch + only_if: $CIRRUS_BRANCH == "branch-nightly-build" + gke_container: + dockerfile: private/docker/Dockerfile-build + builder_image_project: ci-cd-215716 + builder_image_name: docker-builder-v1 + cluster_name: cirrus-uscentral1a-cluster + zone: us-central1-a + namespace: default + cpu: 2.4 + memory: 5Gb + additional_containers: + - name: gitlab + image: gitlab/gitlab-ce:latest + port: 8080:80 + cpu: 1 + memory: 5Gb + env: + # Creating a personnal access token from rails console for test purpuse (can't do through gitlab REST API) + GITLAB_POST_RECONFIGURE_SCRIPT: "gitlab-rails runner \"token = User.find_by_username('root').personal_access_tokens.create(scopes: [:api], name: 'token'); token.set_token('token-here-456'); token.save!\"" + env: + # No need to clone the full history. + # Depth of 1 is not enough because it would fail the build in case of consecutive pushes + # (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!") + CIRRUS_CLONE_DEPTH: 50 + QA_CATEGORY: GITLAB + gradle_cache: + folder: ~/.gradle/caches + script: + - ./private/cirrus/cirrus-qa.sh h2 + cleanup_before_cache_script: + - ./private/cirrus/cleanup-gradle-cache.sh + on_failure: + reports_artifacts: + path: "**/build/reports/**/*" + screenshots_artifacts: + path: "**/build/screenshots/**/*" + junit_artifacts: + path: "**/test-results/**/*.xml" + format: junit + # SAML QA is executed in a dedicated task in order to not slow down the pipeline, as a Keycloak server docker image is required. qa_saml_task: depends_on: build -- 2.39.5