From 7f606058f2b80db68bbcf1ff5bafd067961dac15 Mon Sep 17 00:00:00 2001 From: Ronak Date: Wed, 21 Jun 2023 04:29:55 -0700 Subject: [PATCH] bump version and revert gitlab --- .gitlab-ci.yml | 99 ++++-------------------------------------------- appinfo/info.xml | 2 +- 2 files changed, 9 insertions(+), 92 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0b0f2817..6119917f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,92 +1,9 @@ -#include: -# - project: "e/infra/ecloud/nextcloud-apps/ci-templates" -# ref: main -# file: "nc-apps-lint-build-frontend.yml" -# - project: "e/infra/ecloud/nextcloud-apps/ci-templates" -# ref: main -# file: "nc-apps-deploy.yml" - variables: - APP_NAME: $CI_PROJECT_NAME - TO_PACKAGE: 'appinfo js css l10n lib img templates' - CONTAINER_IMAGE: ubuntu - CONTAINER_TAG: focal - CONTAINER_NAME: nextcloud - APP_ENABLE_ARGS: '' - -.frontend:base: - 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: - extends: .frontend:base - stage: .pre - before_script: - - node --version - - npm --version - script: - - npm ci --cache .npm --prefer-offline - only: - changes: - - package*.json - -build-frontend: - extends: .frontend:base - stage: build - script: - - npm run build - - mkdir -p dist/${APP_NAME} - - rm -f dist/js/*.map - - echo "packaging ${TO_PACKAGE}" && cp -a ${TO_PACKAGE} dist/${APP_NAME} && rm -rf dist/js - - find dist/${APP_NAME} -type d -exec chmod 755 {} \; - - find dist/${APP_NAME} -type f -exec chmod 644 {} \; - artifacts: - paths: - - dist/ - -.deploy:nextcloud-app: - stage: deploy - # assuming all deployment will happen with sames image - image: $CONTAINER_IMAGE:$CONTAINER_TAG - # assuming we will need to add SSH for all deployment - before_script: - - echo "FAIL" > .job_status - - 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 ${APP_NAME} to $CI_ENVIRONMENT_NAME ($DEPLOYMENT_HOST)" - - rsync -avzh dist/ $SSH_USER@$DEPLOYMENT_HOST:/tmp/${CI_JOB_ID} - - ssh $SSH_USER@$DEPLOYMENT_HOST "sudo docker exec -u www-data $CONTAINER_NAME /usr/local/bin/php /var/www/html/occ app:disable ${APP_NAME} && - sudo rsync -avzh --chown www-data:www-data --delete /tmp/${CI_JOB_ID}/${APP_NAME} ${DEPLOYMENT_PATH}/html/custom_apps/ && - sudo docker exec -u www-data $CONTAINER_NAME /usr/local/bin/php /var/www/html/occ app:enable ${APP_ENABLE_ARGS} ${APP_NAME}" - - echo "SUCCESS" > .job_status - after_script: - # reading job status, checking it and implementing additional steps - # are not handled here as rm -rf /tmp/${CI_JOB_ID} will always execute - - ssh $SSH_USER@$DEPLOYMENT_HOST "rm -rf /tmp/${CI_JOB_ID}" - -deploy:staging: - extends: .deploy:nextcloud-app - when: manual - only: - - main - - murena-main - - production - - tags - - dev/checkbox-issue-drop-account - environment: - name: staging/01 - url: https://eeo.one + TO_PACKAGE: 'appinfo l10n lib templates js img' +include: + - project: "e/infra/ecloud/nextcloud-apps/ci-templates" + ref: main + file: "nc-apps-lint-build-frontend.yml" + - project: "e/infra/ecloud/nextcloud-apps/ci-templates" + ref: main + file: "nc-apps-deploy.yml" diff --git a/appinfo/info.xml b/appinfo/info.xml index 1bc21400..5f7d600a 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -10,7 +10,7 @@ - 3.2.0 + 3.2.1 agpl Murena SAS EcloudAccounts -- GitLab