From 603b102f41b8a7e3bfab1c7d45cd05da96c455f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorsten=20Ro=C3=9Fner?= Date: Wed, 18 Sep 2024 17:58:16 +0200 Subject: [PATCH] fix(ci): Re-enable e2e test trigger. --- .gitlab-ci.yml | 39 ++++++++++++++++++++++++--------------- docs/ci.md | 5 +++-- 2 files changed, 27 insertions(+), 17 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b21a4376..79cc9f76 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -171,7 +171,16 @@ variables: - "no" TESTS_BRANCH: description: "Branch of E2E-tests on which the test pipeline is triggered" - value: "main" + value: "develop" + TESTS_PROJECT_URL: + description: "Project url for e2e-tests (`/api/v4/projects/`)" + value: "gitlab.opencode.de/api/v4/projects/1506" + TESTS_TESTSET: + description: "Selects testset for E2E-tests" + value: "Smoke" + options: + - "Regression" + - "Smoke" .deploy-common: cache: {} @@ -490,27 +499,27 @@ run-tests: \"ref\": \"${TESTS_BRANCH}\", \ \"token\": \"${CI_JOB_TOKEN}\", \ \"variables\": { \ - \"url\": \"https://portal.${DOMAIN}\", \ + \"operator\": \"${OPERATOR}\", \ + \"cluster\": \"${CLUSTER}\", \ + \"namespace\": \"${NAMESPACE}\", \ + \"url\": \"https://portal.${DOMAIN}/\", \ \"user_name\": \"${DEFAULT_USER_NAME}\", \ \"user_password\": \"${DEFAULT_USER_PASSWORD}\", \ \"admin_name\": \"${DEFAULT_ADMIN_NAME}\", \ \"admin_password\": \"${DEFAULT_ADMIN_PASSWORD}\", \ - \"DEPLOY_ALL_COMPONENTS\": \"${DEPLOY_ALL_COMPONENTS}\", \ - \"DEPLOY_COLLABORA\": \"${DEPLOY_COLLABORA}\", \ - \"DEPLOY_ELEMENT\": \"${DEPLOY_ELEMENT}\", \ - \"DEPLOY_ICS\": \"${DEPLOY_ICS}\", \ - \"DEPLOY_JITSI\": \"${DEPLOY_JITSI}\", \ - \"DEPLOY_KEYCLOAK\": \"${DEPLOY_UMS}\", \ - \"DEPLOY_NEXTCLOUD\": \"${DEPLOY_NEXTCLOUD}\", \ - \"DEPLOY_OPENPROJECT\": \"${DEPLOY_OPENPROJECT}\", \ - \"DEPLOY_OX\": \"${DEPLOY_OX}\", \ - \"DEPLOY_SERVICES\": \"${DEPLOY_SERVICES}\", \ - \"DEPLOY_UCS\": \"${DEPLOY_UMS}\", \ - \"DEPLOY_XWIKI\": \"${DEPLOY_XWIKI}\", \ - \"DEPLOY_PROVISIONING\": \"${DEPLOY_PROVISIONING}\" \ + \"screenshot_test\": \"yes\", \ + \"screenshot_before_step\": \"yes\", \ + \"screenshot_after_step\": \"yes\", \ + \"screenshot_redirect_step\": \"yes\", \ + \"testset\": \"${TESTS_TESTSET}\", \ + \"testprofile\": \"Namespace\", \ + \"gitlab_functional_yaml\": \"https://gitlab.opencode.de/api/v4/projects/1317/repository/files/helmfile%2Fenvironments%2Fdefault%2Ffunctional.yaml?ref=develop\", \ + \"gitlab_env_namespace_template\": \"https://gitlab.opencode.de/api/v4/projects/1564/repository/files/environments%2F{operator}%2F{cluster}%2F{namespace}.yaml.gotmpl?ref=main\", \ + \"gitlab_default_env_namespace\": \"values\" \ } \ }" \ "https://${TESTS_PROJECT_URL}/trigger/pipeline" + retry: 1 avscan-prepare: stage: ".pre" diff --git a/docs/ci.md b/docs/ci.md index f0555faa..feba6a97 100644 --- a/docs/ci.md +++ b/docs/ci.md @@ -33,10 +33,11 @@ You might want to set credential variables in the GitLab project at `Settings` > # Tests The GitLab CI pipeline contains a job named `run-tests` that can trigger a test suite pipeline on another GitLab project. -The `DEPLOY_`-variables are used to determine which components should be tested. In order for the trigger to work, the variable `TESTS_PROJECT_URL` has to be set on this GitLab project's CI variables that can be found at `Settings` -> `CI/CD` -> `Variables`. The variable should have this format: `/api/v4/projects/`. - +To select the current testset, use the variable `TESTS_TESTSET`. Default: `Smoke`. If the branch of the test pipeline is not `main` this can be set with the `.gitlab-ci.yml` variable `TESTS_BRANCH` while creating a new pipeline. + +The variable `testprofile` within the job is set to `Namespace`, which tells the e2e tests to use environment specific settings that will be read from the cluster and namespace specific file in the opendesk-env repository. \ No newline at end of file