From 4f88e324cf7052c78cd1a485bd024b5adcce63a0 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Mon, 2 Sep 2024 20:38:15 +0600 Subject: [PATCH 1/5] add stages --- .gitlab-ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e7d8d0e..35d7aa3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,3 +1,9 @@ +stages: + - test + - performance + - dast + - deploy + include: - project: "e/infra/ecloud/nextcloud-apps/ci-templates" ref: main -- GitLab From 2b733262f5f901fe52d06f41901cddfcb2cefce9 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Mon, 2 Sep 2024 20:38:27 +0600 Subject: [PATCH 2/5] add mr-review-tools --- .gitlab-ci.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 35d7aa3..91d3cdc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,6 +8,15 @@ include: - project: "e/infra/ecloud/nextcloud-apps/ci-templates" ref: main file: "nc-apps-checkout-deploy.yml" + - project: "e/infra/ecloud/nextcloud-apps/ci-templates" + ref: dev/1789-setup-mr-review-tools-in-gitlab + file: "mr-review-tools.yml" + - project: "e/infra/ecloud/nextcloud-apps/ci-templates" + ref: dev/1789-setup-mr-review-tools-in-gitlab + file: "git-operations.yml" + - project: "e/infra/ecloud/nextcloud-apps/ci-templates" + ref: dev/1789-setup-mr-review-tools-in-gitlab + file: "populate-code-climate-default-config.yml" .deploy:nextcloud-app-by-checkout: script: -- GitLab From a2609ad07baa5e2e956b016ae284494c4624e32d Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Mon, 2 Sep 2024 20:39:21 +0600 Subject: [PATCH 3/5] exit on failure --- .gitlab-ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 91d3cdc..ef012d7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -20,11 +20,14 @@ include: .deploy:nextcloud-app-by-checkout: script: + # exit on failure + - set -e # print var to confirm - echo "Deploying $APP_NAME to $CI_ENVIRONMENT_NAME ($DEPLOYMENT_HOST):${DEPLOYMENT_PATH}${APP_PATH}" # clone repo to /tmp - | ssh $SSH_USER@$DEPLOYMENT_HOST /bin/bash -s << EOT + set -e git clone --depth 1 $CI_REPOSITORY_URL --branch $CI_COMMIT_REF_NAME --single-branch /tmp/${CI_JOB_ID}/${APP_NAME}/snappymail sudo rsync -avzh --chown www-data:www-data --delete --exclude '.git*' /tmp/${CI_JOB_ID}/${APP_NAME} ${DEPLOYMENT_PATH}${APP_PATH} EOT -- GitLab From 1ea0e50f7c151855a17cf0077b85293ff63c77a8 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Fri, 20 Sep 2024 17:18:24 +0600 Subject: [PATCH 4/5] change ref to main --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ef012d7..a588665 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,13 +9,13 @@ include: ref: main file: "nc-apps-checkout-deploy.yml" - project: "e/infra/ecloud/nextcloud-apps/ci-templates" - ref: dev/1789-setup-mr-review-tools-in-gitlab + ref: main file: "mr-review-tools.yml" - project: "e/infra/ecloud/nextcloud-apps/ci-templates" - ref: dev/1789-setup-mr-review-tools-in-gitlab + ref: main file: "git-operations.yml" - project: "e/infra/ecloud/nextcloud-apps/ci-templates" - ref: dev/1789-setup-mr-review-tools-in-gitlab + ref: main file: "populate-code-climate-default-config.yml" .deploy:nextcloud-app-by-checkout: -- GitLab From f81a648e9f2ea2caf44bbdb4dc830ad7bdc62af5 Mon Sep 17 00:00:00 2001 From: erobot Date: Fri, 20 Sep 2024 11:46:28 +0000 Subject: [PATCH 5/5] Automatic Update of .codeclimate.yml at 2024-09-20-11-46-28 via CI/CD Refs: - https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/snappymail-theme/-/pipelines/435708 - https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/snappymail-theme/-/jobs/1015682 --- .codeclimate.yml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .codeclimate.yml diff --git a/.codeclimate.yml b/.codeclimate.yml new file mode 100644 index 0000000..c820af6 --- /dev/null +++ b/.codeclimate.yml @@ -0,0 +1,8 @@ +plugins: + phpmd: + enabled: true + config: + file_extensions: + - php + - inc + rulesets: "unusedcode,codesize,naming,controversial,design" -- GitLab