From 59eb8b45a8bf94aebfe4bbeab132b9a4226c73e2 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Tue, 27 Aug 2024 12:31:02 +0600 Subject: [PATCH 1/9] import new templates import: - mr-review-tools.yml - populate-code-climate-config.yml --- .gitlab-ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7f6762a1..753ea444 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,6 +6,12 @@ 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: "populate-code-climate-config.yml" .deploy:nextcloud-app-by-checkout: script: -- GitLab From 18a0d255180fa44c89e696858f64b2c2e45c61f1 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Tue, 27 Aug 2024 12:32:38 +0600 Subject: [PATCH 2/9] exit on fail --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 753ea444..b6761783 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -15,11 +15,13 @@ include: .deploy:nextcloud-app-by-checkout: script: + - set -e # print var to confirm - echo "Deploying $APP_NAME to $CI_ENVIRONMENT_NAME ($DEPLOYMENT_HOST)" # 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} sudo rsync -avzh --chown www-data:www-data --delete --exclude '.git*' /tmp/${CI_JOB_ID}/${APP_NAME}/ ${DEPLOYMENT_PATH}/html/themes/${APP_NAME}/ docker exec -u www-data $CONTAINER_NAME /usr/local/bin/php /var/www/html/occ maintenance:theme:update -- GitLab From b6a7e4dc7f08183f8f877ae386a7428db3414e63 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Tue, 27 Aug 2024 12:43:44 +0600 Subject: [PATCH 3/9] fix file name --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b6761783..d29dbc74 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,7 +11,7 @@ include: file: "mr-review-tools.yml" - project: "e/infra/ecloud/nextcloud-apps/ci-templates" ref: dev/1789-setup-mr-review-tools-in-gitlab - file: "populate-code-climate-config.yml" + file: "populate-code-climate-default-config.yml" .deploy:nextcloud-app-by-checkout: script: -- GitLab From b848375ed8c363c4239b185add747274d7826632 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Tue, 27 Aug 2024 12:44:56 +0600 Subject: [PATCH 4/9] also add the needed git-operations.yml template --- .gitlab-ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d29dbc74..2d40750d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,6 +9,9 @@ include: - 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" -- GitLab From d8ebbd846099bc0bb67bba473020ac4352fdefea Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Tue, 27 Aug 2024 12:57:29 +0600 Subject: [PATCH 5/9] replace ' with " --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2d40750d..ce68d1a7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,9 +3,9 @@ variables: # Deploy stage include: - - project: 'e/infra/ecloud/nextcloud-apps/ci-templates' + - project: "e/infra/ecloud/nextcloud-apps/ci-templates" ref: main - file: 'nc-apps-checkout-deploy.yml' + 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" -- GitLab From d29659cd83298a4bf17dad979ab3bda101b87f9d Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Tue, 27 Aug 2024 12:57:53 +0600 Subject: [PATCH 6/9] add stages --- .gitlab-ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ce68d1a7..4c9dbb10 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,3 +1,9 @@ +stages: + - test + - performance + - dast + - deploy + variables: APP_NAME: eCloud -- GitLab From 1af27e816539647beac7893e0c00d368cc6ddbd1 Mon Sep 17 00:00:00 2001 From: erobot Date: Wed, 28 Aug 2024 08:15:48 +0000 Subject: [PATCH 7/9] Automatic Update of .codeclimate.yml at 2024-08-28-08-15-48 via CI/CD Refs: - https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/nextcloud-theme/-/pipelines/429461 - https://gitlab.e.foundation/e/infra/ecloud/nextcloud-apps/nextcloud-theme/-/jobs/997873 --- .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 00000000..c820af6b --- /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 From b174203fb209715f3a146ccf04df809dcc05b72b Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Fri, 20 Sep 2024 12:58:01 +0600 Subject: [PATCH 8/9] 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 4c9dbb10..b8602536 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,13 +13,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 fa0de04063aa85df02fb8978a3bf0201ff15f0d2 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Fri, 20 Sep 2024 19:19:30 +0600 Subject: [PATCH 9/9] Trigger CI -- GitLab