From c5436739b14cfce064f5853468cc12785608b53e Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Thu, 19 May 2022 12:30:23 +0600 Subject: [PATCH 01/32] add Auto-Deploy-Pipelines.gitlab-ci.yml --- .../Auto-Deploy-Pipelines.gitlab-ci.yml | 73 +++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 lib/gitlab/ci/templates/Auto-Deploy-Pipelines.gitlab-ci.yml diff --git a/lib/gitlab/ci/templates/Auto-Deploy-Pipelines.gitlab-ci.yml b/lib/gitlab/ci/templates/Auto-Deploy-Pipelines.gitlab-ci.yml new file mode 100644 index 0000000..f3ec6b8 --- /dev/null +++ b/lib/gitlab/ci/templates/Auto-Deploy-Pipelines.gitlab-ci.yml @@ -0,0 +1,73 @@ +stages: + - deploy + +.deploy:nextcloud-app: + image: ubuntu:focal + stage: deploy + dependencies: + - build-frontend + before_script: + - mkdir $HOME/.ssh + - chmod 700 ~/.ssh + - echo "$SSH_PRIVATE_KEY_ED" > $HOME/.ssh/id_ed25519 + - echo "$SSH_PUBKEY_ED" > $HOME/.ssh/id_ed25519.pub + - echo "$SSH_KNOWN_HOSTS" > $HOME/.ssh/known_hosts + - chmod 600 ~/.ssh/id_ed25519 + - chmod 644 ~/.ssh/known_hosts ~/.ssh/id_ed25519.pub + - apt-get update && apt-get install -y openssh-client rsync + script: + - echo "Deploying $CI_PROJECT_NAME of $CI_PROJECT_PATH_SLUG to $CI_ENVIRONMENT_NAME ($DEPLOYMENT_HOST)" + - rsync -avzh dist/ $SSH_USER@$DEPLOYMENT_HOST:/tmp/${CI_JOB_ID} + - ssh $SSH_USER@$DEPLOYMENT_HOST "sudo rsync -avzh --chown www-data:www-data --delete /tmp/${CI_JOB_ID}/$CI_PROJECT_NAME ${DEPLOYMENT_PATH}/html/custom_apps/ && rm -rf /tmp/${CI_JOB_ID} && sudo docker exec -u www-data $CONTAINER_NAME /var/www/html/occ app:enable $CI_PROJECT_NAME" + +deploy:dev01: + extends: .deploy:nextcloud-app + when: manual + only: + - /^dev\/.*$/ + - main + environment: + name: dev/01 + url: https://dev.eeo.one/ + variables: + DEPLOYMENT_BRANCH: $CI_COMMIT_BRANCH + CONTAINER_NAME: dev01_nextcloud + +deploy:dev02: + extends: .deploy:nextcloud-app + when: manual + only: + - /^dev\/.*$/ + - main + environment: + name: dev/02 + url: https://ecloud02.dev.eeo.one + variables: + DEPLOYMENT_BRANCH: $CI_COMMIT_BRANCH + CONTAINER_NAME: dev02_nextcloud + +deploy:dev03: + extends: .deploy:nextcloud-app + when: manual + only: + - /^dev\/.*$/ + - main + environment: + name: dev/03 + url: https://ecloud03.dev.eeo.one + variables: + DEPLOYMENT_BRANCH: $CI_COMMIT_BRANCH + CONTAINER_NAME: dev03_nextcloud + +deploy:staging: + extends: .deploy:nextcloud-app + when: manual + only: + - main + - production + environment: + name: staging/01 + url: https://eeo.one + variables: + DEPLOYMENT_BRANCH: $CI_COMMIT_BRANCH + CONTAINER_NAME: nextcloud -- GitLab From 438568ac56f622f5216af56e48445b2a7ed3f366 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Thu, 19 May 2022 12:31:19 +0600 Subject: [PATCH 02/32] include Auto-Deploy-Pipelines --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ded50cf..41f7234 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -42,3 +42,5 @@ build-frontend: artifacts: paths: - dist/email-recovery.tar.gz + +include: 'https://company.com/autodevops-template.yml' -- GitLab From 13f771b5875f7e04232683d6854b6c0f31373507 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Thu, 19 May 2022 12:34:15 +0600 Subject: [PATCH 03/32] =?UTF-8?q?fix=20include=20file=20name=20?= =?UTF-8?q?=F0=9F=A4=A6=E2=80=8D=E2=99=82=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 41f7234..782afc1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -43,4 +43,4 @@ build-frontend: paths: - dist/email-recovery.tar.gz -include: 'https://company.com/autodevops-template.yml' +include: Auto-Deploy-Pipelines.gitlab-ci.yml -- GitLab From be32bd48a169dfee41c2a47299afa75aeffe009c Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Thu, 19 May 2022 12:37:30 +0600 Subject: [PATCH 04/32] fix path for include as it needs '/templates/' before --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 782afc1..b8f249e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -43,4 +43,4 @@ build-frontend: paths: - dist/email-recovery.tar.gz -include: Auto-Deploy-Pipelines.gitlab-ci.yml +include: '/templates/Auto-Deploy-Pipelines.gitlab-ci.yml' -- GitLab From 91fdf9e79d9ded074a295b56315d67abff8671e1 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Thu, 19 May 2022 13:09:52 +0600 Subject: [PATCH 05/32] [skip ci] move Auto-Deploy-Pipelines to Jobs to satisfy lint --- .../ci/templates/{ => Jobs}/Auto-Deploy-Pipelines.gitlab-ci.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename lib/gitlab/ci/templates/{ => Jobs}/Auto-Deploy-Pipelines.gitlab-ci.yml (100%) diff --git a/lib/gitlab/ci/templates/Auto-Deploy-Pipelines.gitlab-ci.yml b/lib/gitlab/ci/templates/Jobs/Auto-Deploy-Pipelines.gitlab-ci.yml similarity index 100% rename from lib/gitlab/ci/templates/Auto-Deploy-Pipelines.gitlab-ci.yml rename to lib/gitlab/ci/templates/Jobs/Auto-Deploy-Pipelines.gitlab-ci.yml -- GitLab From 091d7976c4bdd0cf322b8741f5b4b96907ffe089 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Thu, 19 May 2022 13:23:43 +0600 Subject: [PATCH 06/32] [skip ci] remove stage info from template --- .../ci/templates/Jobs/Auto-Deploy-Pipelines.gitlab-ci.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/gitlab/ci/templates/Jobs/Auto-Deploy-Pipelines.gitlab-ci.yml b/lib/gitlab/ci/templates/Jobs/Auto-Deploy-Pipelines.gitlab-ci.yml index f3ec6b8..d1a8172 100644 --- a/lib/gitlab/ci/templates/Jobs/Auto-Deploy-Pipelines.gitlab-ci.yml +++ b/lib/gitlab/ci/templates/Jobs/Auto-Deploy-Pipelines.gitlab-ci.yml @@ -1,6 +1,3 @@ -stages: - - deploy - .deploy:nextcloud-app: image: ubuntu:focal stage: deploy -- GitLab From d275e4f112e9fcfdd4625c49ae1ba607bbd58ea1 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Thu, 19 May 2022 13:27:04 +0600 Subject: [PATCH 07/32] add deployment state and include template --- .gitlab-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b8f249e..256e0fa 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,6 +2,7 @@ stages: - prepare - test - build + - deploy default: image: node:15.14.0-stretch @@ -43,4 +44,5 @@ build-frontend: paths: - dist/email-recovery.tar.gz -include: '/templates/Auto-Deploy-Pipelines.gitlab-ci.yml' +include: + - local: 'lib/gitlab/ci/templates/Jobs/Auto-Deploy-Pipelines.gitlab-ci.yml' -- GitLab From 941f4e4bcc8eaa95a8418ce3eb477664225bfac6 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Fri, 20 May 2022 16:58:02 +0600 Subject: [PATCH 08/32] include from ci-template dev/template branch --- .gitlab-ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 256e0fa..865cb96 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -45,4 +45,7 @@ build-frontend: - dist/email-recovery.tar.gz include: - - local: 'lib/gitlab/ci/templates/Jobs/Auto-Deploy-Pipelines.gitlab-ci.yml' + # - local: 'lib/gitlab/ci/templates/Jobs/Auto-Deploy-Pipelines.gitlab-ci.yml' + - project: 'nextcloud-apps/ci-templates' + ref: dev/template + file: 'auto-deploy-pipelines.yml' -- GitLab From 4d2ed1984c11cba27ab7c5ac7058b954443f3bb0 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Fri, 20 May 2022 17:04:20 +0600 Subject: [PATCH 09/32] fix project name --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 865cb96..945e9cc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -46,6 +46,6 @@ build-frontend: include: # - local: 'lib/gitlab/ci/templates/Jobs/Auto-Deploy-Pipelines.gitlab-ci.yml' - - project: 'nextcloud-apps/ci-templates' + - project: 'e/infra/selfhost/nextcloud-apps/ci-templates' ref: dev/template file: 'auto-deploy-pipelines.yml' -- GitLab From 98657c84bddb5d3be291c83dc6d981f7bedef37c Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Fri, 20 May 2022 17:13:34 +0600 Subject: [PATCH 10/32] Trigger CI -- GitLab From 67750588bc7707bf46d21ab102eb3220f1384df5 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Fri, 20 May 2022 17:21:32 +0600 Subject: [PATCH 11/32] add deploy stage --- .gitlab-ci.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 945e9cc..e33ef67 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -49,3 +49,12 @@ include: - project: 'e/infra/selfhost/nextcloud-apps/ci-templates' ref: dev/template file: 'auto-deploy-pipelines.yml' + +deploy:dev01: + stage: deploy +deploy:dev02: + stage: deploy +deploy:dev03: + stage: deploy +deploy:staging: + stage: deploy -- GitLab From 8da0afebe9f52711ff9a181f4373bd2e0074762a Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Fri, 20 May 2022 17:24:59 +0600 Subject: [PATCH 12/32] pause rules for install-node-deps --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e33ef67..24faa83 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,9 +22,9 @@ install-node-deps: - npm --version script: - npm ci --cache .npm --prefer-offline - only: - changes: - - package*.json + # only: + # changes: + # - package*.json lint: stage: test -- GitLab From a6db7afca16ace446d40d17dc88fd34cbc5135b3 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Fri, 20 May 2022 17:28:12 +0600 Subject: [PATCH 13/32] go back to local import --- .gitlab-ci.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 24faa83..5d6891e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -45,16 +45,16 @@ build-frontend: - dist/email-recovery.tar.gz include: - # - local: 'lib/gitlab/ci/templates/Jobs/Auto-Deploy-Pipelines.gitlab-ci.yml' - - project: 'e/infra/selfhost/nextcloud-apps/ci-templates' - ref: dev/template - file: 'auto-deploy-pipelines.yml' + - local: 'lib/gitlab/ci/templates/Jobs/Auto-Deploy-Pipelines.gitlab-ci.yml' + # - project: 'e/infra/selfhost/nextcloud-apps/ci-templates' + # ref: dev/template + # file: 'auto-deploy-pipelines.yml' -deploy:dev01: - stage: deploy -deploy:dev02: - stage: deploy -deploy:dev03: - stage: deploy -deploy:staging: - stage: deploy +# deploy:dev01: +# stage: deploy +# deploy:dev02: +# stage: deploy +# deploy:dev03: +# stage: deploy +# deploy:staging: +# stage: deploy -- GitLab From 4e98f8f50557cb96dbe0257990941b0241f10029 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Fri, 20 May 2022 18:02:50 +0600 Subject: [PATCH 14/32] [skip ci] re enable remove include and stage --- .gitlab-ci.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5d6891e..24faa83 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -45,16 +45,16 @@ build-frontend: - dist/email-recovery.tar.gz include: - - local: 'lib/gitlab/ci/templates/Jobs/Auto-Deploy-Pipelines.gitlab-ci.yml' - # - project: 'e/infra/selfhost/nextcloud-apps/ci-templates' - # ref: dev/template - # file: 'auto-deploy-pipelines.yml' + # - local: 'lib/gitlab/ci/templates/Jobs/Auto-Deploy-Pipelines.gitlab-ci.yml' + - project: 'e/infra/selfhost/nextcloud-apps/ci-templates' + ref: dev/template + file: 'auto-deploy-pipelines.yml' -# deploy:dev01: -# stage: deploy -# deploy:dev02: -# stage: deploy -# deploy:dev03: -# stage: deploy -# deploy:staging: -# stage: deploy +deploy:dev01: + stage: deploy +deploy:dev02: + stage: deploy +deploy:dev03: + stage: deploy +deploy:staging: + stage: deploy -- GitLab From fe7fb6527ea44eaf04fee1dd9e0b6593e22fa8dd Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Fri, 20 May 2022 18:07:10 +0600 Subject: [PATCH 15/32] Trigger CI -- GitLab From 04e275a08b59c843fdabaee73d46b9eded77eb11 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Mon, 23 May 2022 15:15:26 +0600 Subject: [PATCH 16/32] remove in favour of remote templates --- .../Jobs/Auto-Deploy-Pipelines.gitlab-ci.yml | 70 ------------------- 1 file changed, 70 deletions(-) delete mode 100644 lib/gitlab/ci/templates/Jobs/Auto-Deploy-Pipelines.gitlab-ci.yml diff --git a/lib/gitlab/ci/templates/Jobs/Auto-Deploy-Pipelines.gitlab-ci.yml b/lib/gitlab/ci/templates/Jobs/Auto-Deploy-Pipelines.gitlab-ci.yml deleted file mode 100644 index d1a8172..0000000 --- a/lib/gitlab/ci/templates/Jobs/Auto-Deploy-Pipelines.gitlab-ci.yml +++ /dev/null @@ -1,70 +0,0 @@ -.deploy:nextcloud-app: - image: ubuntu:focal - stage: deploy - dependencies: - - build-frontend - before_script: - - mkdir $HOME/.ssh - - chmod 700 ~/.ssh - - echo "$SSH_PRIVATE_KEY_ED" > $HOME/.ssh/id_ed25519 - - echo "$SSH_PUBKEY_ED" > $HOME/.ssh/id_ed25519.pub - - echo "$SSH_KNOWN_HOSTS" > $HOME/.ssh/known_hosts - - chmod 600 ~/.ssh/id_ed25519 - - chmod 644 ~/.ssh/known_hosts ~/.ssh/id_ed25519.pub - - apt-get update && apt-get install -y openssh-client rsync - script: - - echo "Deploying $CI_PROJECT_NAME of $CI_PROJECT_PATH_SLUG to $CI_ENVIRONMENT_NAME ($DEPLOYMENT_HOST)" - - rsync -avzh dist/ $SSH_USER@$DEPLOYMENT_HOST:/tmp/${CI_JOB_ID} - - ssh $SSH_USER@$DEPLOYMENT_HOST "sudo rsync -avzh --chown www-data:www-data --delete /tmp/${CI_JOB_ID}/$CI_PROJECT_NAME ${DEPLOYMENT_PATH}/html/custom_apps/ && rm -rf /tmp/${CI_JOB_ID} && sudo docker exec -u www-data $CONTAINER_NAME /var/www/html/occ app:enable $CI_PROJECT_NAME" - -deploy:dev01: - extends: .deploy:nextcloud-app - when: manual - only: - - /^dev\/.*$/ - - main - environment: - name: dev/01 - url: https://dev.eeo.one/ - variables: - DEPLOYMENT_BRANCH: $CI_COMMIT_BRANCH - CONTAINER_NAME: dev01_nextcloud - -deploy:dev02: - extends: .deploy:nextcloud-app - when: manual - only: - - /^dev\/.*$/ - - main - environment: - name: dev/02 - url: https://ecloud02.dev.eeo.one - variables: - DEPLOYMENT_BRANCH: $CI_COMMIT_BRANCH - CONTAINER_NAME: dev02_nextcloud - -deploy:dev03: - extends: .deploy:nextcloud-app - when: manual - only: - - /^dev\/.*$/ - - main - environment: - name: dev/03 - url: https://ecloud03.dev.eeo.one - variables: - DEPLOYMENT_BRANCH: $CI_COMMIT_BRANCH - CONTAINER_NAME: dev03_nextcloud - -deploy:staging: - extends: .deploy:nextcloud-app - when: manual - only: - - main - - production - environment: - name: staging/01 - url: https://eeo.one - variables: - DEPLOYMENT_BRANCH: $CI_COMMIT_BRANCH - CONTAINER_NAME: nextcloud -- GitLab From 23a4cf9ef3083916ede03657302bcc4b5038f7d6 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Mon, 23 May 2022 15:52:31 +0600 Subject: [PATCH 17/32] add deploy dependencies and bring back the rule --- .gitlab-ci.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 24faa83..ad0a122 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,9 +22,9 @@ install-node-deps: - npm --version script: - npm ci --cache .npm --prefer-offline - # only: - # changes: - # - package*.json + only: + changes: + - package*.json lint: stage: test @@ -50,6 +50,10 @@ include: ref: dev/template file: 'auto-deploy-pipelines.yml' +.deploy:nextcloud-app: + stage: deploy + dependencies: + - build-frontend deploy:dev01: stage: deploy deploy:dev02: -- GitLab From 6477768956f0b77b2436cd1a5d0c11a03efc07e6 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Mon, 23 May 2022 15:55:12 +0600 Subject: [PATCH 18/32] [skip ci] remove commented out local include --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ad0a122..e07cf95 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -45,7 +45,6 @@ build-frontend: - dist/email-recovery.tar.gz include: - # - local: 'lib/gitlab/ci/templates/Jobs/Auto-Deploy-Pipelines.gitlab-ci.yml' - project: 'e/infra/selfhost/nextcloud-apps/ci-templates' ref: dev/template file: 'auto-deploy-pipelines.yml' -- GitLab From db96e4c7350e1d22a09dc6f97b7a571c16953734 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Mon, 23 May 2022 16:47:56 +0600 Subject: [PATCH 19/32] remove stating tag for dependent deploy tasks --- .gitlab-ci.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e07cf95..2944181 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -53,11 +53,3 @@ include: stage: deploy dependencies: - build-frontend -deploy:dev01: - stage: deploy -deploy:dev02: - stage: deploy -deploy:dev03: - stage: deploy -deploy:staging: - stage: deploy -- GitLab From fcdec0d6cdeaf810c9998dd0b0d8ddef80f1f93c Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Tue, 24 May 2022 14:51:39 +0600 Subject: [PATCH 20/32] replace build-frontend job with remote template --- .gitlab-ci.yml | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2944181..059b947 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -32,22 +32,14 @@ lint: - npm run lint - npm run stylelint -build-frontend: - stage: build - script: - - npm run build - - mkdir -p dist/email-recovery - - rm dist/js/*.map - - cp -a appinfo css l10n lib templates recovery-email-setting.png dist/js dist/email-recovery - - cd dist/ && tar -czf email-recovery.tar.gz email-recovery - artifacts: - paths: - - dist/email-recovery.tar.gz - include: - - project: 'e/infra/selfhost/nextcloud-apps/ci-templates' + - project: 'e/infra/ecloud/nextcloud-apps/ci-templates' ref: dev/template file: 'auto-deploy-pipelines.yml' + file: 'nc-apps-build-frontend.yml' + +build-frontend: + stage: build .deploy:nextcloud-app: stage: deploy -- GitLab From a1cffecb64fc6436e932902d6929aa94a1496dd4 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Tue, 24 May 2022 14:52:55 +0600 Subject: [PATCH 21/32] change file include order --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 059b947..112a4d6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -35,8 +35,8 @@ lint: include: - project: 'e/infra/ecloud/nextcloud-apps/ci-templates' ref: dev/template - file: 'auto-deploy-pipelines.yml' file: 'nc-apps-build-frontend.yml' + file: 'auto-deploy-pipelines.yml' build-frontend: stage: build -- GitLab From d68ddfb1da183eda506cd337e6947499c89a8f94 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Tue, 24 May 2022 14:54:13 +0600 Subject: [PATCH 22/32] fix template name --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 112a4d6..7effd77 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -36,7 +36,7 @@ include: - project: 'e/infra/ecloud/nextcloud-apps/ci-templates' ref: dev/template file: 'nc-apps-build-frontend.yml' - file: 'auto-deploy-pipelines.yml' + file: 'nc-apps-deploy.yml' build-frontend: stage: build -- GitLab From 2557bcf700508400e4afc1f68b45eb778738d291 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Tue, 24 May 2022 15:34:04 +0600 Subject: [PATCH 23/32] add full project path for nc-apps-deploy.yml --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7effd77..898a250 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -36,6 +36,8 @@ include: - project: 'e/infra/ecloud/nextcloud-apps/ci-templates' ref: dev/template file: 'nc-apps-build-frontend.yml' + - project: 'e/infra/ecloud/nextcloud-apps/ci-templates' + ref: dev/template file: 'nc-apps-deploy.yml' build-frontend: -- GitLab From 4d24ea85162be7ae6c8017859798ff6af01bb3d4 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Tue, 24 May 2022 15:58:52 +0600 Subject: [PATCH 24/32] add lint template and fix indentation --- .gitlab-ci.yml | 72 +++++++++++++++++++++++++------------------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 898a250..bafe70c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,49 +1,49 @@ stages: - - prepare - - test - - build - - deploy + - prepare + - test + - build + - deploy default: - image: node:15.14.0-stretch - before_script: - - npm set cache .npm - - npm install --prefer-offline --no-audit - cache: - key: ${CI_COMMIT_REF_SLUG} - paths: - - .npm/ - - node_modules/ + image: node:15.14.0-stretch + before_script: + - npm set cache .npm + - npm install --prefer-offline --no-audit + cache: + key: ${CI_COMMIT_REF_SLUG} + paths: + - .npm/ + - node_modules/ install-node-deps: - stage: prepare - before_script: - - node --version - - npm --version - script: - - npm ci --cache .npm --prefer-offline - only: - changes: - - package*.json - -lint: - stage: test - script: - - npm run lint - - npm run stylelint + stage: prepare + before_script: + - node --version + - npm --version + script: + - npm ci --cache .npm --prefer-offline + only: + changes: + - package*.json include: - - project: 'e/infra/ecloud/nextcloud-apps/ci-templates' + - project: "e/infra/ecloud/nextcloud-apps/ci-templates" + ref: dev/template + file: "nc-apps-build-frontend.yml" + - project: "e/infra/ecloud/nextcloud-apps/ci-templates" ref: dev/template - file: 'nc-apps-build-frontend.yml' - - project: 'e/infra/ecloud/nextcloud-apps/ci-templates' + file: "nc-apps-deploy.yml" + - project: "e/infra/ecloud/nextcloud-apps/ci-templates" ref: dev/template - file: 'nc-apps-deploy.yml' + file: "nc-apps-lint.yml" + +lint: + stage: test build-frontend: - stage: build + stage: build .deploy:nextcloud-app: - stage: deploy - dependencies: - - build-frontend + stage: deploy + dependencies: + - build-frontend -- GitLab From 207d11edcd4e7e69dd5080233044d200a0d4ad1a Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Tue, 24 May 2022 16:21:10 +0600 Subject: [PATCH 25/32] fix indentation --- .gitlab-ci.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bafe70c..8f727a8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -27,15 +27,15 @@ install-node-deps: - package*.json include: - - project: "e/infra/ecloud/nextcloud-apps/ci-templates" - ref: dev/template - file: "nc-apps-build-frontend.yml" - - project: "e/infra/ecloud/nextcloud-apps/ci-templates" - ref: dev/template - file: "nc-apps-deploy.yml" - - project: "e/infra/ecloud/nextcloud-apps/ci-templates" - ref: dev/template - file: "nc-apps-lint.yml" + - project: "e/infra/ecloud/nextcloud-apps/ci-templates" + ref: dev/template + file: "nc-apps-build-frontend.yml" + - project: "e/infra/ecloud/nextcloud-apps/ci-templates" + ref: dev/template + file: "nc-apps-deploy.yml" + - project: "e/infra/ecloud/nextcloud-apps/ci-templates" + ref: dev/template + file: "nc-apps-lint.yml" lint: stage: test -- GitLab From dd4e87b4b7e65f1edef900670db7adeb93699c4e Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Tue, 24 May 2022 19:04:07 +0600 Subject: [PATCH 26/32] override build-frontend script --- .gitlab-ci.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8f727a8..bb6afd6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -42,6 +42,15 @@ lint: build-frontend: stage: build + script: + - npm run build + - mkdir -p dist/$CI_PROJECT_NAME + - rm dist/js/*.map + - cp -a appinfo css l10n lib templates js recovery-email-setting.png dist/js dist/$CI_PROJECT_NAME + - cd dist/ && tar -czf email-recovery.tar.gz email-recovery + artifacts: + paths: + - "dist/email-recovery.tar.gz" .deploy:nextcloud-app: stage: deploy -- GitLab From 49797dc668f35858dedad8e21e3e137e10193668 Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Tue, 24 May 2022 19:10:09 +0600 Subject: [PATCH 27/32] remove js from copy in build-frontend script --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bb6afd6..6df797a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -46,7 +46,7 @@ build-frontend: - npm run build - mkdir -p dist/$CI_PROJECT_NAME - rm dist/js/*.map - - cp -a appinfo css l10n lib templates js recovery-email-setting.png dist/js dist/$CI_PROJECT_NAME + - cp -a appinfo css l10n lib templates recovery-email-setting.png dist/js dist/$CI_PROJECT_NAME - cd dist/ && tar -czf email-recovery.tar.gz email-recovery artifacts: paths: -- GitLab From be9e6576a983049ef238cd6543ac2b011f000eaf Mon Sep 17 00:00:00 2001 From: Fazle Rabbi Date: Tue, 24 May 2022 19:49:23 +0600 Subject: [PATCH 28/32] fix include order --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6df797a..3631d66 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -29,13 +29,13 @@ install-node-deps: include: - project: "e/infra/ecloud/nextcloud-apps/ci-templates" ref: dev/template - file: "nc-apps-build-frontend.yml" + file: "nc-apps-lint.yml" - project: "e/infra/ecloud/nextcloud-apps/ci-templates" ref: dev/template - file: "nc-apps-deploy.yml" + file: "nc-apps-build-frontend.yml" - project: "e/infra/ecloud/nextcloud-apps/ci-templates" ref: dev/template - file: "nc-apps-lint.yml" + file: "nc-apps-deploy.yml" lint: stage: test -- GitLab From a945448be08658407870fb105845b0ab5fe50544 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnau=20V=C3=A0zquez?= Date: Wed, 25 May 2022 23:50:47 +0000 Subject: [PATCH 29/32] =?UTF-8?q?lets=20try=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 64 +++++++------------------------------------------- 1 file changed, 8 insertions(+), 56 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3631d66..66ed7a7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,58 +1,10 @@ -stages: - - prepare - - test - - build - - deploy - -default: - image: node:15.14.0-stretch - before_script: - - npm set cache .npm - - npm install --prefer-offline --no-audit - cache: - key: ${CI_COMMIT_REF_SLUG} - paths: - - .npm/ - - node_modules/ - -install-node-deps: - stage: prepare - before_script: - - node --version - - npm --version - script: - - npm ci --cache .npm --prefer-offline - only: - changes: - - package*.json +variables: + TO_PACKAGE: 'appinfo css l10n lib templates recovery-email-setting.png' include: - - project: "e/infra/ecloud/nextcloud-apps/ci-templates" - ref: dev/template - file: "nc-apps-lint.yml" - - project: "e/infra/ecloud/nextcloud-apps/ci-templates" - ref: dev/template - file: "nc-apps-build-frontend.yml" - - project: "e/infra/ecloud/nextcloud-apps/ci-templates" - ref: dev/template - file: "nc-apps-deploy.yml" - -lint: - stage: test - -build-frontend: - stage: build - script: - - npm run build - - mkdir -p dist/$CI_PROJECT_NAME - - rm dist/js/*.map - - cp -a appinfo css l10n lib templates recovery-email-setting.png dist/js dist/$CI_PROJECT_NAME - - cd dist/ && tar -czf email-recovery.tar.gz email-recovery - artifacts: - paths: - - "dist/email-recovery.tar.gz" - -.deploy:nextcloud-app: - stage: deploy - dependencies: - - build-frontend + - project: 'e/infra/ecloud/nextcloud-apps/ci-templates' + ref: dev/frontend-build + file: 'nc-apps-lint-build-frontend.yml' + - project: 'e/infra/ecloud/nextcloud-apps/ci-templates' + ref: dev/frontend-build + file: 'nc-apps-deploy.yml' -- GitLab From f80980d041ab944a9144d108513883d23ab255b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnau=20V=C3=A0zquez?= Date: Thu, 26 May 2022 00:09:24 +0000 Subject: [PATCH 30/32] =?UTF-8?q?Didn't=20commit=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 66ed7a7..7eeb3f2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,5 @@ variables: - TO_PACKAGE: 'appinfo css l10n lib templates recovery-email-setting.png' + TO_PACKAGE: 'appinfo js css l10n lib templates recovery-email-setting.png' include: - project: 'e/infra/ecloud/nextcloud-apps/ci-templates' -- GitLab From 88bcca46eb7b2accdf9b63aeec7c680fe2d09526 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnau=20V=C3=A0zquez?= Date: Thu, 26 May 2022 00:21:39 +0000 Subject: [PATCH 31/32] =?UTF-8?q?just=20do=20as=20in=20master=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7eeb3f2..6caf765 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,5 @@ variables: - TO_PACKAGE: 'appinfo js css l10n lib templates recovery-email-setting.png' + TO_PACKAGE: 'appinfo css l10n lib templates recovery-email-setting.png dist/js' include: - project: 'e/infra/ecloud/nextcloud-apps/ci-templates' -- GitLab From 7ac7ecb5649104d0727e99a17c02abd6f103cec3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnau=20V=C3=A0zquez=20Palma?= Date: Thu, 26 May 2022 02:41:56 +0200 Subject: [PATCH 32/32] Remove readme image from package --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6caf765..6c7147e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,5 @@ variables: - TO_PACKAGE: 'appinfo css l10n lib templates recovery-email-setting.png dist/js' + TO_PACKAGE: 'appinfo css l10n lib templates dist/js' include: - project: 'e/infra/ecloud/nextcloud-apps/ci-templates' -- GitLab